Module clients.internal_dai_version.client
Classes
InternalDAIVersionClient
InternalDAIVersionClient manages InternalDAIVersions.
Initializes InternalDAIVersionClient.
Args
connection_config
:ConnectionConfig
- AIEM connection configuration object.
verify_ssl
- Set to False to disable SSL certificate verification.
ssl_ca_cert
- Path to a CA cert bundle with certificates of trusted CAs.
Methods
apply_internal_dai_versions
Set all InternalDAIVersions to a state defined in the version_configs. InternalDAIVersions not specified in the version_configs will be deleted. InternalDAIVersions specified in the version_configs will be recreated with the new values. When multiple InternalDAIVersions are configured with the same alias, the latest one in the version_configs list will have this alias assigned (rest will have it removed).
Args
version_configs
- configuration of InternalDAIVersions that should be applied
Returns: applied InternalDAIVersions
assign_aliases
Assign new set of aliases to InternalDAIVersion. This will replace existing InternalDAIVersion aliases with the new aliases. If there are other InternalDAIVersions with the same alias that we try to assign, they will be deleted from the other InternalDAIVersions.
Example 1 - assign only alias latest to another InternalDAIVersion:
- InternalDAIVersions: daiv1.aliases=["latest", "foo"], daiv2.aliases=["bar", "baz"], daiv3.aliases=["goo"]
- AssignAliases(daiv3, aliases=["latest"])
- InternalDAIVersions: daiv1.aliases=["foo"], daiv2.aliases=["bar", "baz"], daiv3.aliases=["latest"] Note that alias "latest" was deleted from daiv1 and alias "goo" was deleted from daiv3.
Example 2 - add alias latest to another InternalDAIVersion:
- InternalDAIVersions: daiv1.aliases=["latest", "foo"], daiv2.aliases=["bar", "baz"], daiv3.aliases=["goo"]
- AssignAliases(daiv3, aliases=["goo", "latest"])
- InternalDAIVersions: daiv1.aliases=["foo"], daiv2.aliases=["bar", "baz"], daiv3.aliases=["goo", "latest"] Note that alias "latest" was deleted from daiv1 and alias "goo" remained in the daiv3.
Example 3 - assign multiple aliases which affects aliases of multiple InternalDAIVersions:
- InternalDAIVersions: daiv1.aliases=["latest", "foo"], daiv2.aliases=["bar", "baz"], daiv3.aliases=["goo"]
- AssignAliases(daiv3, aliases=["latest", "bar"])
- InternalDAIVersions: daiv1.aliases=["foo"], daiv2.aliases=["baz"], daiv3.aliases=["latest", "bar"] Note that
- alias "latest" was deleted from daiv1
- alias "latest" was added to daiv3
- alias "bar" was deleted from daiv2
- alias "goo" was deleted from daiv3
Args
internal_dai_version_id
- ID of the InternalDAIVersion
aliases
- aliases to assign to the InternalDAIVersion
Returns
all InternalDAIVersions after applying the new aliases
create_version
Create InternalDAIVersion.
Args
internal_dai_version_id
- version identifier. Must be in semver format. More than three segments are supported. For example "1.10.3" or "1.10.3.1".
image
- Name of the Docker image when using this version.
image_pull_policy
- Image pull policy applied when using this version.
image_pull_secrets
- List of references to k8s secrets that can be used for pulling an image of this version from a private container image registry or repository.
aliases
- Aliases of this version. For example ["latest"].
gpu_resource_name
- K8s GPU resource name. For example: "nvidia.com/gpu" or "amd.com/gpu".
data_directory_storage_class
- Name of the storage class used by Driverless AI when using this version.
annotations
- Additional arbitrary metadata associated with this version.
deprecated
- Indicates whether this version is deprecated.
Returns
Created InternalDAIVersion.
delete_all_internal_dai_versions
Help function for deleting all InternalDAIVersions.
delete_version
get_version
list_all_versions
list_versions
List InternalDAIVersions.
Args
page_size
- Maximum number of InternalDAIVersions to return in a response. If unspecified (or set to 0), at most 50 InternalDAIVersions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
page_token
- Leave unset to receive the initial page. To list any subsequent pages use the value of 'next_page_token' returned from the InternalDAIVersionsPage.
Returns
Page of InternalDAIVersions
update_version
- Submit and view feedback for this page
- Send feedback about AI Engine Manager to cloud-feedback@h2o.ai