Skip to content
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

SDK - Compiler - Fix large data passing #2173

Merged

Conversation

Ark-kun
Copy link
Contributor

@Ark-kun Ark-kun commented Sep 19, 2019

This change makes compiler stop outputting parameters unless they're consumed as parameters downstream.
This prevents the situation when component outputs a big file, but DSL compiler instructs Argo to pick it up as parameter (parameters only hold few kilobytes of data).

As byproduct, this change fixes some minor compiler data passing bugs where some parameters were being passed around, but never consumed (happened with dsl.Condition and recursion).

Fixes #336.


This change is Reviewable

Stop outputting parameters unless they're consumed as parameters downstream.
This prevents the situaltion when component outputs a big file, but DSL compiler instructs Argo to pick it up as parameter (parameters only hold few kilobytes of data).

As byproduct, this change fixes some minor compiler data passing bugs where some parameters were being passed around, but never consumed (happened with `ResourceOp`, `dsl.Condition` and recursion).
@Ark-kun Ark-kun force-pushed the SDK---Compiler---Fix-large-data-passing branch from a2f2346 to 091d5ec Compare September 19, 2019 21:21
@Ark-kun
Copy link
Contributor Author

Ark-kun commented Sep 19, 2019

/restart

@Ark-kun
Copy link
Contributor Author

Ark-kun commented Sep 19, 2019

/test kubeflow-pipeline-e2e-test

1 similar comment
@Ark-kun
Copy link
Contributor Author

Ark-kun commented Sep 19, 2019

/test kubeflow-pipeline-e2e-test

@Ark-kun Ark-kun changed the title SDK - Compiler - Fix large data passing [WIP] SDK - Compiler - Fix large data passing Sep 20, 2019
@Ark-kun Ark-kun force-pushed the SDK---Compiler---Fix-large-data-passing branch from 29602d6 to 84b8096 Compare September 20, 2019 02:34
@Ark-kun Ark-kun changed the title [WIP] SDK - Compiler - Fix large data passing SDK - Compiler - Fix large data passing Sep 20, 2019
# workflow.parameters.* placeholders are not supported, but the DSL compiler does not produce those.
template_input_to_parent_constant_arguments.setdefault((task_template_name, task_input_name), set()).add(argument_value)
else:
raise AssertionError

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Maybe add some text like AssertionError('Unknown placeholder type encountered')?

input_name = parts[2]
inputs_directly_consumed_as_parameters.add((template_name, input_name))
elif parts[1] == 'artifacts':
raise AssertionError # Should not happen in container templates

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think it will be great to add some debug info in the AssertionError, too.

]

# Fix Workflow parameter arguments that are consumed as artifacts downstream
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove this line?

@numerology
Copy link

/lgtm

Left comments on some nit things.

@Ark-kun
Copy link
Contributor Author

Ark-kun commented Sep 20, 2019

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Ark-kun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit ef63c65 into kubeflow:master Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Argo artifacts
5 participants