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

Local Sync Agent #2085

Merged
merged 8 commits into from
Jan 11, 2024
Merged

Conversation

Future-Outlier
Copy link
Member

@Future-Outlier Future-Outlier commented Jan 3, 2024

Tracking issue

flyteorg/flyte#3936

Why are the changes needed?

We want to support synchronous tasks in the agent.

What changes were proposed in this pull request?

Add sync agent local execution mode.

How was this patch tested?

I test this patch in this chatgpt agent PR.

Setup process

Screenshots

image

Check all the applicable boxes

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

Related PRs

#1822
#2086

Signed-off-by: Future Outlier <eric901201@gmai.com>
Copy link

codecov bot commented Jan 3, 2024

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (b5dbd85) 85.73% compared to head (6bca578) 83.84%.

Files Patch % Lines
flytekit/extend/backend/base_agent.py 52.17% 10 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2085      +/-   ##
==========================================
- Coverage   85.73%   83.84%   -1.90%     
==========================================
  Files         313      313              
  Lines       23435    23442       +7     
  Branches     3512     3514       +2     
==========================================
- Hits        20093    19655     -438     
- Misses       2734     3165     +431     
- Partials      608      622      +14     

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

class AsyncAgentExecutorMixin:
"""
This mixin class is used to run the agent task locally, and it's only used for local execution.
Task should inherit from this class if the task can be run in the agent.
It can handle asynchronous tasks and synchronous tasks.
Asynchronous tasks are for tasks running long, for example, running query job.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Asynchronous tasks are for tasks running long, for example, running query job.
Asynchronous tasks are tasks that take a long time to complete, such as running a query.

flytekit/extend/backend/base_agent.py Outdated Show resolved Hide resolved
flytekit/extend/backend/base_agent.py Outdated Show resolved Hide resolved
flytekit/extend/backend/base_agent.py Outdated Show resolved Hide resolved
Future Outlier added 2 commits January 3, 2024 22:29
Signed-off-by: Future Outlier <eric901201@gmai.com>
Signed-off-by: Future Outlier <eric901201@gmai.com>
@Future-Outlier Future-Outlier marked this pull request as ready for review January 3, 2024 14:38
Signed-off-by: Future Outlier <eric901201@gmai.com>
@Future-Outlier Future-Outlier mentioned this pull request Jan 3, 2024
3 tasks
Future Outlier added 4 commits January 3, 2024 23:56
change

Signed-off-by: Future Outlier <eric901201@gmai.com>
Signed-off-by: Future Outlier <eric901201@gmai.com>
Signed-off-by: Future Outlier <eric901201@gmai.com>
@pingsutw pingsutw merged commit ed91dd1 into flyteorg:master Jan 11, 2024
82 of 84 checks passed
@Future-Outlier Future-Outlier mentioned this pull request Mar 1, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants