-
Notifications
You must be signed in to change notification settings - Fork 634
Refactor scheduler and engine.py #4163
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
Conversation
| def activate(self): | ||
| """From STOPPED to WAITING.""" | ||
| assert self.seq.num_token_ids > 0 | ||
| self.to_state(WaitingState) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what case a stopped seq can be activate again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
second round chat
| self.seq = seq | ||
| self.scheduler = scheduler | ||
|
|
||
| def to_state(self, new_state): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better readability, consider using state_cls instead of new_state since it's a class, not an instance.
RunningLeon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Uh oh!
There was an error while loading. Please reload this page.