-
Notifications
You must be signed in to change notification settings - Fork 301
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
Implement launch single task execution #115
Conversation
Codecov Report
@@ Coverage Diff @@
## master #115 +/- ##
==========================================
- Coverage 81.83% 81.60% -0.24%
==========================================
Files 211 211
Lines 13661 13745 +84
Branches 1126 1133 +7
==========================================
+ Hits 11179 11216 +37
- Misses 2215 2262 +47
Partials 267 267
Continue to review full report at Codecov.
|
flytekit/common/nodes.py
Outdated
@@ -100,7 +103,8 @@ def _return_mapping_object(self, sdk_node, sdk_type, name): | |||
return _promise.NodeOutput(sdk_node, sdk_type, name) | |||
|
|||
|
|||
class SdkNode(_six.with_metaclass(_sdk_bases.ExtendedSdkType, _hash_mixin.HashOnReferenceMixin, _workflow_model.Node)): | |||
class SdkNode(_six.with_metaclass(_sdk_bases.ExtendedSdkType, _hash_mixin.HashOnReferenceMixin, _workflow_model.Node, |
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.
Why are we making the node executable not the task?
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.
updated
Can you give some insight into what get_node is used for? That's the bit that's confusing to me. |
that was stale, thanks for the catch. should be cleaned up |
flytekit/common/tasks/task.py
Outdated
@@ -252,3 +255,28 @@ def __repr__(self): | |||
task_type=self.type, | |||
interface=self.interface | |||
) | |||
|
|||
@_exception_scopes.system_entry_point | |||
def launch(self, **input_map): |
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.
Anyway this can use the same executable mixin thingy?
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 SdkRunnableTask
which inherits form this class defines an execute method with a different signature than what this launch method uses so i was worried that would be confusing/messy
friendly ping @wild-endeavor @EngHabu |
@EngHabu mind taking another look? I refactored to use Launch in place of Execute like we discussed (and deprecated existing calls to launch_foo) however I wasn't sure if it made sense to change the flyte-cli command too along the same lines? |
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
CC @wild-endeavor LGTU?
TL;DR
This allows users to execute a previously registered task individually. Next up is register_and_execute for notebook and other usage.
Type
Are all requirements met?
Complete description
This change does some refactoring to clarify the distinction between launch and execute such that launch now refers to an entity which can be used to trigger an execution, meanwhile execute still refers to something that can be individually executed.
Tracking Issue
flyteorg/flyte#256
Follow-up issue
flyteorg/flyte#221