otcextensions.sdk.modelartsv1.v1.builtin_model

The modelarts BuiltInModel Class

The Config class inherits from Resource.

class otcextensions.sdk.modelartsv1.v1.builtin_model.BuiltInModel(_synchronized=False, connection=None, **attrs)

The base resource

Parameters:
  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().

  • connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

base_path: str = '/built-in-algorithms'

The base part of the URI for this resource.

resources_key: ty.Optional[str] = 'models'

Plural form of key for resource.

allow_list = True

Allow list operation for this resource.

allow_fetch = True

Allow get operation for this resource.

created_at

Time when a model is created.

engine_id

Engine ID of a model.

engine_name

Engine name of a model.

engine_version

Engine version of a model.

is_success

Whether the request is successful.

model_dataset_format

Dataset format required by a model.

model_description_url

URL of the model description.

model_id

Model ID.

model_name

Model name.

model_precision

Model precision.

model_size

Model size, in bytes.

model_train_dataset

Model training dataset.

model_usage

Model usage.

parameter

Running parameters of a model.

classmethod existing(connection=None, **kwargs)

Create an instance of an existing remote resource.

When creating the instance set the _synchronized parameter of Resource to True to indicate that it represents the state of an existing server-side resource. As such, all attributes passed in **kwargs are considered “clean”, such that an immediate update() call would not generate a body of attributes to be modified on the server.

Parameters:

kwargs (dict) – Each of the named arguments will be set as attributes on the resulting Resource object.

classmethod find(session, name_or_id: str, ignore_missing: bool = True, **params)

Find a resource by its name or id.

Parameters:
  • session (Adapter) – The session to use for making this request.

  • name_or_id – This resource’s identifier, if needed by the request. The default is None.

  • ignore_missing (bool) – When set to False ResourceNotFound will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

  • params (dict) – Any additional parameters to be passed into underlying methods, such as to existing() in order to pass on URI parameters.

Returns:

The Resource object matching the given name or id or None if nothing matches.

Raises:

openstack.exceptions.DuplicateResource if more than one resource is found for this request.

Raises:

openstack.exceptions.ResourceNotFound if nothing is found and ignore_missing is False.