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
- Go to: https://github.com/new.
-
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, formnist
, name itmnist_tracking
. -
Click Create repository. After the repository is created, in the repository page click Clone or download.
- Select Use SSH.
-
Copy the repository SSH URL.
It should look like this:
[email protected]:<your_org>/mnist_tracking.git
-
Go to the root folder of your main repository, meaning
mnist
. - 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
-
In the terminal, run:
ssh -T [email protected]
.You should see:
Hi username! You've successfully authenticated, but GitHub does not provide shell access.
-
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.
-
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
- Paste the SSH key you copied under the Key field.
-
Click Add SSH key.
-
In your terminal rerun:
ssh -T [email protected]
, and you should see theYou'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:
-
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, formnist
, name itmnist_tracking
. -
Click Create repository. After the repository is created, in the repository page you should see the URL of your repository.
- Change the URL type to SSH (instead of HTTPS).
-
Copy the repository SSH URL.
It should look like this:
[email protected]:your_org/mnist_tracking.git
-
Go to your root folder of your main repository, meaning
mnist
. - 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
-
In the terminal, run:
ssh -T [email protected]
.You should see:
Logged in as username
-
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.
-
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
-
Go to your Bitbucket account setting: https://bitbucket.org/account.
- Go to SSH keys (under the SECURITY section).
- Click Add key.
- Paste the SSH key you copied under the Key field.
-
Click Add key.
-
In your terminal, rerun:
ssh -T [email protected]
, and you should see thelogged in as username
message.
That's it!
Run your experiment using: ml run xp
.