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

feat: 'continue' primitive in tasklet #261

Merged
merged 1 commit into from
Nov 4, 2022

Conversation

myungjin
Copy link
Contributor

@myungjin myungjin commented Nov 3, 2022

We add 'continue' primitive in the tasklet code of the flame library. The 'continue' primitive is used to move back to the start of loop when a certain condition is met. A condition is defined as a function, which will be set via set_continue_fn member function.

As an example use case of 'continue' primitive, a middle aggregator code is extended in the following way: If no trainer join a channel that the middle aggregator is waiting on for a minute, the middle aggregator gives up waiting and updates the top aggregator with dummy weights so that the top aggregator can be unblocked. Then, the middle aggregator goes back to the start of the loop so that it can retrieve model weights of a new global model from the top aggregator.

We add 'continue' primitive in the tasklet code of the flame library.
The 'continue' primitive is used to move back to the start of loop
when a certain condition is met. A condition is defined as a
function, which will be set via set_continue_fn member function.

As an example use case of 'continue' primitive, a middle aggregator
code is extended in the following way: If no trainer join a channel
that the middle aggregator is waiting on for a minute, the middle
aggregator gives up waiting and updates the top aggregator with dummy
weights so that the top aggregator can be unblocked. Then, the middle
aggregator goes back to the start of the loop so that it can retrieve
model weights of a new global model from the top aggregator.
Copy link
Collaborator

@harshitdaga harshitdaga left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Contributor

@RaviKhandavilli RaviKhandavilli left a comment

Choose a reason for hiding this comment

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

LGTM

@myungjin myungjin merged commit 95dc2d7 into cisco-open:main Nov 4, 2022
@myungjin myungjin deleted the python_lib_tasklet branch November 4, 2022 15:57
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.

4 participants