Skip to content

fix(adapter/nemo): also close alt async calls queue for regular nemo checkpoints#106

Merged
g-husam merged 5 commits into
mainfrom
feature/close-alt-queue
May 8, 2026
Merged

fix(adapter/nemo): also close alt async calls queue for regular nemo checkpoints#106
g-husam merged 5 commits into
mainfrom
feature/close-alt-queue

Conversation

@g-husam

@g-husam g-husam commented May 6, 2026

Copy link
Copy Markdown
Collaborator
  1. Always call close() on the mlf_async_calls_queue - if the function doesn't exist we should catch that in our tests (which are updated)
  2. Also call close() on the alt_async_calls_queue, which wasn't being closed before

# causing a crash if the process group is already destroyed.
caller.close = lambda: None
# Close each queue
self._mlf_async_calls_queue.close()

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

intentionally removing the if condition, should always call this, and if it doesnt exist anymore we should fail the test so we know how to clean it up otherwise

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should we move this after line 477?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

good q, I was wondering the same. I guess the only reason to do it first is if the underlying caller close needs to be invoked when callilng this close, so figured we'd close everything normally first, then address the potential duplicate call issue after. wdyt

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

have you tested on a training job? If it didn't cause any issue, either order should work

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yeah ran llama8b for 10 steps, checkpointing every 3. didnt notice any issues

# causing a crash if the process group is already destroyed.
caller.close = lambda: None

self._alt_async_calls_queue.close()

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

closing the alt queue as well

@g-husam g-husam marked this pull request as ready for review May 6, 2026 22:54
@g-husam g-husam requested a review from Leahlijuan May 6, 2026 22:54
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

Python Code Coverage Summary

Code Coverage

Package Line Rate Branch Rate Health
src.ml_flashpoint 100% 100%
src.ml_flashpoint.adapter 100% 100%
src.ml_flashpoint.adapter.megatron 97% 95%
src.ml_flashpoint.adapter.nemo 98% 94%
src.ml_flashpoint.adapter.pytorch 99% 92%
src.ml_flashpoint.checkpoint_object_manager 93% 93%
src.ml_flashpoint.core 95% 92%
src.ml_flashpoint.replication 83% 83%
Summary 95% (2396 / 2524) 92% (573 / 624)

Minimum allowed line rate is 90%

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

C++ Code Coverage Summary

Code Coverage

Package Line Rate Branch Rate Health
src.ml_flashpoint.checkpoint_object_manager.buffer_object 93% 54%
src.ml_flashpoint.replication.transfer_service 79% 41%
Summary 82% (899 / 1097) 44% (670 / 1539)

Minimum allowed line rate is 80%

@g-husam g-husam merged commit 9e10862 into main May 8, 2026
7 checks passed
@g-husam g-husam deleted the feature/close-alt-queue branch May 8, 2026 16:38
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