Load a Model from an OML4Py Datastore
You can call the oml.ds.load
function to load a spatial
model from its datastore and use it to solve different problems.
The following code loads the object associated with the string spatial_model from
the sai_ds
datastore. Note that by setting
to_globals=False
, the oml.ds.load
function returns
a dictionary containing pairs of object names and values.
import oml
ds_objects = oml.ds.load('sai_ds', objs=['spatial_model'], to_globals=False)
my_spatial_model = ds_objects['spatial_model']
See Load Saved Objects From a Datastore in Oracle Machine Learning for Python User’s Guide for more information.
You can list all the objects saved in a datastore as shown:
print(oml.ds.dir())