Skip to main content


pc.get_model(name=None, version=None, model_id=None)

Get the specified model and return as a model object. If neither name or model ID
is specified, an error will be thrown. If model ID is specified, name and version should
not be specified, else an error will be thrown. If just the model name is specified, the
most recent version will be returned.


   name: str
Name of model to get.

   version: Union[int, str]
Version of the specified model to get.

   model_id: str
ID of the model to get.




Get an already created model by name.

    model = pc.get_model('Titanic Model')

Get an already created model by ID.

# > [ModelRepo(id=5678, model_name=Titanic Model, latest_config={...}, latest_dataset=Dataset(id=1234, name=Titanic Dataset, object_name=2bbf3f31fb2d, connection_id=0, author=jsmith, created=2022-05-13T20:13:16.277405Z, updated=2022-05-13T20:13:16.277405Z), selected_engine_id=2, created=2022-05-13T20:14:27.623523Z, updated=2022-05-13T20:16:16.793863Z),
# ModelRepo(id=2260, model_name=Fraud model, latest_config={...}, latest_dataset=Dataset(id=1235, name=Fraud Dataset, object_name=fraud, connection_id=1, author=jdoe, created=2022-05-05T20:01:11.062224Z, updated=2022-05-05T20:01:11.062224Z), selected_engine_id=1, created=2022-05-11T22:03:04.264877Z, updated=2022-05-11T22:56:58.264379Z)]

model = pc.get_model(model_id=5678)