Skip to content

Experiment Id and Model Weights Hash Retrieval - All Supported Frameworks

Overview

Some API functions, such as external metrics and external charts, allow addition of data to past experiments.

To specify which experiments you wish to add data to, you'll need either the id of the experiment or the model weights hash belonging to a model in that experiment.

Getting the id of the running experiment

Experiment id is a unique identifier for an experiment that is provided by MissingLink at runtime. Get it using the following:

    experiment_id= callback.experiment_id

Note

experiment_id is set only while the experiment is running.

Getting the model weights hash at a given point

Models weights hash provides a convenient way to refer not only to an experiment but to a specific checkpoint within the experiment. When using model_weights_hash as an identifier for API calls, all experiments and checkpoints that have this model_weights_hash are updated.

    model_weights_hash = callback.calculate_weights_hash(model)

Warning

The hash is based only on the state of your models weights when calculated and in some cases, may not be unique within the experiment. MissingLink allows model_weights_hash to be registered to only one checkpoint per experiment.