Skip to main content

ML profiling tool for OptScale

Project description

Arcee

The OptScale ML profiling tool by Hystax

Arcee is a tool that helps you to integrate ML tasks with OptScale. This tool can automatically collect executor metadata from cloud and process stats.

Installation

Arcee requires python 3.7+ to run.

pip install optscale-arcee

Usage

First of all you need to import and init arcee in your code:

import optscale_arcee as arcee
# init arcee using context manager syntax
with arcee.init('token', 'task_key'):
    # some code

To use custom endpoint and enable\disable ssl checks (supports using self-signed ssl certificates):

with arcee.init('token', 'task_key', endpoint_url='https://my.custom.endpoint:443/arcee/v2', ssl=False):
    # some code

Alternatively arcee can be initialized via function call. However manual finish is required:

arcee.init('token', 'task_key')
# some code
arcee.finish()

Or in error case:

arcee.init('token', 'task_key')
# some code
arcee.error()

To send stats:

arcee.send({"loss": 2.0012, "iter": 2, "epoch": 1})

(key should be string, value - int or float, multiple values can be sent)

To add tags to model run (key, value):

arcee.tag("project", "torchvision demo")

To add milestones:

arcee.milestone("Download test data")

To add stages:

arcee.stage("calculation")

To add hyperparameters:

arcee.hyperparam("epochs", 5)

Logging datasets

To log a dataset, use the dataset method with the following parameter:

  • path (str): the path of the dataset.
  • name (str): the name of the dataset.
  • description (str): the description of the dataset.
  • labels (list): the list of labels of the dataset.
arcee.dataset("https://s3/ml-bucket/datasets/training_dataset.csv",
              name="Training dataset",
              description="Training dataset (100k rows)",
              labels=["training", "100k"])

Models

To create a model, use the model method with the following parameters:

  • key (str): the unique key of the model
  • path (str): the path of the run model
arcee.model("my_model", "/home/user/my_model")

To set a custom model version, use the model_version method with the following parameter:

  • version (str): version name
arcee.model_version("1.2.3-release")

To set a model version alias, use the model_version_alias method with the following parameter:

  • alias (str): alias name
arcee.model_version_alias("winner")

To add tags to model version (key, value):

arcee.model_version_tag("env", "staging demo")

Artifacts

To create an artifact, use the artifact method with the following parameters:

  • path (str): the path of the run artifact
  • name (str): the name of the artifact
  • description (str): the description of the artifact
  • tags (str): the tags of the artifact in format {"key": "value"}
arcee.artifact("https://s3/ml-bucket/artifacts/AccuracyChart.png",
               name="Accuracy line chart",
               description="The dependence of accuracy on the time",
               tags={"env": "staging"})

To add tags to existing artifact (path, key, value):

arcee.artifact_tag("https://s3/ml-bucket/artifacts/AccuracyChart.png",
                   "env", "staging demo")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

optscale_arcee-0.1.42.tar.gz (20.9 kB view details)

Uploaded Source

File details

Details for the file optscale_arcee-0.1.42.tar.gz.

File metadata

  • Download URL: optscale_arcee-0.1.42.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for optscale_arcee-0.1.42.tar.gz
Algorithm Hash digest
SHA256 f272153243c4eb25785e28fde2eb7364c577d4e8618085623b94fc8bd318371a
MD5 2a96490ce4c78f18d507ef06838d8641
BLAKE2b-256 999c41221076447c05757e0b58a683fa6f21cb19a9b92dcc516f515bcb78241d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page