The AETROS Python SDK is an addition to the Job API. You can call
all available Job APIs directly using Python and have some more flexibility. This works only when your application
is written in Python.
It is a collection of useful Python libraries and functions, you can use to send more information to the job view.
You can send the progress, custom metrics (shown as interactive graphs), a KPI, images, text logs or files, like you can do with STDOUT API but using that Python SDK, you can
call the methods directly, instead of printing commands to the stdout.
Make sure, your script already runs using
aetros run by reading the general Trainer Getting Started chapter.
pip install --upgrade pip setuptools
pip install aetros
aetrosis installed in your Docker image as well.
We assume, you're in a folder where you have a
model.py and that you can execute it with
aetros run --local 'python model.py'.
Per default, you see in the job view of AETROS Trainer the regular information like elapses time, log output and hardware utilization.
You see however always an empty progress wheel. To change that you need to use our SDK. You usually want to track the progress of your model,
you usually print information to stdout and create images you analyse when the process ended. With the SDK you can still do this, however
you can use methods like
JobBackend:progress(epoch=1, total=100) to visualize more information.
To use our SDK, you simply have to import
job = aetros.backend.context() and use
as you wish. See on the left navigation examples about what you can send and retrieve.
Start the script as you already know from the Trainer Getting Started chapter.
This is the most basic integration of the AETROS Python SDK. You always need to call
aetros.backend.context(). After this call you can start creating channels, sending log and update the progress. See examples in their documentation at the left navigation.
A more sophisticated integration could look like:
See at the left all sub sections of Python SDK to see how you can interact with AETROS Trainer within your model.