Task Plugins Collection#

Note

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

Artifacts#

mlflow.download_all_artifacts_in_run(run_id, ...)

Downloads an artifact file or directory from a previous MLFlow run.

mlflow.upload_data_frame_artifact(...[, ...])

Uploads a DataFrame as an artifact of the active MLFlow run.

mlflow.upload_directory_as_tarball_artifact(...)

Archives a directory and uploads it as an artifact of the active MLFlow run.

mlflow.upload_file_as_artifact(artifact_path)

Uploads a file as an artifact of the active MLFlow run.

utils.extract_tarfile(filepath[, ...])

Extracts a tarball archive into the current working directory.

utils.make_directories(dirs)

Creates directories if they do not exist.

Exceptions#

exceptions.UnsupportedDataFrameFileFormatError

The requested data frame file format is not supported.

Attacks#

fgm.create_adversarial_fgm_dataset(data_dir, ...)

Generates an adversarial dataset using the Fast Gradient Method attack.

Backend Configuration#

tensorflow.init_tensorflow(seed)

Initializes Tensorflow to ensure reproducibility.

Data#

tensorflow.create_image_dataset(data_dir, ...)

Yields an iterator for generating batches of real-time augmented image data.

tensorflow.get_n_classes_from_directory_iterator(ds)

Returns the number of unique labels found by the DirectoryIterator.

Estimators#

keras_classifiers.init_classifier(...[, loss])

Initializes an untrained neural network image classifier for Tensorflow/Keras.

methods.fit(estimator[, x, y, fit_kwargs])

Fits the estimator to the given data.

methods.predict(estimator[, x, predict_kwargs])

Uses the estimator to make predictions on the given input data.

Available Estimators#

keras_classifiers.shallow_net(input_shape, ...)

Builds an untrained shallow neural network architecture for Tensorflow/Keras.

keras_classifiers.le_net(input_shape, n_classes)

Builds an untrained LeNet-5 neural network architecture for Tensorflow/Keras.

keras_classifiers.alex_net(input_shape, ...)

Builds an untrained AlexNet neural network architecture for Tensorflow/Keras.

Metrics#

distance.get_distance_metric_list(request)

Gets multiple distance metric functions from the registry.

distance.get_distance_metric(func)

Gets a distance metric function from the registry.

performance.get_performance_metric_list(request)

Gets multiple performance metric functions from the registry.

performance.get_performance_metric(func)

Gets a performance metric function from the registry.

Available Metrics#

distance.l_inf_norm(y_true, y_pred)

Calculates the L norm between a batch of two matrices.

distance.l_1_norm(y_true, y_pred)

Calculates the L1 norm between a batch of two matrices.

distance.l_2_norm(y_true, y_pred)

Calculates the L2 norm between a batch of two matrices.

distance.paired_cosine_similarities(y_true, ...)

Calculates the cosine similarity between a batch of two matrices.

distance.paired_euclidean_distances(y_true, ...)

Calculates the Euclidean distance between a batch of two matrices.

distance.paired_manhattan_distances(y_true, ...)

Calculates the Manhattan distance between a batch of two matrices.

distance.paired_wasserstein_distances(...)

Calculates the Wasserstein distance between a batch of two matrices.

performance.accuracy(y_true, y_pred, **kwargs)

Calculates the accuracy score.

performance.roc_auc(y_true, y_pred, **kwargs)

Calculates the Area Under the Receiver Operating Characteristic Curve (ROC AUC).

performance.categorical_accuracy(y_true, y_pred)

Calculates the categorical accuracy.

performance.mcc(y_true, y_pred, **kwargs)

Calculates the Matthews correlation coefficient.

performance.f1(y_true, y_pred, **kwargs)

Calculates the F1 score.

performance.precision(y_true, y_pred, **kwargs)

Calculates the precision score.

performance.recall(y_true, y_pred, **kwargs)

Calculates the recall score.

Exceptions#

exceptions.UnknownDistanceMetricError

The requested distance metric could not be located.

exceptions.UnknownPerformanceMetricError

The requested performance metric could not be located.

Random#

rng.init_rng([seed])

Constructs a new random number generator.

sample.draw_random_integer(rng[, low, high])

Returns a random integer from low (inclusive) to high (exclusive).

sample.draw_random_integers(rng[, low, ...])

Returns random integers from low (inclusive) to high (exclusive).

Registry#

art.load_wrapped_tensorflow_keras_classifier(...)

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

mlflow.add_model_to_registry(active_run, ...)

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

mlflow.get_experiment_name(active_run)

Gets the name of the experiment for the current run.

mlflow.load_tensorflow_keras_classifier(...)

Loads a registered Keras classifier.

Tracking#

mlflow.log_metrics(metrics)

Logs metrics to the MLFlow Tracking service for the current run.

mlflow.log_parameters(parameters)

Logs parameters to the MLFlow Tracking service for the current run.

mlflow.log_tensorflow_keras_estimator(...)

Logs a Keras estimator trained during the current run to the MLFlow registry.