AI2 Tango replaces messy directories and spreadsheets full of file versions by organizing experiments into discrete steps that can be cached and reused throughout the lifetime of a research project.
Create a Tango step:
# hello.py
from tango import step
@step()
def hello(name: str) -> str:
message = f"Hello, {name}!"
print(message)
return message
And create a corresponding experiment configuration file:
// hello.jsonnet
{
steps: {
hello: {
type: "hello",
name: "World",
}
}
}
Then run the experiment using a local workspace to cache the result:
tango run hello.jsonnet -w /tmp/workspace
You'll see something like this in the output:
Starting new run expert-llama
● Starting step "hello"...
Hello, World!
✓ Finished step "hello"
✓ Finished run expert-llama
If you run this a second time the output will now look like this:
Starting new run open-crab
✓ Found output for step "hello" in cache...
✓ Finished run open-crab
You won't see "Hello, World!" this time because the result of the step was found in the cache, so it wasn't run again.
For a more detailed introduction check out the First Steps walk-through.
ai2-tango requires Python 3.8 or later.
ai2-tango is available on PyPI. Just run
pip install ai2-tango
To install with a specific integration, such as torch
for example, run
pip install 'ai2-tango[torch]'
To install with all integrations, run
pip install 'ai2-tango[all]'
ai2-tango is available on conda-forge. You can install just the base package with
conda install tango -c conda-forge
You can pick and choose from the integrations with one of these:
< 9C04 div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="conda install tango-datasets -c conda-forge conda install tango-torch -c conda-forge conda install tango-wandb -c conda-forge">conda install tango-datasets -c conda-forge conda install tango-torch -c conda-forge conda install tango-wandb -c conda-forge