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

fix(frontend): Update TFX context naming pattern for TFX 1.2.0+. #6387

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/src/lib/OutputArtifactLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ export class OutputArtifactLoader {

// Since artifact types don't change per run, this can be optimized further so
// that we don't fetch them on every page load.
console.log('enter TFX for execution ' + execution.getId() + ' namespace ' + namespace);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: clean up

reportProgress(10);
const [artifactTypes, artifacts] = await Promise.all([
getArtifactTypes(),
Expand Down
14 changes: 3 additions & 11 deletions frontend/src/mlmd/MlmdUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,9 @@ async function getContext({ type, name }: { type: string; name: string }): Promi
* @throws error when network error, or not found
*/
async function getTfxRunContext(argoWorkflowName: string): Promise<Context> {
// argoPodName has the general form "pipelineName-workflowId-executionId".
// All components of a pipeline within a single run will have the same
// "pipelineName-workflowId" prefix.
const pipelineName = argoWorkflowName
.split('-')
.slice(0, -1)
.join('_');
const runID = argoWorkflowName;
// An example run context name is parameterized_tfx_oss.parameterized-tfx-oss-4rq5v.
const tfxRunContextName = `${pipelineName}.${runID}`;
return await getContext({ name: tfxRunContextName, type: 'run' });
// Context: https://github.com/kubeflow/pipelines/issues/6138
// Require TFX version to be > 1.2.0.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: >=1.2.0

return await getContext({ name: argoWorkflowName, type: 'pipeline_run' });
}

/**
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/RunDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ class RunDetails extends Page<RunDetailsInternalProps, RunDetailsState> {
workflow,
selectedNodeId,
);
console.log('selectedNodeId ' + selectedNodeId);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: clean up

const selectedExecution = mlmdExecutions?.find(
execution => ExecutionHelpers.getKfpPod(execution) === selectedNodeId,
);
Expand Down