Spaces:
Running
Running
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -1,12 +1,137 @@
|
|
1 |
---
|
2 |
title: Track Tonic
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 5.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
---
|
11 |
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
title: Track Tonic
|
3 |
+
emoji: 🐠
|
4 |
+
colorFrom: indigo
|
5 |
+
colorTo: yellow
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 5.38.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
+
license: mit
|
11 |
+
short_description: trackio for training monitoring
|
12 |
+
tags:
|
13 |
+
- smollm3
|
14 |
+
- fine-tuned
|
15 |
+
- causal-lm
|
16 |
+
- text-generation
|
17 |
+
- track tonic
|
18 |
+
- tonic
|
19 |
+
- legml
|
20 |
---
|
21 |
|
22 |
+
# Trackio Experiment Tracking
|
23 |
+
|
24 |
+
A comprehensive Gradio interface for experiment tracking and monitoring, designed for ML training workflows.
|
25 |
+
|
26 |
+
## Features
|
27 |
+
|
28 |
+
- **Create Experiments**: Start new experiments with custom names and descriptions
|
29 |
+
- **Log Metrics**: Real-time logging of training metrics and parameters
|
30 |
+
- **Visualize Results**: Interactive plots and charts for experiment analysis
|
31 |
+
- **Manage Status**: Update experiment status (running, completed, failed, paused)
|
32 |
+
- **HF Datasets Integration**: Persistent storage using Hugging Face Datasets
|
33 |
+
- **API Access**: Programmatic access for automated training scripts
|
34 |
+
|
35 |
+
## Usage
|
36 |
+
|
37 |
+
### Web Interface
|
38 |
+
|
39 |
+
1. **Create Experiment**: Use the "Create Experiment" tab to start new experiments
|
40 |
+
2. **Log Metrics**: Use the "Log Metrics" tab to track training progress
|
41 |
+
3. **View Results**: Use the "View Experiments" tab to see experiment details
|
42 |
+
4. **Update Status**: Use the "Update Status" tab to mark experiments as completed
|
43 |
+
|
44 |
+
### API Integration
|
45 |
+
|
46 |
+
Connect your training script to this Trackio Space:
|
47 |
+
|
48 |
+
```python
|
49 |
+
from monitoring import SmolLM3Monitor
|
50 |
+
|
51 |
+
monitor = SmolLM3Monitor(
|
52 |
+
experiment_name="my_experiment",
|
53 |
+
trackio_url="https://huggingface.co/spaces/Tonic/track-tonic",
|
54 |
+
enable_tracking=True
|
55 |
+
)
|
56 |
+
|
57 |
+
# Log configuration
|
58 |
+
monitor.log_config(config_dict)
|
59 |
+
|
60 |
+
# Log metrics during training
|
61 |
+
monitor.log_metrics({"loss": 0.5, "accuracy": 0.85}, step=100)
|
62 |
+
|
63 |
+
# Log final results
|
64 |
+
monitor.log_training_summary(final_results)
|
65 |
+
```
|
66 |
+
|
67 |
+
## Configuration
|
68 |
+
|
69 |
+
### Environment Variables
|
70 |
+
|
71 |
+
Set these environment variables for full functionality:
|
72 |
+
|
73 |
+
```bash
|
74 |
+
export HF_TOKEN="your_huggingface_token"
|
75 |
+
export TRACKIO_DATASET_REPO="your-username/your-dataset"
|
76 |
+
```
|
77 |
+
|
78 |
+
### Dataset Repository
|
79 |
+
|
80 |
+
The Space uses Hugging Face Datasets for persistent storage. Create a dataset repository to store your experiments:
|
81 |
+
|
82 |
+
1. Go to https://huggingface.co/datasets
|
83 |
+
2. Create a new dataset repository
|
84 |
+
3. Set the `TRACKIO_DATASET_REPO` environment variable
|
85 |
+
|
86 |
+
## API Endpoints
|
87 |
+
|
88 |
+
The Space provides these API endpoints:
|
89 |
+
|
90 |
+
- `create_experiment_interface`: Create new experiments
|
91 |
+
- `log_metrics_interface`: Log training metrics
|
92 |
+
- `log_parameters_interface`: Log experiment parameters
|
93 |
+
- `get_experiment_details`: Retrieve experiment details
|
94 |
+
- `list_experiments_interface`: List all experiments
|
95 |
+
- `update_experiment_status_interface`: Update experiment status
|
96 |
+
|
97 |
+
## Examples
|
98 |
+
|
99 |
+
### Creating an Experiment
|
100 |
+
|
101 |
+
```python
|
102 |
+
import requests
|
103 |
+
|
104 |
+
response = requests.post(
|
105 |
+
"https://your-space.hf.space/gradio_api/call/create_experiment_interface",
|
106 |
+
json={"data": ["my_experiment", "Training experiment description"]}
|
107 |
+
)
|
108 |
+
```
|
109 |
+
|
110 |
+
### Logging Metrics
|
111 |
+
|
112 |
+
```python
|
113 |
+
import requests
|
114 |
+
import json
|
115 |
+
|
116 |
+
metrics = {"loss": 0.5, "accuracy": 0.85, "learning_rate": 2e-5}
|
117 |
+
response = requests.post(
|
118 |
+
"https://your-space.hf.space/gradio_api/call/log_metrics_interface",
|
119 |
+
json={"data": ["exp_20231201_143022", json.dumps(metrics), "100"]}
|
120 |
+
)
|
121 |
+
```
|
122 |
+
|
123 |
+
## Troubleshooting
|
124 |
+
|
125 |
+
### Common Issues
|
126 |
+
|
127 |
+
1. **Space Not Building**: Check that all required files are uploaded and the app.py is correct
|
128 |
+
2. **API Connection Errors**: Verify the Space URL and ensure the Space is running
|
129 |
+
3. **Missing Metrics**: Check that the experiment ID is correct and the Space is accessible
|
130 |
+
|
131 |
+
### Getting Help
|
132 |
+
|
133 |
+
- Check the Space logs at the Space URL
|
134 |
+
- Verify your HF token has the necessary permissions
|
135 |
+
- Ensure the dataset repository exists and is accessible
|
136 |
+
|
137 |
+
Visit: https://huggingface.co/spaces/Tonic/track-tonic
|