-
Notifications
You must be signed in to change notification settings - Fork 16
fix: call warm_up_process to prevent loguru blocking #20
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,6 +27,7 @@ | |||||||||||||||||||||||
| from torch.utils.data import Dataset as TorchDataset | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Create training and validation datasets. | ||||||||||||||||||||||||
| from ajet.backbone.warm_up import warm_up_process | ||||||||||||||||||||||||
| from ajet.task_reader import RouterTaskReader, task_to_standard_dataset | ||||||||||||||||||||||||
| from ajet.utils.process_dataset import create_rl_sampler | ||||||||||||||||||||||||
| from ajet.utils.core_env_vars import get_runtime_env | ||||||||||||||||||||||||
|
|
@@ -116,6 +117,7 @@ def run(self, config): | |||||||||||||||||||||||
| from loguru import logger | ||||||||||||||||||||||||
| from omegaconf import OmegaConf | ||||||||||||||||||||||||
| from verl.utils.fs import copy_to_local | ||||||||||||||||||||||||
| warm_up_process(config) | ||||||||||||||||||||||||
|
Comment on lines
117
to
+120
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Suggested change
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| logger.info(f"TaskRunner hostname: {socket.gethostname()}, PID: {os.getpid()}") | ||||||||||||||||||||||||
| pprint(OmegaConf.to_container(config, resolve=True)) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
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.
The import of
warm_up_processis currently placed between the comment# Create training and validation datasets.and the actual dataset-related imports, which is confusing. Furthermore, for Ray remote classes likeTaskRunner, it is a common practice to keep imports local to the methods where they are used to keep the actor definition lightweight and avoid unnecessary side effects during module import on the head node. This import should be moved inside therunmethod.