Spectral CLI
Introduction
The Spectral Command-Line Interface (CLI) provides a text-based interface, allowing Modelers to interact with Spectral directly from the command line. This approach streamlines data fetching and submission tasks.
Official link on the Python Package Index: https://pypi.org/project/spectral-cli/
Spectral CLI natively handles all interactions with Spectral's infrastructure (smart contracts and IPFS) in order to:
download training dataset from IPFS,
generate all necessary artifacts for zkML operations from a machine learning model's ONNX file,
commit to using a machine learning model through generating all the required artifacts for zkML operations based on a final model's ONNX file (aka. ML model commitment),
upload ML model commitment to IPFS and smart contracts,
download testing dataset from IPFS,
make a submission by uploading the CSV file containing the inferences generated by the Modeler's machine learning model to IPFS and smart contracts.
All operations will be performed on the Modeler's local machine before being uploaded to IPFS or smart contracts.
Ensure your Python version is at least 3.11.6 and your pip is up to date.
Installs the Spectral CLI.
Submits a model commitment given two files (onnx and json) to a specific challenge. See Step 6.
Generates a json file that enables one to follow the optional Discord instructions from Step 6.
Configures your Spectral CLI and generates a Spectral CLI wallet. See Step 5.
Fetches testing data for a specific challenge. See Step 7.
Fetches training data for a specific challenge. See Step 3.
Lists the CHALLENGE_ID for each Challenge.
Returns multisig wallet address (which is generated after first part of Step 6), your Spectral API key, your Alchemy API key, your Spectral CLI wallet address, and your Spectral CLI wallet's private key (only available to you on your local machine). Except the multisig wallet address, the rest should have values after Step 5.
Returns your Spectral CLI wallet address.
Makes the final submission for a specific challenge.
Last updated