Skip to content

Commit

Permalink
[r0.30.0 cherry-pick] commit_id=[2736197] (#4011)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvesh09 authored Jul 9, 2021
1 parent 8a5c348 commit b364cd1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tfx/orchestration/kubeflow/v2/step_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,9 @@ def _build_resolver_for_latest_blessed_model(
artifact_queries = {}
query_filter = (
'schema_title="{type}" AND '
'state={state} AND name={{$.inputs.artifacts["{input_key}"]'
'.metadata.{property_key}.number_value}}').format(
'state={state} AND '
'name="{{{{$.inputs.artifacts[\'{input_key}\']'
'.metadata[\'{property_key}\']}}}}"').format(
type=compiler_utils.get_artifact_title(standard_artifacts.Model),
state=metadata_store_pb2.Artifact.State.Name(
metadata_store_pb2.Artifact.LIVE),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"resolver": {
"outputArtifactQueries": {
"model": {
"filter": "schema_title=\"tfx.Model\" AND state=LIVE AND name={$.inputs.artifacts[\"input\"].metadata.current_model_id.number_value}"
"filter": "schema_title=\"tfx.Model\" AND state=LIVE AND name=\"{{$.inputs.artifacts['input'].metadata['current_model_id']}}\""
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ executors {
output_artifact_queries {
key: "model"
value {
filter: "schema_title=\"tfx.Model\" AND state=LIVE AND name={$.inputs.artifacts[\"input\"].metadata.current_model_id.number_value}"
filter: "schema_title=\"tfx.Model\" AND state=LIVE AND name=\"{{$.inputs.artifacts['input'].metadata['current_model_id']}}\""
}
}
}
Expand Down

0 comments on commit b364cd1

Please sign in to comment.