[TRACKING] feat: Integrate SwanLab for experiment tracking with online/offline mode and local dashboard support #218
+20
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
This PR introduces SwanLab, a lightweight open-source experiment tracking tool, as a new logging option for the training framework. The integration provides both online and offline tracking capabilities, along with a local dashboard for visualizing results. Below is a detailed overview of the changes and usage instructions:
Key Features of SwanLab Integration
Online and Offline Tracking:
Hardware Monitoring:
Remote Access:
Local Dashboard:
Usage Instructions
Step 1: Set Up Online Tracking (Optional)
To use SwanLab's online tracking, log in to the SwanLab website and obtain your API key from the Settings page. Then, authenticate using the following command:
If you prefer offline mode, skip this step.
Step 2: Configure SwanLab as the Logger
To enable SwanLab as the experiment tracker, add
trainer.logger=['swanlab']
to your training command. For example, using the Post-train a LLM using PPO with GSM8K dataset workflow:If you are not logged in, you will be prompted to choose a tracking mode:
Alternatively, you can configure SwanLab using environment variables:
Step 3: View Training Logs
After logging in, you will see a confirmation message:
For more details, refer to the SwanLab Cloud Documentation.
Offline Tracking: Use the local dashboard to visualize logs:
For advanced configurations, such as setting a custom port, refer to the Offline Dashboard Documentation and CLI Documentation.
Impact
This PR is ready for review. Feedback and suggestions are welcome!