Managing Model Code with Git


The MI Lab supports the integration of JupyterLab and Git. You can manage the model codes through Git. Specifically, you can clone the files saved in Git to JupyterLab for running purpose, and also can synchronize the files modified in JupyterLab to Git.

Prerequisites

The model codes have been saved to the Git project, and your Git account has corresponding access permissions.

Cloning Git Project to JupyterLab

You can complete the Git source configuration in JupyterLab, and clone the Git project to JupyterLab by following these steps:

  1. Open the list of notebook instances in MI Lab.

  2. In the notebook instance table, click the Enter icon of the target notebook instance to open JupyterLab.

  3. Click the Clone Git icon in the toolbar above the File Browser on the left side of the page to open the Git source configuration window.

    ../_images/configuring_git_repo.png
  4. In the Git Source Configuration window, enter the Git repository URL for cloning the model training source files, and click CLONE.

  5. Enter your Git account and password, click OK, and the directories and files in the Git project will be cloned into the File Browser.

    ../_images/cloned_source_files.png

Submitting Updated Codes to the Git Project

After updating the model training codes in JupyterLab, you can push the codes to the Git repository by following these steps:

  1. Click the Git icon in the toolbar on the left side of the page to open Git-related operation items.

  2. View the current repository name, branch name, and updated files.

  3. Click the Push Committed Changes icon above the operation item to submit the updated file to the Git repository.

    ../_images/push_committed_changes.png