Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Training event Exporter #1451

Merged
merged 40 commits into from
Feb 8, 2025
Merged

add Training event Exporter #1451

merged 40 commits into from
Feb 8, 2025

Conversation

liyzcj
Copy link
Collaborator

@liyzcj liyzcj commented Jan 22, 2025

What changes were proposed in this pull request?

This PR introduces a Training Event Exporter SDK that enables training processes and DLRover processes to export key events to log files in a standardized format.

Why are the changes needed?

DLRover requires detailed training process information to make informed fault repair decisions. This information includes but is not limited to:

  • Current training step
  • Checkpoint saving status
  • Training metrics
  • Resource utilization

The SDK provides a standardized way to collect and export these training events, making it easier for DLRover to monitor and manage training processes effectively.

Does this PR introduce any user-facing change?

No, this is an internal SDK implementation that doesn't affect end users directly.

How was this patch tested?

  • Unit test

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 92.63158% with 91 lines in your changes missing coverage. Please review.

Project coverage is 82.14%. Comparing base (89c310e) to head (ef518fb).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
dlrover/python/training_event/exporter.py 88.52% 21 Missing ⚠️
...lrover/python/training_event/predefined/trainer.py 67.79% 19 Missing ⚠️
...rover/python/training_event/predefined/_dlrover.py 67.92% 17 Missing ⚠️
dlrover/python/training_event/config.py 89.23% 14 Missing ⚠️
dlrover/python/training_event/error_handler.py 92.77% 6 Missing ⚠️
dlrover/python/training_event/emitter.py 96.47% 5 Missing ⚠️
dlrover/python/training_event/event.py 91.66% 3 Missing ⚠️
dlrover/python/master/main.py 33.33% 2 Missing ⚠️
dlrover/python/training_event/predefined/common.py 81.81% 2 Missing ⚠️
dlrover/trainer/torch/elastic_run.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1451      +/-   ##
==========================================
+ Coverage   81.61%   82.14%   +0.52%     
==========================================
  Files         240      253      +13     
  Lines       24062    25288    +1226     
==========================================
+ Hits        19638    20772    +1134     
- Misses       4424     4516      +92     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@majieyue majieyue requested a review from BalaBalaYi February 5, 2025 04:19
@majieyue majieyue requested a review from BalaBalaYi February 5, 2025 12:03
liyanzhe.lyz added 11 commits February 6, 2025 18:20
…ization

- Introduce a new abstract `start()` method in the EventExporter base class
- Implement `start()` method for AsyncExporter to control thread initialization
- Add `start()` method to TextFileExporter and ConsoleExporter
- Modify default exporter initialization to call `start()` method
- Update tests to call `start()` before using AsyncExporter
- Update Config class to inherit from Singleton
- Remove global config and logger getter functions
- Modify error_handler, exporter, and emitter to use Config.singleton_instance()
- Rename global logger variables for consistency
- Simplify thread-safe singleton access for configuration
@liyzcj liyzcj requested a review from nash635 as a code owner February 7, 2025 04:39
@liyzcj liyzcj requested a review from BalaBalaYi February 7, 2025 05:30
liyanzhe.lyz added 2 commits February 7, 2025 21:06
- Rename `DLRoverMaster` to `DLRoverMasterEvent`
- Rename `DLRoverAgent` to `DLRoverAgentEvent`
- Rename `DLRoverCommon` to `DLRoverCommonEvent`
- Update import statements and references across multiple files
- Update documentation to reflect new class names
Copy link
Collaborator

@majieyue majieyue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

dlrover/python/tests/test_error_handler.py Outdated Show resolved Hide resolved
@majieyue majieyue requested a review from BalaBalaYi February 8, 2025 01:38
Copy link
Collaborator

@BalaBalaYi BalaBalaYi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BalaBalaYi BalaBalaYi merged commit 09a46f9 into master Feb 8, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants