Skip to main content

pc.get_model_repo

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

Get the specified model repository by name and return as a model repo object.

Parameters:

   name: str
Name of model repository to get.

Returns:

   ModelRepo

Examples:

Get a model repo by name

    repo = pc.get_model_repo('Titanic Model Repo')

Get an already created model repo by ID.

    pc.list_model_repos()
# > [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)]

repo = pc.get_model_repo(model_id=5678)