RegisteredModelVersions

class verta.registry.entities.RegisteredModelVersions(conn, conf)

Collection object for finding registered model versions.

There should not be a need to instantiate this class directly; please use Client.registered_model_versions or RegisteredModel.versions

find(*args)

Gets the results from this collection that match input predicates.

A predicate is a string containing a simple boolean expression consisting of:

  • a dot-delimited property such as metrics.accuracy

  • a Python boolean operator such as >=

  • a literal value such as .8

Parameters:

*args (strs) – Predicates specifying results to get.

Returns:

The same type of object given in the input.

Examples

runs.find("hyperparameters.hidden_size == 256",
           "metrics.accuracy >= .8")
# <ExperimentRuns containing 3 runs>
# alternatively:
runs.find(["hyperparameters.hidden_size == 256",
           "metrics.accuracy >= .8"])
# <ExperimentRuns containing 3 runs>
set_page_limit(limit)

Sets the number of entities to fetch per backend call during iteration.

By default, each call fetches a batch of 100 entities, but lowering this value may be useful for substantially larger responses.

Parameters:

limit (int) – Number of entities to fetch per call.

Examples

runs = proj.expt_runs
runs.set_page_limit(10)
for run in runs:  # fetches 10 runs per backend call
    print(run.get_metric("accuracy"))
sort(key, descending=False)

Sorts the results from this collection by key.

A key is a string containing a dot-delimited property such as metrics.accuracy.

Parameters:
  • key (str) – Dot-delimited property.

  • descending (bool, default False) – Order in which to return sorted results.

Returns:

The same type of object given in the input.

Examples

runs.sort("metrics.accuracy")
# <ExperimentRuns containing 3 runs>
with_workspace(workspace=None)

Returns model versions in the specified workspace.

Parameters:

workspace (str, optional) – Workspace name. If not provided, uses personal workspace.

Returns:

RegisteredModelVersions – Filtered model versions.