Skip to content

Setting up Code Tracking in MissingLink

In order to run a new job using MissingLink's resource management, you will be required to provide the job with a Git repository.

There are three general steps in setting up MissingLink's source tracking:

  • Create a new Git repository for code tracking.
  • Create a .ml_tracking_repo file in the root folder project with the repository URL.
  • Ensure you have SSH access to GitHub or Bitbucket.

Details for performing these steps in GitHub and Bitbucket are provided below.

GitHub

For the purposes of this example, let's assume your project's repository is [email protected]:your_org/mnist.git.

Create a new repository

  1. Go to: https://github.com/new.
  2. Specify your organization as the owner.

    We recommend you name the repository using the same name as the main repository you're working on, with a _tracking suffix. For example, for mnist, name it mnist_tracking.

  3. Click Create repository. After the repository is created, in the repository page click Clone or download.

  4. Select Use SSH.
  5. Copy the repository SSH URL.

    It should look like this: [email protected]:<your_org>/mnist_tracking.git

  6. Go to the root folder of your main repository, meaning mnist.

  7. Create a new file called .ml_tracking_repo and paste the tracking repository URL into it, like so: [email protected]:your_org/mnist_tracking.git.

Ensure you have SSH access to GitHub

  1. In the terminal, run: ssh -T [email protected].

    You should see:

    Hi username! You've successfully authenticated, but GitHub does not provide shell access.

  2. In case you see this error: Error: Permission denied, you'll need to add your SSH key to GitHub. See the next section for details.

Add your SSH key to GitHub

In the event you do not yet have an SSH key, follow the guide on how to generate a new SSH key.

  1. Copy the SSH key to your clipboard by running one of the following commands:

    Mac

    pbcopy < ~/.ssh/id_rsa.pub

    Windows

    clip < ~/.ssh/id_rsa.pub

    OR and copy the output

    cat ~/.ssh/id_rsa.pub

  2. Go to: https://github.com/settings/ssh/new.

  3. Paste the SSH key you copied under the Key field.
  4. Click Add SSH key.

  5. In your terminal rerun: ssh -T [email protected], and you should see the You've successfully authenticated message.

That's it!

Run your experiment using: ml run xp.


Bitbucket

For the purposes of this example, let's assume your project's repository is [email protected]:your_org/mnist.git.

Create a new repository:

  1. Go to: https://bitbucket.org/repo/create.

    We recommend you name the repository using the same name as the main repository you're working on, with a _tracking suffix. For example, for mnist, name it mnist_tracking.

  2. Click Create repository. After the repository is created, in the repository page you should see the URL of your repository.

  3. Change the URL type to SSH (instead of HTTPS).
  4. Copy the repository SSH URL.

    It should look like this: [email protected]:your_org/mnist_tracking.git

  5. Go to your root folder of your main repository, meaning mnist.

  6. Create a new file called .ml_tracking_repo and paste the tracking repository URL into it, like so: [email protected]:your_org/mnist_tracking.git.

Ensure you have SSH access to Bitbucket

  1. In the terminal, run: ssh -T [email protected].

    You should see:

    Logged in as username

  2. In case you see this error: Error: Permission denied, you'll need to add your SSH key to Bitbucket. See the next section for details.

Add your SSH key to Bitbucket

In the event you do not yet have an SSH key, follow the guide on how to generate a new SSH key.

  1. Copy the SSH key to your clipboard by running one of the following commands:

    Mac

    pbcopy < ~/.ssh/id_rsa.pub

    Windows

    clip < ~/.ssh/id_rsa.pub

    OR and copy the output

    cat ~/.ssh/id_rsa.pub

  2. Go to your Bitbucket account setting: https://bitbucket.org/account.

  3. Go to SSH keys (under the SECURITY section).
  4. Click Add key.
  5. Paste the SSH key you copied under the Key field.
  6. Click Add key.

  7. In your terminal, rerun: ssh -T [email protected], and you should see the logged in as username message.

That's it!

Run your experiment using: ml run xp.