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

Log Agents In The Agent Server #2309

Merged
merged 4 commits into from
Apr 7, 2024
Merged

Log Agents In The Agent Server #2309

merged 4 commits into from
Apr 7, 2024

Conversation

Future-Outlier
Copy link
Member

@Future-Outlier Future-Outlier commented Mar 29, 2024

Tracking issue

flyteorg/flyte#3936

Why are the changes needed?

Let users can observe available agents in the agent pod.

What changes were proposed in this pull request?

add a function print_agents_metadata

def print_agents_metadata():
    from flytekit.extend.backend.base_agent import AgentRegistry

    agents = AgentRegistry.list_agents()
    for agent in agents:
        name = agent.name
        task_type = "sync" if agent.is_sync else "async"
        for task_category in agent.supported_task_categories:
            click.secho(
                f"Starting {name} supports {task_type} task {task_category.name} with version {task_category.version}",
                fg="blue",
            )

How was this patch tested?

  1. Use the pyflyte serve agent command to print output to the terminal.
  2. unit tests

Setup process

pyflyte serve agent

Screenshots

image

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Signed-off-by: Future-Outlier <[email protected]>
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Mar 29, 2024
Copy link

codecov bot commented Mar 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.95%. Comparing base (8ab9a3c) to head (b1150ed).
Report is 27 commits behind head on master.

❗ Current head b1150ed differs from pull request most recent head 9fb8af8. Consider uploading reports for the commit 9fb8af8 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2309      +/-   ##
==========================================
- Coverage   83.48%   75.95%   -7.54%     
==========================================
  Files         324      180     -144     
  Lines       24720    18134    -6586     
  Branches     3517     3547      +30     
==========================================
- Hits        20637    13773    -6864     
- Misses       3451     3763     +312     
+ Partials      632      598      -34     

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

Signed-off-by: Future-Outlier <[email protected]>
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Mar 29, 2024
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
@dosubot dosubot bot added the lgtm This PR has been approved by maintainer label Apr 7, 2024
@Future-Outlier
Copy link
Member Author

@pingsutw
Thank you so much for doing this on your weekend.
Thank you.

image

@Future-Outlier Future-Outlier merged commit 4c6e704 into master Apr 7, 2024
47 checks passed
fiedlerNr9 pushed a commit that referenced this pull request Jul 25, 2024
* Log Agents In The Agent Server

Signed-off-by: Future-Outlier <[email protected]>

* add tests

Signed-off-by: Future-Outlier <[email protected]>

* nit

Signed-off-by: Kevin Su <[email protected]>

* nit

Signed-off-by: Kevin Su <[email protected]>

---------

Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Co-authored-by: Kevin Su <[email protected]>
Signed-off-by: Jan Fiedler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants