File size: 2,814 Bytes
ebe598e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# πŸ”§ Trackio Environment Variables Reference

## Quick Setup

Set these environment variables in your Hugging Face Space:

```bash
# Required: Your HF token for dataset access
HF_TOKEN=your_hf_token_here

# Optional: Dataset repository to use (defaults to tonic/trackio-experiments)
TRACKIO_DATASET_REPO=your-username/your-dataset-name
```

## Environment Variables

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `HF_TOKEN` | βœ… Yes | None | Your Hugging Face token for dataset access |
| `TRACKIO_DATASET_REPO` | ❌ No | `tonic/trackio-experiments` | Dataset repository to load experiments from |
| `SPACE_ID` | πŸ”„ Auto | None | HF Space ID (automatically detected) |

## Configuration Examples

### 1. Default Setup
```bash
HF_TOKEN=your_token_here
# Uses: tonic/trackio-experiments
```

### 2. Personal Dataset
```bash
HF_TOKEN=your_token_here
TRACKIO_DATASET_REPO=your-username/trackio-experiments
```

### 3. Team Dataset
```bash
HF_TOKEN=your_token_here
TRACKIO_DATASET_REPO=your-org/team-experiments
```

### 4. Project-Specific Dataset
```bash
HF_TOKEN=your_token_here
TRACKIO_DATASET_REPO=your-username/smollm3-experiments
```

## How to Set in HF Spaces

1. Go to your Hugging Face Space settings
2. Navigate to "Settings" β†’ "Environment variables"
3. Add the variables:
   - `HF_TOKEN`: Your HF token
   - `TRACKIO_DATASET_REPO`: Your dataset repository (optional)

## Testing Configuration

Run the configuration script to check your setup:

```bash
python configure_trackio.py
```

This will:
- βœ… Show current environment variables
- πŸ§ͺ Test dataset access
- πŸ“Š Display experiment count
- πŸ’Ύ Generate configuration file

## Getting Your HF Token

1. Go to [Hugging Face Settings](https://huggingface.co/settings/tokens)
2. Click "New token"
3. Give it a name (e.g., "Trackio Access")
4. Select "Write" permissions
5. Copy the token and set it as `HF_TOKEN`

## Dataset Repository Format

The `TRACKIO_DATASET_REPO` should follow this format:
```
username/dataset-name
```

Examples:
- `tonic/trackio-experiments`
- `your-username/my-experiments`
- `your-org/team-experiments`

## Troubleshooting

### Issue: "HF_TOKEN not found"
**Solution**: Set your HF token in the Space environment variables

### Issue: "Failed to load dataset"
**Solutions**:
1. Check your token has read access to the dataset
2. Verify the dataset repository exists
3. Try the backup fallback (automatic)

### Issue: "Failed to save experiments"
**Solutions**:
1. Check your token has write permissions
2. Verify the dataset repository exists
3. Check network connectivity

## Security Notes

- πŸ”’ Dataset is private by default
- πŸ”‘ Only accessible with your HF_TOKEN
- πŸ›‘οΈ No sensitive data exposed publicly
- πŸ” Secure storage on HF infrastructure