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

Fix: Use return instead of break to correctly exit loop on path exist… #1312

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jinqinn
Copy link

@jinqinn jinqinn commented Oct 28, 2024

What changes were proposed in this pull request?

  1. Add generateEmbeddedObjectMeta option to controller-gen to support generating metadata for embedded objects.
  2. Fix incorrect import of the megatron package.
  3. Replace break with return when checking for the existence of step_done_dir in storage.

Why are the changes needed?

  1. This allows CRD developers to include standard Kubernetes metadata (like name, labels, and annotations) in nested fields, providing better support for complex resource structures .
  2. Correcting this import ensures that the application can locate and utilize the package correctly, preventing potential runtime errors and improving code stability.
  3. Using return allows the function to exit immediately once done_dir is found, avoiding unnecessary iterations and enhancing code readability and efficiency.

Does this PR introduce any user-facing change?

NO

How was this patch tested?

YES

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 80.52%. Comparing base (186783e) to head (eb3797e).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
dlrover/python/elastic_agent/torch/ckpt_saver.py 33.33% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1312   +/-   ##
=======================================
  Coverage   80.52%   80.52%           
=======================================
  Files         222      222           
  Lines       20707    20709    +2     
=======================================
+ Hits        16674    16676    +2     
  Misses       4033     4033           

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants