nbox.network
Network functions are gateway between NBX-Services.
If you find yourself using this reach out to NimbleBox support.
But for the curious mind, many of our services work on gRPC and Protobufs. This network.py manages the quirkyness of our backend and packs multiple steps as one function.
Functions
- init_folder -
Path to the code
- serving_name -
Name of the serving
- model_name -
Name of the model
- serving_id -
Serving ID. Defaults to None.
- workspace_id -
Workspace ID. Defaults to None.
- resource -
Resource. Defaults to None.
- wait_for_deployment -
Wait for deployment. Defaults to False.
- model_metadata -
Model metadata. Defaults to {}.
- exe_jinja_kwargs -
Jinja kwargs. Defaults to {}.
Use the NBX-Deploy Infrastructure
- init_folder -
Name the folder to zip
- job_id_or_name -
Name or ID of the job
- dag -
DAG to upload
- workspace_id -
Workspace ID to deploy to, if not specified, will use the personal workspace
- schedule -
If
None
will run only once, else will schedule the job - cache_dir -
Folder where to put the zipped file, if
None
will betempdir
Upload code for a NBX-Job.
Returns:
Job
: Job object
- init_folder -
The folder that contains the files to be zipped
- id -
The id of the job or serving
- workspace_id -
The workspace id of the job or serving
- type -
The type of the job or serving, comes from nbxlib.operator_spec.OT_TYPE
- files_to_copy -
A dictionary of source to target filepaths to copy to the zip file. Defaults to {}.
- **jinja_kwargs -
Any additional arguments to be passed to the jinja template
This function creates the zip file that is ulitimately uploaded to NBX-Serving or NBX-Jobs.