Integrations

Keras

class verta.integrations.keras.VertaCallback(run)

Keras callback that automates logging to Verta during model training.

This callback logs details about the network topology, training hyperparameters, and loss and accuracy during fitting.

See our GitHub repository for an example of this intergation in action.

New in version 0.13.20.

Parameters:run (ExperimentRun) – Experiment Run tracking this model.

Examples

from verta.integrations.keras import VertaCallback
run = client.set_experiment_run()
model.fit(
    X_train, y_train,
    callbacks=[VertaCallback(run)],
)

scikit-learn

module verta.integrations.sklearn

scikit-learn dynamic patch that automates logging to Verta during training.

This patch adds a run parameter to the fit() methods of most scikit-learn models, and logs the model’s hyperparameters.

See our GitHub repository for an example of this intergation in action.

New in version 0.13.20.

Examples

import verta.integrations.sklearn
run = client.set_experiment_run()
model = sklearn.linear_model.LogisticRegression()
model.fit(X, y, run=run)

TensorFlow

class verta.integrations.tensorflow.VertaHook(run, every_n_steps=1000)

TensorFlow Estimator hook that automates logging to Verta during model training.

This hook logs loss during training.

This hook has been verified to work with the TensorFlow 1.X API.

New in version 0.13.20.

Parameters:
  • run (ExperimentRun) – Experiment Run tracking this model.
  • every_n_steps (int, default 1000) – How often to log summary metrics.

Examples

from verta.integrations.tensorflow import VertaHook
run = client.set_experiment_run()
estimator.train(
    input_fn=train_input_fn,
    hooks=[VertaHook(run)],
)
verta.integrations.tensorflow.log_tensorboard_events(run, log_dir)

Function that collects and logs TensorBoard-compatible events to an Experiment Run.

This integration logs scalars that have been written as TensorFlow summaries.

This integration has been verified to work with TensorFlow >=1.14 and 2.X.

See our GitHub repository for an example of this intergation in action.

Parameters:
  • run (ExperimentRun) – Experiment Run.
  • log_dir (str) – Directory containing TensorBoard-compatible event files.

Examples

from verta.integrations.tensorflow import log_tensorboard_log_dir
run = client.set_experiment_run()
# log summary event files to `log_dir` during model operations
# see https://www.tensorflow.org/tensorboard/get_started
log_tensorboard_events(run, log_dir)

PyTorch

verta.integrations.torch.verta_hook(run)

PyTorch module hook that automates logging to Verta during training.

This hook logs details about the network topology.

See our GitHub repository for an example of this intergation in action.

New in version 0.13.20.

Parameters:run (ExperimentRun) – Experiment Run tracking this model.

Examples

from verta.integrations.torch import verta_hook
run = client.set_experiment_run()
model.register_forward_hook(verta_hook(run))
output = model(X_train)

XGBoost

verta.integrations.xgboost.verta_callback(run)

XGBoost callback that automates logging to Verta during booster training.

This callback logs eval_metrics passed into xgb.train().

See our GitHub repository for an example of this intergation in action.

New in version 0.13.20.

Parameters:run (ExperimentRun) – Experiment Run tracking this model.

Examples

from verta.integrations.xgboost import verta_callback
run = client.set_experiment_run()
run.log_hyperparameters(params)
bst = xgb.train(
    params, dtrain,
    evals=[(dtrain, "train")],
    callbacks=[verta_callback(run)],
)