registry#

Note

See the Glossary for the meaning of the acronyms used in this guide.

art.py#

A task plugin module for interfacing the Adversarial Robustness Toolbox with the MLFlow model registry.

load_wrapped_tensorflow_keras_classifier(name: str, version: int, classifier_kwargs: Optional[Dict[str, Any]] = None) art.estimators.classification.KerasClassifier[source]#

Loads and wraps a registered Keras classifier for compatibility with the Adversarial Robustness Toolbox.

Parameters
  • name – The name of the registered model in the MLFlow model registry.

  • version – The version number of the registered model in the MLFlow registry.

  • classifier_kwargs – A dictionary mapping argument names to values which will be passed to the KerasClassifier constructor.

Returns

A trained KerasClassifier object.

mlflow.py#

A task plugin module for using the MLFlow model registry.

add_model_to_registry(active_run: mlflow.entities.Run, name: str, model_dir: str) Optional[mlflow.entities.model_registry.ModelVersion][source]#

Registers a trained model logged during the current run to the MLFlow registry.

Parameters
  • active_run – The mlflow.ActiveRun object managing the current run’s state.

  • name – The registration name to use for the model.

  • model_dir – The relative artifact directory where MLFlow logged the model trained during the current run.

Returns

A ModelVersion object created by the backend.

get_experiment_name(active_run: mlflow.entities.Run) str[source]#

Gets the name of the experiment for the current run.

Parameters

active_run – The mlflow.ActiveRun object managing the current run’s state.

Returns

The name of the experiment.

load_tensorflow_keras_classifier(name: str, version: int) tensorflow.keras.models.Sequential[source]#

Loads a registered Keras classifier.

Parameters
  • name – The name of the registered model in the MLFlow model registry.

  • version – The version number of the registered model in the MLFlow registry.

Returns

A trained tf.keras.Sequential object.