Giter Club home page Giter Club logo

nimbleboxai / nbox Goto Github PK

View Code? Open in Web Editor NEW
88.0 4.0 13.0 65.24 MB

The official python package for NimbleBox. Exposes all APIs as CLIs and contains modules to make ML 🌸

Home Page: https://nimblebox.ai/docs/nbox/start

License: Apache License 2.0

Python 98.61% Jinja 1.39%
data-science machine-learning ml-infrastructure ml-platform ml-service mlops mlops-pipeline mlops-workflow model-deployment model-management model-monitoring model-serving practical-mlops mlops-automation mlops-tool

nbox's Introduction

PyPI - Python Version Downloads GitHub

🧐 What is Nbox?

nbox provides first class CLI + python package support for all NimbleBox infrastructure and services. You can

# on macos find the correct wheel file based on python version: https://github.com/pietrodn/grpcio-mac-arm-build/releases/tag/1.51.1
pip install <wheel_url>

pip install nbox

Next you need to authenticate yourself with the CLI:

nbx login

Stability and Compatibility

Status: The library is currently undergoing heavy development.

  • nbx projects:
    • nbx projects - artifacts --help stable βœ…
    • nbx projects - run --help stable βœ…
  • nbx jobs --help: mostly stable 🟑
  • nbx serve --help: mostly stable 🟑

🀷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

πŸš€ Startup Program

image

If you're a new startup with(<$1M raised,<3 years since founded) then you're in luck to be the part of our startup program!

Get $420k worth of deals on your favorite tools

🎚 Features

πŸ—οΈ Freedom To Build

Build Landing Page (2)

🦾 Automate with Ease

Jobs Landing Page

πŸš€ Intuitive Dashboard

Deploy Landing Page

🏁 Get Started

Install the package from pypi:

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

Deploy and run any model

Let's take this script as an example

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 OO to deploy an API
@operator()
class Baz():
  def __init__(self, power: int = 2):
    # load any model that you want
    self.model = load_tf_pt_model()
    self.power = power
  
  def forward(self, x: float = 1.0):
    return {"pred": x ** self.power}    

Through your CLI:

# to deploy a job
nbx jobs upload file:foo 'my_first_job'

# to deploy an API
nbx serve upload file:Baz 'my_first_api'

πŸ›Ÿ 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.