nimblebox logo
Docs
v3.3.1b

Projects Quickstart

Here's the code for this specimen on Github

This is a simple quick start on how to use NimbleBox projects, you can then extend this to your own projects. In this code:

Load dataset on ArtifactsArtifacts is our file system to track and retrieve all the file like model weights, config files, datasets, etc. all of it is built into the tracker.
Run experiment on cloudNBX-Jobs can run any computation and show beautiful logs with powerful JSON logging. You can define the resources you need and that's all you have to do.Read more
Track on dashboardVisualise your training metrics with charts and tables, recreate exactly where you left off and compare to make decisions.Read more
Store the modelThe tracker will automatically store all the saved files on Artifacts, it automatically indexes it so you can access it anywhere, anytime.Read more
🏗️ Serve as an APIOnce ready you can serve your model over an API and track the performance and behaviour of the serving.

🍇 Step 1: Create a new Project

Go to NimbleBox dashboard and click on "New Project" button to create your project. Once complete, open it and copy the project ID.

🍄 Step 2: Create sample data

You can think of your training data is a bunch of files and you want to provide them to your trainers. You can do that by uploading them to the artifacts or you can create a sample data and upload it to the artifacts. Below is the way we can do that:

Code
DatasetAccess Patterns

Next we will upload the data to the project, open upload.py and update the project_id with the one you copied in the previous step. Then run the following command, update the project_id with the one you copied in the previous step:

Shell
Loading...

You can open your project and click on Artifacts to see the uploaded data at datasets/data_1000_5.csv.

🍉 Step 3: Run the experiment

Next we will run the experiment on the cloud, this requires that you have downloaded the folder here which contains the trainer file along with requirements.txt file.

Performing multiple experiments
Code explanationBehind the APIs

The file trainer.py contains a simple function called train_model that takes in some simple arguments like learning rate (lr), number of training steps n_steps. You can see a more detailed explaination in the next sections. This is our training function we want to run, so here's our requirements:

  • Run the function many times with different inputs and track the results
  • Chose the hardware resources of your choice
Shell
Loading...

You can also pass in the kubernetes style --resource_disk_size "10Gi" to increase the disk size of the pod. Run nbx projects --id '_pid_' - run --help to get more information on the available options. Or you can configure the resources from the Settings section.

🍍 Step 4: Serving the API

🏗️ We are working on this, come back later for more updates

🥂 Bottomline

We hope you enjoyed this tutorial on how you can run your end to end MLOps pipeline on top of NimbleBox. We are constantly working on making this better and more powerful.

nbox SDKnbox provides built in access to all the APIs and packages them in the most user friendly manner.Star 0