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
Task Assigner initial implementation #343
Task Assigner initial implementation #343
Conversation
|
||
# There no enough information to understand that it's train or validate task | ||
# Looks like we should provide task type. | ||
kwargs = {} |
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.
Removing the kwargs resolution from the plan will break the task runner API. Maybe add an if statement for this logic:
if hasattr(self.task_runner, 'TASK_REGISTRY'):
func_name = task.function_name
# There no enough information to understand that it's train or validate task
# Looks like we should provide task type.
kwargs = {}
if func_name == 'validate':
if task.is_local:
kwargs['apply'] = 'local'
else:
kwargs['apply'] = 'global'
else:
func_name = self.task_config[task]['function']
kwargs = self.task_config[task]['kwargs']
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.
Changed
@@ -854,6 +857,7 @@ def _end_of_round_check(self): | |||
if self._time_to_quit(): | |||
self.logger.info('Experiment Completed. Cleaning up...') | |||
else: | |||
self.round_number += 1 |
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.
Moving the round increment to the else statement will result in N+1 rounds being executed. This should be changed back
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.
No, in fact difference only in logging. Real checking that it is time-time-quit happens in get_tasks
function. I returned it back, but we should rewrite this part of code in the future.
Example of usage in Jupyter:
Getting registered tasks:
Creating Random Assigner:
or
creating filtering assigner:
or
creating filtering assigner by gpu info:
or
create assigner with additional validation round
and then pass assigner into start experiment call(
task_assigner
key):Future opportunities with that assigner function interface:
Filtering by collaborator status (shard_registry)