π§ What is Nbox?
nbox
provides first class support API for all NimbleBox.ai infrastructure (NBX-Build, Jobs, Deploy) and services (NBX-Workspaces) components. Write jobs using nbox.Operators
π€· Why NimbleBox
- Write and execute code in Python
- Document your code that supports mathematical equations
- Create/Upload/Share notebooks
- Import notebooks from your local machine
- Import/Publish notebooks from/to GitHub
- Import external datasets (e.g. from Kaggle)
- Integrate PyTorch, TensorFlow, Keras, OpenCV
- Share your projects
- Collaborate with your team
π Features
ποΈ Freedom To Build
π¦Ύ Automate with Ease
π Intuitive Dashboard
π Get Started
Install the package from pipy:
pip install nbox
For convinience you should add nbox to your path by setting up an alias. Throughout the rest of the documentation we will be using nbx as the CLI:
alias nbx="python3 -m nbox"
When loading nbox for the first time, it will prompt you the username and password and create a secrets file at ~/.nbx/secrets.json.
This file then contains all the information that you donβt have to fetch manually again.
APIs
Our APIs are deep, user functions are kept to minimum and most relavant. This documentation contains the full spec of everything, but hereβs all the APIs you need to know:
nbox
βββ Model # Framework agnostic Model
β βββ __call__
β βββ deploy
β βββ train_on_instance (WIP)
β βββ train_on_jobs (WIP)
βββ Operators # How jobs are combinations of operators
β βββ __call__
β βββ deploy
βββ Jobs # For controlling all your jobs
β βββ logs # stream logs right on your terminal
β βββ trigger # manually trigger a job
βββ Instance
βββ __call__ # Run any command on the instance
βββ mv (WIP) # Move files to and from NBX-Build
NBX-Jobs and NBX-Deploy
Create a simple folder:
nbx jobs new moonshot
Run any Batch Process
Add the following code to foobar.py
:
from nbox import operator, Operator
from nbox.lib.shell import ShellCommand
# define your function and wrap it as an operator
@operator()
def foo(x: Dict):
return "bar"
# or use OOPs like torch, etc.
class MyJob(Operator):
def __init__(self):
super().__init__()
self.foo = foo
self.shell = ShellCommand("echo 'hello {text}'")
def forward(self):
text = self.foo()
self.shell(text = text)
How to get help?
Join our discord and someone from our community or engineering team will respond!
π Read our Blog.
𧩠License
The code in thist repo is licensed as Apache License 2.0. Please check for individual repositories for licenses.