-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
chore(launcher): move artifact metadata to metadata struct field. Fixes #5788 #5793
Conversation
/assign @capri-xiyue |
@@ -12,15 +12,180 @@ | |||
# See the License for the specific language governing permissions and | |||
# limitations under the License. | |||
|
|||
import unittest | |||
from unittest.mock import ANY |
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: import packages or modules, but not classes or functions:
https://google.github.io/styleguide/pyguide.html#22-imports
especially since this ANY
could be confused with Any
from typing
.
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.
Thanks, I'll fix this. I think our sample pipelines and documentation has many violations, it'll be good to fix them too. Is that right?
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.
Fixed
artifact_name = mlmd_artifact.custom_properties['name' | ||
].string_value | ||
metadata = MessageToDict( | ||
mlmd_artifact.custom_properties.get('metadata').struct_value |
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.
What is the usage of transfer mlmd_artifact.custom_properties.get('metadata') to a metadata struct? Can't we just verify the custom_properties in tests?
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 test util script tries to hide MLMD implementation details from KFP data model and let e2e tests decouple from specific MLMD implementation. Because in this way, tests assert on KFP data model -- the metadata struct contains all user logged metadata.
Benefits:
- e2e test cases are concise
- e2e test cases mimic how a user would query MLMD and use information from MLMD to get status of a pipeline, we can consider extracting test utils to a user library in the future to make this use-case easier
- as we standardize in [v2compat] finalize pipeline run MLMD schema #5669, there will be fewer changes needed in e2e pipeline test cases
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
Thank you Yuan for the change!
/test kubeflow-pipelines-samples-v2 |
Looks like there is something wrong with v2 sample test. The downloading src pod will get stuck at container creating stage. It's not related to the PR. Similar issue happens in #5802 |
/retest |
In one task, wait container failed to be created, strange issue, seems transient. |
/retest |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Bobgy 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 |
/lgtm |
Description of your changes:
Fixes #5788
Checklist: