-
Notifications
You must be signed in to change notification settings - Fork 790
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
Implementation for Unbounded Foreach #510
Conversation
self._top_kwargs = {} | ||
self._step_kwargs = {} | ||
|
||
def _set_step_kwargs(self, 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.
Is there a reason you didn't just use the setter/getter idiom for this?
@@ -220,6 +221,7 @@ def step_task_retry_count(self): | |||
Returns a tuple of (user_code_retries, error_retries). Error retries | |||
are attempts to run the process after the user code has failed all | |||
its retries. | |||
Return None, None to disable all retries by the (native) runtime. |
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.
Rephrase as: Typically, the runtime takes the maximum of retry counts across decorators and user specification to determine the task retry count. If you want to force no retries, return the special values (None, None).
or something similar.
I hadn't understood that from the original comment.
CondaStepDecorator], ext_plugins.STEP_DECORATORS, 'name') | ||
CondaStepDecorator, | ||
InternalUnboundedForeachDecorator], | ||
ext_plugins.STEP_DECORATORS, 'name') |
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.
Nit: indentation.
yield '--%s' % k | ||
if not isinstance(value, bool): | ||
yield to_unicode(value) | ||
# def options(mapping): |
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.
Can strip.
@@ -292,14 +292,13 @@ def dict_to_cli_options(params): | |||
if k == 'decospecs': | |||
k = 'with' | |||
k = k.replace('_', '-') | |||
if not isinstance(v, tuple): | |||
v = [v] | |||
v = v if isinstance(v, list) or isinstance(v, tuple) else [v] |
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.
can replace by isinstance(v, (list, tuple)) instead of both isinstance.
test/core/metaflow_test/cli_check.py
Outdated
from . import MetaflowCheck, AssertArtifactFailed, AssertLogFailed, truncate | ||
from . import AssertTagFailed |
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.
This assertion does not exist.
test/core/metaflow_test/cli_check.py
Outdated
@@ -18,36 +17,29 @@ class CliCheck(MetaflowCheck): | |||
|
|||
def run_cli(self, args, capture_output=False): | |||
cmd = [sys.executable, 'test_flow.py'] | |||
cmd.extend(self.cli_options) | |||
|
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.
is this part of the other diff (#521)?
test/core/tests/timeout_decorator.py
Outdated
@@ -25,7 +25,7 @@ def check_results(self, flow, checker): | |||
for step in run: | |||
for task in step: | |||
if 'check' in task.data: | |||
extype = 'metaflow.plugins.timeout_decorators.'\ | |||
extype = 'metaflow.plugins.timeout_decorator.'\ |
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.
Ditto for this.
Replaced by #554 |
TODO: