Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

Create a FileOutput reader if the agent produce file output#391

Merged
pingsutw merged 8 commits into
masterfrom
agent-file-reader
Sep 19, 2023
Merged

Create a FileOutput reader if the agent produce file output#391
pingsutw merged 8 commits into
masterfrom
agent-file-reader

Conversation

@pingsutw

@pingsutw pingsutw commented Aug 17, 2023

Copy link
Copy Markdown
Member

TL;DR

Fixed https://flyte-org.slack.com/archives/C05GQ16TQLF/p1692227368597599

Create a RemoteFileOutputReader in the agent plugin if the task writes the output to the blob store.
For example, an agent may submit a job to aws batch, which will write the output to s3, so we should add a file output reader to task context.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

^^^

Tracking Issue

NA

Follow-up issue

NA

Signed-off-by: Kevin Su <pingsutw@apache.org>
@pingsutw pingsutw marked this pull request as draft August 17, 2023 20:19
@codecov

codecov Bot commented Aug 17, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 47.52% and project coverage change: +1.17% 🎉

Comparison is base (03dc9db) 63.01% compared to head (4e59bfe) 64.19%.
Report is 8 commits behind head on master.

❗ Current head 4e59bfe differs from pull request most recent head c73e5c7. Consider uploading reports for the commit c73e5c7 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #391      +/-   ##
==========================================
+ Coverage   63.01%   64.19%   +1.17%     
==========================================
  Files         154      156       +2     
  Lines       13080    10689    -2391     
==========================================
- Hits         8243     6862    -1381     
+ Misses       4220     3205    -1015     
- Partials      617      622       +5     
Flag Coverage Δ
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...o/tasks/pluginmachinery/internal/webapi/monitor.go 40.00% <0.00%> (-7.50%) ⬇️
go/tasks/pluginmachinery/internal/webapi/state.go 100.00% <ø> (ø)
go/tasks/plugins/k8s/kfoperators/common/config.go 0.00% <0.00%> (ø)
...sks/plugins/k8s/kfoperators/common/config_flags.go 17.39% <17.39%> (ø)
go/tasks/plugins/webapi/agent/plugin.go 68.53% <43.47%> (-0.02%) ⬇️
go/tasks/plugins/k8s/spark/spark.go 79.32% <50.00%> (+1.39%) ⬆️
go/tasks/plugins/array/awsbatch/transformer.go 81.45% <60.00%> (+2.33%) ⬆️
...o/tasks/plugins/k8s/kfoperators/pytorch/pytorch.go 79.22% <60.00%> (+0.53%) ⬆️
...s/plugins/k8s/kfoperators/tensorflow/tensorflow.go 77.18% <60.00%> (+1.45%) ⬆️
go/tasks/plugins/k8s/kfoperators/mpi/mpi.go 74.49% <66.66%> (+1.92%) ⬆️
... and 3 more

... and 125 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
@pingsutw pingsutw changed the title Create a FileOutput reader if the agent returns no output Create a FileOutput reader if the agent produce file output Aug 19, 2023
@pingsutw pingsutw marked this pull request as ready for review August 19, 2023 07:40
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
@pingsutw

Copy link
Copy Markdown
Member Author

cc @hamersaw would you mind taking a look

Comment thread go/tasks/plugins/webapi/agent/plugin.go Outdated
Comment thread go/tasks/plugins/webapi/agent/plugin.go
Signed-off-by: Kevin Su <pingsutw@apache.org>
Comment thread go/tasks/plugins/webapi/agent/plugin.go Outdated
}

if taskTemplate.Interface == nil || taskTemplate.Interface.Outputs == nil || taskTemplate.Interface.Outputs.Variables == nil {
logger.Infof(ctx, "The task declares no outputs. Skipping writing the outputs.")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we make this debug too?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Signed-off-by: Kevin Su <pingsutw@apache.org>
@pingsutw pingsutw merged commit 08dd79b into master Sep 19, 2023
eapolinario pushed a commit that referenced this pull request Sep 28, 2023
Signed-off-by: Kevin Su <pingsutw@apache.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants