-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Refactor] Task and Tune API #118
Conversation
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.
GOOD 💡
Suggestion
# at tune/config.py
class _CustomTorchBackend(_TorchBackend):
...
def on_start(self, worker_group: WorkerGroup,
...
def set_env_vars(addr, port, rank, world_size):
# fix here
os.environ['TUNE_ORIG_WORKING_DIR'] = os.getcwd()
os.environ['MASTER_ADDR'] = addr
os.environ['MASTER_PORT'] = str(port)
os.environ['RANK'] = str(rank)
os.environ['LOCAL_RANK'] = str(rank)
os.environ['WORLD_SIZE'] = str(world_size) # at core/rewriters/rel2abs.py
import os
from .base import BaseRewriter
from .builder import REWRITERS
@REWRITERS.register_module()
class Rel2Abs(BaseRewriter):
def __call__(self, context: dict) -> dict:
os.chdir(os.environ['TUNE_ORIG_WORKING_DIR']) # or some task
return context |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #118 +/- ##
=======================================
Coverage ? 73.09%
=======================================
Files ? 58
Lines ? 1617
Branches ? 238
=======================================
Hits ? 1182
Misses ? 334
Partials ? 101
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Motivation
To build runnable task from cfg
TODO
work_dir
(experiment name is determined bywork_dir
)log_analysis
Tuner
classModification
Please briefly describe what modification is made in this PR.
Expected behavior
Result
Checklist