Skip to content

Conversation

Sovietaced
Copy link
Member

@Sovietaced Sovietaced commented May 21, 2024

I recently went through the process of developing an agent plugin by going through the docs. Previously the developing_agents documentation had a decent skeleton for the agent example but the local_python documentation had little to no accompanying task example. Its a big confusing because the agent is a stripped down big query agent that is not functional and then later the example task is just a real big query task.

Anyhow, I've spent some time updating the documentation to use a completely running agent, task, and example file. Previous agent pseudo code has been commented out and the general workflow has additional comments but there is dummy code that does actually run locally in a manner that someone can start making changes and get feedback immediately to start development.

pyflyte run example.py say_hello --name jason                                                                                                                                                                                                                      ▼ Py base 01:03:20 AM
Running Execution on local.
create called task_template=<FlyteLiteral(TaskTemplate) id { resource_type: TASK name: "armada_test_agent.example.say_hello" } type: "example" metadata { runtime { type: FLYTE_SDK version: "1.12.0" flavor: "python" } retries { } } interface { inputs { variables { key: "name" value { type { simple: STRING } description: "name" } } } outputs { variables { key: "o0" value { type { simple: STRING } description: "o0" } } } } custom { fields { key: "environment" value { string_value: "dev" } } } container { image: "cr.flyte.org/flyteorg/flytekit:py3.11-1.12.0" args: "pyflyte-execute" args: "--inputs" args: "/tmp/flyte-od3iwm33/raw/0991ba2310db3416e9ad85aba218c0d9/inputs.pb" args: "--output-prefix" args: "/tmp/flyte-od3iwm33/raw/0991ba2310db3416e9ad85aba218c0d9" args: "--raw-output-data-prefix" args: "/tmp/flyte-od3iwm33/raw/0991ba2310db3416e9ad85aba218c0d9/raw_output" args: "--checkpoint-path" args: "/tmp/flyte-od3iwm33/raw/0991ba2310db3416e9ad85aba218c0d9/checkpoint_output" args: "--prev-checkpoint" args: "/tmp/flyte-od3iwm33/raw/0991ba2310db3416e9ad85aba218c0d9/prev_checkpoint" args: "--resolver" args: "flytekit.core.python_auto_container.default_task_resolver" args: "--" args: "task-module" args: "armada_test_agent.example" args: "task-name" args: "say_hello" resources { } }>
get called resource_meta=ExampleMetadata(job_id='temp')

neverett
neverett previously approved these changes May 21, 2024
Copy link
Contributor

@neverett neverett left a comment

Choose a reason for hiding this comment

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

A few small suggestions, otherwise LGTM!

Copy link

codecov bot commented May 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.18%. Comparing base (5c147ef) to head (accd86c).
Report is 226 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5399   +/-   ##
=======================================
  Coverage   36.17%   36.18%           
=======================================
  Files        1302     1302           
  Lines      109614   109614           
=======================================
+ Hits        39653    39660    +7     
+ Misses      65816    65809    -7     
  Partials     4145     4145           
Flag Coverage Δ
unittests-datacatalog 51.37% <ø> (ø)
unittests-flyteadmin 55.33% <ø> (+0.03%) ⬆️
unittests-flytecopilot 12.17% <ø> (ø)
unittests-flytectl 62.18% <ø> (ø)
unittests-flyteidl 7.12% <ø> (ø)
unittests-flyteplugins 53.34% <ø> (ø)
unittests-flytepropeller 41.71% <ø> (ø)
unittests-flytestdlib 55.35% <ø> (+0.02%) ⬆️

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

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

@Sovietaced
Copy link
Member Author

A few small suggestions, otherwise LGTM!

Thanks for the review!

@davidmirror-ops
Copy link
Contributor

is there a way to re-trigger CI? (besides pushing a new commit)

@neverett
Copy link
Contributor

@Sovietaced @davidmirror-ops Bumping this -- can you merge master in to re-trigger the tests and ensure no merge conflicts? If the tests pass, I think we should be able to merge this PR.

@Sovietaced Sovietaced closed this Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants