Skip to content

Source Tracking

Overview

Source tracking allows you to investigate the code used for running the experiment.

Source tracking automatically connects the revision of the code to the experiment. This connection is made without having to actually copy the code to MissingLink servers. Once you have source tracking active on your experiments, you can view the actual code from the experiment and also compare the code changes between experiments.

The following image shows the panes below the Overview tab of an experiment that uses code. The link under Source Tracking is to a Git repository.

Step 1

Source tracking integrates with all common Git repositories: GitHub, Bitbucket, GitLab, Git LFS, and others.

There are two source tracking modes:

  • Simplified: Assumes that the code is committed to your source control repository before the experiment begins to run. Assuming that you use git, this feature is active by default.
  • Advanced: In addition to the capabilities it provides in simplified mode, it can also track changes that are not committed to source control.

Prerequisites for advanced source tracking

To use the advanced source tracking feature, ensure you have met the following criteria:

  • Your experiment is running within a directory tracked by Git.
  • You have set up an additional Git repository (the "tracking repository")

Setup

Using MissingLink CLI, you can set up code tracking using the following command:

ml code track  --source-repository=https://github.mock/myorg/myrepo [email protected]:myorg/myrepo_tracking.git
  • Both http[s]:// and git schemes are supported.
  • The mapping is available to any project started by an owner with access to the specified ORG.
  • The tracking is enabled for every future experiment.

Warning

When setting up tracking using the MissingLink CLI, both repositories MUST belong to the same organization. In the above example, an attempt to run [email protected]:notmyorg/myrepo_tracking.git could yield an error.

Using source directory

Instead of using the MissingLink CLI, create a file called .ml_tracking_repo in the root folder of your Git repository. Use the following commands:

~/myrepo$ cat .ml_tracking_repo
[email protected]:notmyorg/myrepo_tracking.git
  • Both http[s]:// and git schemes are supported.
  • There is no restriction regarding organization of tracking repositories.
  • The tracking is enabled if the file is present when the experiment starts.