Skip to content

[TECH-51][TECH-153][TECH-154] Bundle files for notebook submissions

jyotish requested to merge TECH-51/colab-submission-bundling into master

The notebook submissions also need a few additional files (typically saved trained model weights) along with the ipynb notebook file. For this, we can create a zip file containing the notebook and an assets directory specified by the user in the notebook. The CLI needs the user to define a class AIcrowdConfig and the assets directory can be defined here.

Example

Consider the case where the user has trained a network and saved the weights to some_dir/model.h5. First, these weights will be copied to the user's GDrive.

Configuration

At the top of the notebook

class AIcrowdConfig:
    ASSETS_DIR = "some_dir"

Saving assets

To save the model weights to GDrive,

aicrowd submission save-assets -c mnist

Loading assets

In a new notebook, the user can run the following to load the saved weights,

aicrowd submission load-assets -c mnist

Creating a submission

To make a submission,

aicrowd submission create -c mnist --colab

Note:

  • save-assets and load-assets work only on Google Colab.
  • If making a submission regular jupyter notebook, the submission command will be aicrowd submission create -c mnist --jupyter
Edited by jyotish

Merge request reports