---
title: Complete Workflow
description: 'This tutorial covers a full experiment lifecycle:'
canonical: 'https://lightning.ai/docs/litlogger/stable/tutorials/complete_workflow'
---
# Complete Workflow {#complete-workflow}

This tutorial covers a full experiment lifecycle:

1. Initialize a run
2. Log metadata, metrics, and artifacts
3. Finalize
4. Reconnect later
5. Retrieve metadata and files

![Comparing experiment metrics with charts](https://pl-bolts-doc-images.s3.us-east-2.amazonaws.com/litlogger/experiment_comparison_charts.png)

## Train Script {#train-script}

```python
import json

import litlogger
from litlogger import File

config = {"model": "ResNet50", "lr": 0.001}
with open("config.json", "w") as f:
    json.dump(config, f)

experiment = litlogger.init(name="image-classifier")

# Set metadata
experiment["model"] = "ResNet50"
experiment["dataset"] = "CIFAR10"

# Log a static file
experiment["config"] = File("config.json")

# Log training metrics
for epoch in range(10):
    experiment["loss"].append(1.0 / (epoch + 1), step=epoch)

experiment.finalize()
```

## Fetch Script {#fetch-script}

```python
"""Fetch data from a previously logged experiment.

This script resumes the 'image-classifier' experiment and reads back
metadata and artifacts using the dict-like API.
"""

import json

import litlogger

experiment = litlogger.init(name="image-classifier")

# Read metadata via property
metadata = experiment.metadata
print(f"Metadata: {metadata}")

# Read artifacts and download
artifacts = experiment.artifacts
if "config" in artifacts:
    artifacts["config"].save("/tmp/config.json")
    with open("/tmp/config.json") as f:
        print(f"Config: {json.load(f)}")

experiment.finalize()
```

## What This Covers {#what-this-covers}

- Create experiment by name
- Log metadata
- Log metrics
- Upload artifacts
- Reconnect to an existing experiment
- Download files and access metadata

## Related Guides {#related-guides}

- [Standalone Usage](/docs/litlogger/2026.08.28/guides/standalone.md)
- [Logging Artifacts](/docs/litlogger/2026.08.28/guides/artifacts.md)
- [Workflows](/docs/litlogger/2026.08.28/guides/workflows.md)

---

**Navigation**

- Parent: [Tutorials](/docs/litlogger/2026.08.28/tutorials.md)
