Spaces:
Running
Running
βοΈ App Configuration Guide
Overview
The Trackio app now includes a Configuration tab that allows you to set your Hugging Face token and dataset repository directly through the interface, providing an alternative to environment variables.
π New Features
Configuration Tab
- β HF Token Input: Secure password field for your Hugging Face token
- β Dataset Repository Input: Text field for your dataset repository
- β Update Configuration: Apply new settings and reload experiments
- β Test Connection: Verify access to the dataset repository
- β Create Dataset: Create a new dataset repository if it doesn't exist
Flexible Configuration
- β Environment Variables: Still supported as fallback
- β Interface Input: New direct input method
- β Dynamic Updates: Change configuration without restarting
- β Validation: Input validation and error handling
π Configuration Tab Usage
1. Access the Configuration Tab
- Open the Trackio app
- Click on the "βοΈ Configuration" tab
- You'll see input fields for HF Token and Dataset Repository
2. Set Your HF Token
Hugging Face Token: hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- Type: Password field (hidden for security)
- Required: Yes (for dataset access)
- Format: Your HF token starting with
hf_
- Help: Click the help text for instructions on getting your token
3. Set Your Dataset Repository
Dataset Repository: your-username/your-dataset-name
- Type: Text field
- Required: No (defaults to
tonic/trackio-experiments
) - Format:
username/dataset-name
- Examples:
tonic/trackio-experiments
your-username/my-experiments
your-org/team-experiments
4. Use the Action Buttons
Update Configuration
- Applies new settings immediately
- Reloads experiments with new configuration
- Shows current status and experiment count
Test Connection
- Verifies access to the dataset repository
- Tests HF token permissions
- Shows dataset information and experiment count
Create Dataset
- Creates a new dataset repository if it doesn't exist
- Sets up the correct schema for experiments
- Makes the dataset private by default
π§ Configuration Methods
Method 1: Interface Input (New)
- Go to "βοΈ Configuration" tab
- Enter your HF token and dataset repository
- Click "Update Configuration"
- Verify with "Test Connection"
Method 2: Environment Variables (Existing)
# Set environment variables
export HF_TOKEN=your_hf_token_here
export TRACKIO_DATASET_REPO=your-username/your-dataset-name
# Or for HF Spaces, add to Space settings
HF_TOKEN=your_hf_token_here
TRACKIO_DATASET_REPO=your-username/your-dataset-name
Method 3: Hybrid Approach
- Set environment variables as defaults
- Override specific values through the interface
- Interface values take precedence over environment variables
π Configuration Priority
The app uses this priority order for configuration:
- Interface Input (highest priority)
- Environment Variables (fallback)
- Default Values (lowest priority)
π οΈ Getting Your HF Token
Step-by-Step Instructions
- Go to Hugging Face Settings
- Click "New token"
- Give it a name (e.g., "Trackio Access")
- Select "Write" permissions
- Click "Generate token"
- Copy the token (starts with
hf_
) - Paste it in the app's HF Token field
Token Permissions
- Read: Required for loading experiments
- Write: Required for saving experiments
- Scope: Should have access to your dataset repositories
π Dataset Repository Format
Correct Format
username/dataset-name
Examples
tonic/trackio-experiments
(default)your-username/my-experiments
your-org/team-experiments
your-username/smollm3-experiments
Validation
- Must contain exactly one
/
- Username must be valid HF username
- Dataset name must be valid (alphanumeric + hyphens)
π Testing Your Configuration
1. Test Connection
- Enter your HF token and dataset repository
- Click "Test Connection"
- Should show: "β Connection successful!"
2. Create Dataset (if needed)
- If dataset doesn't exist, click "Create Dataset"
- Should show: "β Dataset created successfully!"
3. Update Configuration
- Click "Update Configuration"
- Should show: "β Configuration updated successfully!"
π¨ Troubleshooting
Issue: "Please provide a Hugging Face token"
Solution:
- Enter your HF token in the interface
- Or set the
HF_TOKEN
environment variable
Issue: "Connection failed: 401 Unauthorized"
Solutions:
- Check your HF token is correct
- Verify the token has read access to the dataset
- Ensure the dataset repository exists
Issue: "Failed to create dataset"
Solutions:
- Check your HF token has write permissions
- Verify the username in the repository name
- Ensure the dataset name is valid
Issue: "Dataset repository must be in format: username/dataset-name"
Solution:
- Use the correct format:
username/dataset-name
- Example:
your-username/my-experiments
π Benefits
For Users
- β Easy Setup: No need to set environment variables
- β Visual Interface: Clear input fields and validation
- β Immediate Feedback: Test connection and see results
- β Flexible: Can change configuration anytime
For Development
- β Backward Compatible: Environment variables still work
- β Fallback Support: Graceful degradation
- β Error Handling: Clear error messages
- β Validation: Input validation and testing
For Deployment
- β HF Spaces Ready: Works on Hugging Face Spaces
- β No Restart Required: Dynamic configuration updates
- β Secure: Password field for token input
- β User-Friendly: Clear instructions and help text
π― Usage Examples
Basic Setup
- Open the app
- Go to "βοΈ Configuration" tab
- Enter your HF token
- Enter your dataset repository
- Click "Update Configuration"
- Click "Test Connection" to verify
Advanced Setup
- Set environment variables as defaults
- Use interface to override specific values
- Test connection to verify access
- Create dataset if it doesn't exist
- Start using the app with persistent storage
Team Setup
- Create a shared dataset repository
- Share the repository name with team
- Each team member sets their own HF token
- All experiments are stored in the shared dataset
π Configuration Status
The app shows current configuration status:
π Dataset: your-username/your-dataset
π HF Token: Set
π Experiments: 5
π Updating Configuration
You can update configuration at any time:
- Go to "βοΈ Configuration" tab
- Change HF token or dataset repository
- Click "Update Configuration"
- Experiments will reload with new settings
π Your Trackio app is now more flexible and user-friendly with direct configuration input!