Model Catalog Endpoints

class graphdatascience.procedure_surface.api.model.ModelCatalogEndpoints
abstract delete(model_name: str, fail_if_missing: bool = False) ModelDeleteResult | None

Delete a persisted model from storage.

Parameters:
  • model_name (str) – The model to delete.

  • fail_if_missing (bool) – If True, a missing model will cause an error. If False, returns None when missing.

Returns:

The delete result.

Return type:

ModelDeleteResult

abstract drop(model_name: str, *, fail_if_missing: bool = False) ModelDetails | None

Drop a model from the in-memory catalog.

Parameters:
  • model_name (str) – The model to drop.

  • fail_if_missing (bool) – If True, a missing model will cause an error. If False, returns None when missing.

Returns:

The model details after the drop operation when applicable.

Return type:

ModelDetails

abstract exists(model_name: str) ModelExistsResult | None

Check whether a model exists.

Parameters:

model_name (str) – The name of the model to check.

Returns:

A result object when the model exists; otherwise None.

Return type:

ModelExistsResult | None

abstract get(model_name: str) ModelDetails

Get a model catalog entry by name.

Parameters:

model_name (str) – The model name to resolve.

Returns:

The model details.

Return type:

ModelDetails

abstract list() list[ModelDetails]

List all models in the model catalog.

Returns:

List of model catalog entries.

Return type:

list[ModelDetails]

abstract load(model_name: str) ModelLoadResult

Load a persisted model into the session/catalog.

Parameters:

model_name (str) – The model to load.

Returns:

The load result.

Return type:

ModelLoadResult

abstract store(model_name: str, *, fail_if_unsupported: bool = False) ModelStoreResult

Persist/store a model.

Parameters:
  • model_name (str) – The model to store.

  • fail_if_unsupported (bool) – If True, unsupported models cause an error.

Returns:

The store result.

Return type:

ModelStoreResult

pydantic model graphdatascience.procedure_surface.api.model.ModelDeleteResult
field delete_millis: int
field model_name: str
pydantic model graphdatascience.procedure_surface.api.model.ModelExistsResult
field exists: bool
field model_name: str
field model_type: str
pydantic model graphdatascience.procedure_surface.api.model.ModelLoadResult
field load_millis: int
field model_name: str
pydantic model graphdatascience.procedure_surface.api.model.ModelStoreResult
field model_name: str
field store_millis: int
class graphdatascience.model.v2.model_details.ModelDetails
model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].