InputModel
class InputModel()
Load an existing model in the system, search by model ID. The Model will be read-only and can be used to pre initialize a network. We can connect the model to a task as input model, then when running remotely override it with the UI.
Load a model from the Model artifactory, based on model_id (uuid) or a model name/projects/tags combination.
Parameters
model_id (
Optional
[str
]) – The ClearML ID (system UUID) of the input model whose metadata the ClearML Server (backend) stores. If provided all other arguments are ignoredname (
Optional
[str
]) – Model name to search and loadproject (
Optional
[str
]) – Model project name to search model intags (
Optional
[Sequence
[str
]]) – Model tags list to filter byonly_published (
bool
) – If True, filter out non-published (draft) models
comment
property comment
The comment for the model. Also, use for a model description.
Return type
str
Returns
The model comment / description.
config_dict
property config_dict
The configuration as a dictionary, parsed from the design text. This usually represents the model configuration. For example, prototxt, an ini file, or Python code to evaluate.
Return type
dict
Returns
The configuration.
config_text
property config_text
The configuration as a string. For example, prototxt, an ini file, or Python code to evaluate.
Return type
str
Returns
The configuration.
connect
connect(task, name=None)
Connect the current model to a Task object, if the model is preexisting. Preexisting models include:
Imported models (InputModel objects created using the
Logger.import_model
method).Models whose metadata is already in the ClearML platform, meaning the InputModel object is instantiated from the
InputModel
class specifying the model’s ClearML ID as an argument.Models whose origin is not ClearML that are used to create an InputModel object. For example, models created using TensorFlow models.
When the experiment is executed remotely in a worker, the input model already specified in the experiment is used.
The ClearML Web-App allows you to switch one input model for another and then enqueue the experiment to execute in a worker.
Parameters
task (object ) – A Task object.
name (str ) – The model name to be stored on the Task (default the filename, of the model weights, without the file extension)
Return type
None
InputModel.empty
classmethod empty(config_text=None, config_dict=None, label_enumeration=None)
Create an empty model object. Later, you can assign a model to the empty model object.
Parameters
config_text (unconstrained text string ) – The model configuration as a string. This is usually the content of a configuration dictionary file. Specify
config_text
orconfig_dict
, but not both.config_dict (dict ) – The model configuration as a dictionary. Specify
config_text
orconfig_dict
, but not both.label_enumeration (dict ) – The label enumeration dictionary of string (label) to integer (value) pairs. (Optional)
For example:
{
"background": 0,
"person": 1
}
Return type
InputModel
Returns
An empty model object.
get_all_metadata
get_all_metadata()
See Model.get_all_metadata_casted if you wish to cast the value to its type (if possible)
Return type
Dict
[str
,Dict
[str
,str
]]Returns
Get all metadata as a dictionary of format Dict[key, Dict[value, type]]. The key, value and type entries are all strings. Note that each entry might have an additional ‘key’ entry, repeating the key
get_all_metadata_casted
get_all_metadata_casted()
Return type
Dict
[str
,Dict
[str
,Any
]]Returns
Get all metadata as a dictionary of format Dict[key, Dict[value, type]]. The key and type entries are strings. The value is cast to its type if possible. Note that each entry might have an additional ‘key’ entry, repeating the key
get_local_copy
get_local_copy(extract_archive=True, raise_on_error=False, force_download=False)
Retrieve a valid link to the model file(s). If the model URL is a file system link, it will be returned directly. If the model URL points to a remote location (http/s3/gs etc.), it will download the file(s) and return the temporary location of the downloaded model.
Parameters
extract_archive (bool ) – If True, and the model is of type ‘packaged’ (e.g. TensorFlow compressed folder) The returned path will be a temporary folder containing the archive content
raise_on_error (bool ) – If True, and the artifact could not be downloaded, raise ValueError, otherwise return None on failure and output log warning.
force_download (bool ) – If True, the artifact will be downloaded, even if the model artifact is already cached.
Return type
str
Returns
A local path to the model (or a downloaded copy of it).
get_metadata
get_metadata(key)
Get one metadata entry value (as a string) based on its key. See Model.get_metadata_casted if you wish to cast the value to its type (if possible)
Parameters
key (
str
) – Key of the metadata entry you want to getReturn type
Optional
[str
]Returns
String representation of the value of the metadata entry or None if the entry was not found
get_metadata_casted
get_metadata_casted(key)
Get one metadata entry based on its key, casted to its type if possible
Parameters
key (
str
) – Key of the metadata entry you want to getReturn type
Optional
[str
]Returns
The value of the metadata entry, casted to its type (if not possible, the string representation will be returned) or None if the entry was not found
get_weights
get_weights(raise_on_error=False, force_download=False)
Download the base model and return the locally stored filename.
Parameters
raise_on_error (bool ) – If True, and the artifact could not be downloaded, raise ValueError, otherwise return None on failure and output log warning.
force_download (bool ) – If True, the base model will be downloaded, even if the base model is already cached.
Return type
str
Returns
The locally stored file.
get_weights_package
get_weights_package(return_path=False, raise_on_error=False, force_download=False)
Download the base model package into a temporary directory (extract the files), or return a list of the locally stored filenames.
Parameters
return_path (bool ) – Return the model weights or a list of filenames (Optional)
True
- Download the model weights into a temporary directory, and return the temporary directory path.False
- Return a list of the locally stored filenames. (Default)
raise_on_error (bool ) – If True, and the artifact could not be downloaded, raise ValueError, otherwise return None on failure and output log warning.
force_download (bool ) – If True, the base artifact will be downloaded, even if the artifact is already cached.
Return type
Union
[str
,List
[Path
],None
]Returns
The model weights, or a list of the locally stored filenames. if raise_on_error=False, returns None on error.
id
property id
The ID (system UUID) of the model.
Return type
str
Returns
The model ID.
InputModel.import_model
classmethod import_model(weights_url, config_text=None, config_dict=None, label_enumeration=None, name=None, project=None, tags=None, comment=None, is_package=False, create_as_published=False, framework=None)
Create an InputModel object from a pre-trained model by specifying the URL of an initial weight file.
Optionally, input a configuration, label enumeration, name for the model, tags describing the model,
comment as a description of the model, indicate whether the model is a package, specify the model’s
framework, and indicate whether to immediately set the model’s status to Published
.
The model is read-only.
The ClearML Server (backend) may already store the model’s URL. If the input model’s URL is not stored, meaning the model is new, then it is imported and ClearML stores its metadata. If the URL is already stored, the import process stops, ClearML issues a warning message, and ClearML reuses the model.
In your Python experiment script, after importing the model, you can connect it to the main execution
Task as an input model using InputModel.connect
or Task.connect
. That initializes the
network.
Using the ClearML Web-App (user interface), you can reuse imported models and switch models in experiments.
Parameters
weights_url (str ) – A valid URL for the initial weights file. If the ClearML Web-App (backend)
already stores the metadata of a model with the same URL, that existing model is returned and ClearML ignores all other parameters. For example:
https://domain.com/file.bin
s3://bucket/file.bin
file:///home/user/file.bin
config_text (unconstrained text string ) – The configuration as a string. This is usually the content of a configuration dictionary file. Specify
config_text
orconfig_dict
, but not both.config_dict (dict ) – The configuration as a dictionary. Specify
config_text
orconfig_dict
, but not both.label_enumeration (dict ) – Optional label enumeration dictionary of string (label) to integer (value) pairs.
For example:
{
"background": 0,
"person": 1
}name (str ) – The name of the newly imported model. (Optional)
project (str ) – The project name to add the model into. (Optional)
tags (list ( str ) ) – The list of tags which describe the model. (Optional)
comment (str ) – A comment / description for the model. (Optional)
is_package (bool ) – Is the imported weights file is a package (Optional)
True
- Is a package. Add a package tag to the model.False
- Is not a package. Do not add a package tag. (Default)
create_as_published (bool ) – Set the model’s status to Published (Optional)
True
- Set the status to Published.False
- Do not set the status to Published. The status will be Draft. (Default)
framework (str or Framework object ) – The framework of the model. (Optional)
Return type
InputModel
Returns
The imported model or existing model (see above).
labels
property labels
The label enumeration of string (label) to integer (value) pairs.
Return type
Dict
[str
,int
]Returns
A dictionary containing labels enumeration, where the keys are labels and the values as integers.
InputModel.load_model
classmethod load_model(weights_url, load_archived=False)
Load an already registered model based on a pre-existing model file (link must be valid). If the url to the
weights file already exists, the returned object is a Model representing the loaded Model. If no registered
model with the specified url is found, None
is returned.
Parameters
weights_url (
str
) – The valid url for the weights file (string).Examples:
"https://domain.com/file.bin" or "s3://bucket/file.bin" or "file:///home/user/file.bin".
infoIf a model with the exact same URL exists, it will be used, and all other arguments will be ignored.
load_archived (bool ) – Load archived models
True
- Load the registered Model, if it is archived.False
- Ignore archive models.
Return type
InputModel
Returns
The InputModel object, or None if no model could be found.
name
property name
The name of the model.
Return type
str
Returns
The model name.
project
property project
project ID of the model.
Return type
str
Returns
project ID (str).
publish
publish()
Set the model to the status published
and for public use. If the model’s status is already published
,
then this method is a no-op.
Return type
()
InputModel.query_models
classmethod query_models(project_name=None, model_name=None, tags=None, only_published=False, include_archived=False, max_results=None, metadata=None)
Return Model objects from the project artifactory. Filter based on project-name / model-name / tags. List is always returned sorted by descending last update time (i.e. latest model is the first in the list)
Parameters
project_name (
Optional
[str
]) – Optional, filter based project name string, if not given query models from all projectsmodel_name (
Optional
[str
]) – Optional Model name as shown in the model artifactorytags (
Optional
[Sequence
[str
]]) – Filter based on the requested list of tags (strings) To exclude a tag add “-” prefix to the tag. Example: [‘production’, ‘verified’, ‘-qa’] To include All tags (instead of the default Any behaviour) use “$all” as the first string, example: [“$all”, “best”, “model”, “ever”] To combine All tags and exclude a list of tags use “$not” before the excluded tags, example: [“$all”, “best”, “model”, “ever”, “$not”, “internal”, “$not”, “test”]only_published (
bool
) – If True, only return published models.include_archived (
bool
) – If True, return archived models.max_results (
Optional
[int
]) – Optional return the last X models, sorted by last update time (from the most recent to the least).metadata (
Optional
[Dict
[str
,str
]]) – Filter based on metadata. This parameter is a dictionary. Notice that the type of the metadata field is not required.
Return type
List
[Model
]Returns
ModeList of Models objects
InputModel.remove
classmethod remove(model, delete_weights_file=True, force=False, raise_on_errors=False)
Remove a model from the model repository. Optional, delete the model weights file from the remote storage.
Parameters
model (
Union
[str
,Model
]) – Model ID or Model object to removedelete_weights_file (
bool
) – If True (default), delete the weights file from the remote storageforce (
bool
) – If True, remove model even if other Tasks are using this model. default False.raise_on_errors (
bool
) – If True, throw ValueError if something went wrong, default False.
Return type
bool
Returns
True if Model was removed successfully partial removal returns False, i.e. Model was deleted but weights file deletion failed
report_confusion_matrix
report_confusion_matrix(title, series, matrix, iteration=None, xaxis=None, yaxis=None, xlabels=None, ylabels=None, yaxis_reversed=False, comment=None, extra_layout=None)
For explicit reporting, plot a heat-map matrix.
For example:
confusion = np.random.randint(10, size=(10, 10))
model.report_confusion_matrix("example confusion matrix", "ignored", iteration=1, matrix=confusion,
xaxis="title X", yaxis="title Y")
Parameters
title (str ) – The title (metric) of the plot.
series (str ) – The series name (variant) of the reported confusion matrix.
matrix (numpy.ndarray ) – A heat-map matrix (example: confusion matrix)
iteration (int ) – The reported iteration / step.
xaxis (str ) – The x-axis title. (Optional)
yaxis (str ) – The y-axis title. (Optional)
xlabels (list ( str ) ) – Labels for each column of the matrix. (Optional)
ylabels (list ( str ) ) – Labels for each row of the matrix. (Optional)
yaxis_reversed (bool ) – If False 0,0 is at the bottom left corner. If True, 0,0 is at the top left corner
comment (str ) – A comment displayed with the plot, underneath the title.
extra_layout (dict ) – optional dictionary for layout configuration, passed directly to plotly See full details on the supported configuration: https://plotly.com/javascript/reference/heatmap/ example: extra_layout={‘xaxis’: {‘type’: ‘date’, ‘range’: [‘2020-01-01’, ‘2020-01-31’]}}
report_histogram
report_histogram(title, series, values, iteration=None, labels=None, xlabels=None, xaxis=None, yaxis=None, mode=None, data_args=None, extra_layout=None)
For explicit reporting, plot a (default grouped) histogram. Notice this function will not calculate the histogram, it assumes the histogram was already calculated in values
For example:
vector_series = np.random.randint(10, size=10).reshape(2,5)
model.report_histogram(title='histogram example', series='histogram series',
values=vector_series, iteration=0, labels=['A','B'], xaxis='X axis label', yaxis='Y axis label')
Parameters
title – The title (metric) of the plot.
series – The series name (variant) of the reported histogram.
values – The series values. A list of floats, or an N-dimensional Numpy array containing data for each histogram bar.
iteration – The reported iteration / step. Each
iteration
creates another plot.labels – Labels for each bar group, creating a plot legend labeling each series. (Optional)
xlabels – Labels per entry in each bucket in the histogram (vector), creating a set of labels for each histogram bar on the x-axis. (Optional)
xaxis – The x-axis title. (Optional)
yaxis – The y-axis title. (Optional)
mode – Multiple histograms mode, stack / group / relative. Default is ‘group’.
data_args – optional dictionary for data configuration, passed directly to plotly See full details on the supported configuration: https://plotly.com/javascript/reference/bar/ example: data_args={‘orientation’: ‘h’, ‘marker’: {‘color’: ‘blue’}}
extra_layout – optional dictionary for layout configuration, passed directly to plotly See full details on the supported configuration: https://plotly.com/javascript/reference/bar/ example: extra_layout={‘xaxis’: {‘type’: ‘date’, ‘range’: [‘2020-01-01’, ‘2020-01-31’]}}
report_line_plot
report_line_plot(title, series, xaxis, yaxis, mode='lines', iteration=None, reverse_xaxis=False, comment=None, extra_layout=None)
For explicit reporting, plot one or more series as lines.
Parameters
title (str ) – The title (metric) of the plot.
series (list ) – All the series data, one list element for each line in the plot.
iteration (int ) – The reported iteration / step.
xaxis (str ) – The x-axis title. (Optional)
yaxis (str ) – The y-axis title. (Optional)
mode (str ) – The type of line plot. The values are:
lines
(default)markers
lines+markers
reverse_xaxis (bool ) – Reverse the x-axis. The values are:
True
- The x-axis is high to low (reversed).False
- The x-axis is low to high (not reversed). (default)
comment (str ) – A comment displayed with the plot, underneath the title.
extra_layout (dict ) – optional dictionary for layout configuration, passed directly to plotly See full details on the supported configuration: https://plotly.com/javascript/reference/scatter/ example: extra_layout={‘xaxis’: {‘type’: ‘date’, ‘range’: [‘2020-01-01’, ‘2020-01-31’]}}
report_matrix
report_matrix(title, series, matrix, iteration=None, xaxis=None, yaxis=None, xlabels=None, ylabels=None, yaxis_reversed=False, extra_layout=None)
For explicit reporting, plot a confusion matrix.
This method is the same as Model.report_confusion_matrix.
Parameters
title (str ) – The title (metric) of the plot.
series (str ) – The series name (variant) of the reported confusion matrix.
matrix (numpy.ndarray ) – A heat-map matrix (example: confusion matrix)
iteration (int ) – The reported iteration / step.
xaxis (str ) – The x-axis title. (Optional)
yaxis (str ) – The y-axis title. (Optional)
xlabels (list ( str ) ) – Labels for each column of the matrix. (Optional)
ylabels (list ( str ) ) – Labels for each row of the matrix. (Optional)
yaxis_reversed (bool ) – If False, 0,0 is at the bottom left corner. If True, 0,0 is at the top left corner
extra_layout (dict ) – optional dictionary for layout configuration, passed directly to plotly See full details on the supported configuration: https://plotly.com/javascript/reference/heatmap/ example: extra_layout={‘xaxis’: {‘type’: ‘date’, ‘range’: [‘2020-01-01’, ‘2020-01-31’]}}
report_scalar
report_scalar(title, series, value, iteration)
For explicit reporting, plot a scalar series.
Parameters
title (str ) – The title (metric) of the plot. Plot more than one scalar series on the same plot by using the same
title
for each call to this method.series (str ) – The series name (variant) of the reported scalar.
value (float ) – The value to plot per iteration.
iteration (int ) – The reported iteration / step (x-axis of the reported time series)
Return type
None
report_scatter2d
report_scatter2d(title, series, scatter, iteration=None, xaxis=None, yaxis=None, labels=None, mode='line', comment=None, extra_layout=None)
For explicit reporting, report a 2d scatter plot.
For example:
scatter2d = np.hstack((np.atleast_2d(np.arange(0, 10)).T, np.random.randint(10, size=(10, 1))))
model.report_scatter2d(title="example_scatter", series="series", iteration=0, scatter=scatter2d,
xaxis="title x", yaxis="title y")
Plot multiple 2D scatter series on the same plot by passing the same title
and iteration
values
to this method:
scatter2d_1 = np.hstack((np.atleast_2d(np.arange(0, 10)).T, np.random.randint(10, size=(10, 1))))
model.report_scatter2d(title="example_scatter", series="series_1", iteration=1, scatter=scatter2d_1,
xaxis="title x", yaxis="title y")
scatter2d_2 = np.hstack((np.atleast_2d(np.arange(0, 10)).T, np.random.randint(10, size=(10, 1))))
model.report_scatter2d("example_scatter", "series_2", iteration=1, scatter=scatter2d_2,
xaxis="title x", yaxis="title y")
Parameters
title (str ) – The title (metric) of the plot.
series (str ) – The series name (variant) of the reported scatter plot.
scatter (list ) – The scatter data. numpy.ndarray or list of (pairs of x,y) scatter:
iteration (int ) – The reported iteration / step.
xaxis (str ) – The x-axis title. (Optional)
yaxis (str ) – The y-axis title. (Optional)
labels (list ( str ) ) – Labels per point in the data assigned to the
scatter
parameter. The labels must be in the same order as the data.mode (str ) – The type of scatter plot. The values are:
lines
markers
lines+markers
comment (str ) – A comment displayed with the plot, underneath the title.
extra_layout (dict ) – optional dictionary for layout configuration, passed directly to plotly See full details on the supported configuration: https://plotly.com/javascript/reference/scatter/ example: extra_layout={‘xaxis’: {‘type’: ‘date’, ‘range’: [‘2020-01-01’, ‘2020-01-31’]}}
report_scatter3d
report_scatter3d(title, series, scatter, iteration=None, xaxis=None, yaxis=None, zaxis=None, labels=None, mode='markers', fill=False, comment=None, extra_layout=None)
For explicit reporting, plot a 3d scatter graph (with markers).
Parameters
title (str ) – The title (metric) of the plot.
series (str ) – The series name (variant) of the reported scatter plot.
list ] scatter (Union [ numpy.ndarray , ) – The scatter data. list of (pairs of x,y,z), list of series [[(x1,y1,z1)…]], or numpy.ndarray
iteration (int ) – The reported iteration / step.
xaxis (str ) – The x-axis title. (Optional)
yaxis (str ) – The y-axis title. (Optional)
zaxis (str ) – The z-axis title. (Optional)
labels (list ( str ) ) – Labels per point in the data assigned to the
scatter
parameter. The labels must be in the same order as the data.mode (str ) – The type of scatter plot. The values are:
lines
,markers
,lines+markers
.For example:
scatter3d = np.random.randint(10, size=(10, 3))
model.report_scatter3d(title="example_scatter_3d", series="series_xyz", iteration=1, scatter=scatter3d,
xaxis="title x", yaxis="title y", zaxis="title z")fill (bool ) – Fill the area under the curve. The values are:
True
- FillFalse
- Do not fill (default)
comment (str ) – A comment displayed with the plot, underneath the title.
extra_layout (dict ) – optional dictionary for layout configuration, passed directly to plotly See full details on the supported configuration: https://plotly.com/javascript/reference/scatter3d/ example: extra_layout={‘xaxis’: {‘type’: ‘date’, ‘range’: [‘2020-01-01’, ‘2020-01-31’]}}
report_single_value
report_single_value(name, value)
Reports a single value metric (for example, total experiment accuracy or mAP)
Parameters
name (
str
) – Metric’s namevalue (
float
) – Metric’s value
Return type
None
report_surface
report_surface(title, series, matrix, iteration=None, xaxis=None, yaxis=None, zaxis=None, xlabels=None, ylabels=None, camera=None, comment=None, extra_layout=None)
For explicit reporting, report a 3d surface plot.
This method plots the same data as Model.report_confusion_matrix, but presents the data as a surface diagram not a confusion matrix.
surface_matrix = np.random.randint(10, size=(10, 10))
model.report_surface("example surface", "series", iteration=0, matrix=surface_matrix,
xaxis="title X", yaxis="title Y", zaxis="title Z")
Parameters
title (str ) – The title (metric) of the plot.
series (str ) – The series name (variant) of the reported surface.
matrix (numpy.ndarray ) – A heat-map matrix (example: confusion matrix)
iteration (int ) – The reported iteration / step.
xaxis (str ) – The x-axis title. (Optional)
yaxis (str ) – The y-axis title. (Optional)
zaxis (str ) – The z-axis title. (Optional)
xlabels (list ( str ) ) – Labels for each column of the matrix. (Optional)
ylabels (list ( str ) ) – Labels for each row of the matrix. (Optional)
camera (list ( float ) ) – X,Y,Z coordinates indicating the camera position. The default value is
(1,1,1)
.comment (str ) – A comment displayed with the plot, underneath the title.
extra_layout (dict ) – optional dictionary for layout configuration, passed directly to plotly See full details on the supported configuration: https://plotly.com/javascript/reference/surface/ example: extra_layout={‘xaxis’: {‘type’: ‘date’, ‘range’: [‘2020-01-01’, ‘2020-01-31’]}}
report_table
report_table(title, series, iteration=None, table_plot=None, csv=None, url=None, extra_layout=None)
For explicit report, report a table plot.
One and only one of the following parameters must be provided.
table_plot
- Pandas DataFrame or Table as list of rows (list)csv
- CSV fileurl
- URL to CSV file
For example:
df = pd.DataFrame({'num_legs': [2, 4, 8, 0],
'num_wings': [2, 0, 0, 0],
'num_specimen_seen': [10, 2, 1, 8]},
index=['falcon', 'dog', 'spider', 'fish'])
model.report_table(title='table example',series='pandas DataFrame',iteration=0,table_plot=df)
Parameters
title – The title (metric) of the table.
series – The series name (variant) of the reported table.
iteration – The reported iteration / step.
table_plot – The output table plot object
csv – path to local csv file
url – A URL to the location of csv file.
extra_layout – optional dictionary for layout configuration, passed directly to plotly See full details on the supported configuration: https://plotly.com/javascript/reference/layout/ example: extra_layout={‘height’: 600}
report_vector
report_vector(title, series, values, iteration=None, labels=None, xlabels=None, xaxis=None, yaxis=None, mode=None, extra_layout=None)
For explicit reporting, plot a vector as (default stacked) histogram.
For example:
vector_series = np.random.randint(10, size=10).reshape(2,5)
model.report_vector(title='vector example', series='vector series', values=vector_series, iteration=0,
labels=['A','B'], xaxis='X axis label', yaxis='Y axis label')
Parameters
title – The title (metric) of the plot.
series – The series name (variant) of the reported histogram.
values – The series values. A list of floats, or an N-dimensional Numpy array containing data for each histogram bar.
iteration – The reported iteration / step. Each
iteration
creates another plot.labels – Labels for each bar group, creating a plot legend labeling each series. (Optional)
xlabels – Labels per entry in each bucket in the histogram (vector), creating a set of labels for each histogram bar on the x-axis. (Optional)
xaxis – The x-axis title. (Optional)
yaxis – The y-axis title. (Optional)
mode – Multiple histograms mode, stack / group / relative. Default is ‘group’.
extra_layout – optional dictionary for layout configuration, passed directly to plotly See full details on the supported configuration: https://plotly.com/javascript/reference/layout/ example: extra_layout={‘showlegend’: False, ‘plot_bgcolor’: ‘yellow’}
set_all_metadata
set_all_metadata(metadata, replace=True)
Set metadata based on the given parameters. Allows replacing all entries or updating the current entries.
Parameters
metadata (
Dict
[str
,Dict
[str
,str
]]) – A dictionary of format Dict[key, Dict[value, type]] representing the metadata you want to setreplace (
bool
) – If True, replace all metadata with the entries in the metadata parameter. If False, keep the old metadata and update it with the entries in the metadata parameter (add or change it)
Return type
bool
Returns
True if the metadata was set and False otherwise
set_metadata
set_metadata(key, value, v_type=None)
Set one metadata entry. All parameters must be strings or castable to strings
Parameters
key (
str
) – Key of the metadata entryvalue (
str
) – Value of the metadata entryv_type (
Optional
[str
]) – Type of the metadata entry
Return type
bool
Returns
True if the metadata was set and False otherwise
system_tags
property system_tags
A list of system tags describing the model.
Return type
List
[str
]Returns
The list of tags.
tags
property tags
A list of tags describing the model.
Return type
List
[str
]Returns
The list of tags.
task
property task
Return the creating task ID
Return type
str
Returns
The Task ID (str)
url
property url
Return the url of the model file (or archived files)
Return type
str
Returns
The model file URL.