Prerequisites
- A SambaCloud account
- A SambaNova API key
- Python 3.8 or later
Installation
1
Create a virtual environment
Activate the virtual environment (
source .venv/bin/activate) each time you open a new terminal before running evaluations.2
Install dependencies
3
Set your SambaNova API key
Running evaluations
Before you can run your first evaluation, you’ll need to define a task in a Python script. Each task has three main components:- Dataset – the list of inputs and expected results
- Solver – how the model produces its outputs
- Scorer – how outputs are evaluated against the expected results
Example: Hello world
Save the following code into ahello_world.py file.
Llama-4-Maverick-17B-128E-Instruct model:
Viewing results
- Results are stored in the
logsdirectory. - Use the Inspect web UI for interactive viewing.
- You can also use the Inspect Visual Studio Code extension for easier log exploration.
Additional resources
- See the Inspect AI examples for more evaluation examples.
- For more details, see the official Inspect AI documentation.
Troubleshooting
ModuleNotFoundError: No module named 'inspect_ai'
ModuleNotFoundError: No module named 'inspect_ai'
Install with the virtual environment active:
pip install inspect-ai. Verify with pip show inspect-ai.Authentication error or model not found
Authentication error or model not found
Verify
SAMBANOVA_API_KEY is exported and the model ID is correct. See SambaCloud models.Evaluation fails with connection error
Evaluation fails with connection error
Check network access to
api.sambanova.ai. Confirm the API key is valid at the SambaNova API dashboard.
