Job outputs
Jobs often produce output files such as checkpoints, images, or logs. These artifacts are automatically managed and aggregated by the Lightning AI platform, ensuring seamless access and organization.
How artifacts are written by a job and read back afterwards depends on the compute environment the job runs in.
Studio Jobs
Writing artifacts
A Studio job runs from your home directory, so just write your output files there — the current directory (./), your home (~/), and the LIGHTNING_ARTIFACTS_DIR environment variable all point at the same place. Any file the job creates or modifies under home during the run is captured as an artifact.
# anywhere in your job script — files written under home are collected as artifacts
with open("results.txt", "w") as f:
f.write("accuracy: 0.98\n")A job cannot modify the live Studio's filesystem, so these outputs do not reappear in the Studio's home — they surface under /teamspace/jobs/<job_name> instead, appearing there (after a short delay) while the job runs.
Reading artifacts
All artifacts from a Studio job are stored on the Teamspace drive. Artifacts include training logs and model checkpoints. These outputs are automatically available and can be accessed by any Studio for further analysis or reuse in future workflows.
Access them in any Studio or other Studio jobs via the Teamspace drive in the directory named /teamspace/jobs/<job_name>. Everything the job produced sits directly in that folder.
Note: a job's files used to sit one folder deeper, in an artifacts subdirectory. If you have scripts or notebooks that read from the old path, drop that segment:
| Before | Now |
|---|---|
/teamspace/jobs/my-job/artifacts |
/teamspace/jobs/my-job |
/teamspace/jobs/my-job/artifacts/checkpoints/last.ckpt |
/teamspace/jobs/my-job/checkpoints/last.ckpt |
The Studio path now matches the Drive path, so /teamspace/jobs/my-job/<file> and lit://<org>/<teamspace>/jobs/my-job/<file> address the same file.
If you are using PyTorch Lightning, it stores all training artifacts in a directory named lightning_logs/version_<number> which will be located in the job's folder. This directory contains the model checkpoints in the checkpoints directory, and a tensorboard training log file for the training run.
Docker Jobs
Artifacts from jobs submitted via Docker are currently supported in early access. If you’re interested in this feature, contact us for more details!
Was this page helpful?
Thanks for the feedback.