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

Running agent.arun(input=df) with environment=None is totally valid. #98

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

chemeris
Copy link
Contributor

Otherwise this code requires us to create an dummy async environment which is not used in the code and not even possible with the current code base.

@robot-ci-heartex robot-ci-heartex marked this pull request as draft April 24, 2024 08:06
Copy link
Contributor

@niklub niklub left a comment

Choose a reason for hiding this comment

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

Thanks for the fix. Although I totally agree with your proposal, it is still interesting how do you specifically use async call without async environment? It would be great if you could provide an example code so we would incorporate it in our future tutorials

@chemeris
Copy link
Contributor Author

chemeris commented Apr 25, 2024

Thank you, and I look forward to having this merged.

I can't provide an example code, unfortunately, but the code we're writing is based on the classification_skill.ipynb example. We simply changed the synchronous agent.run() to asynchronous await agent.arun().

Two reasons for this:

  1. We're running in an async FastAPI handler anyway, so why not?
  2. The async agent supports setting temperature=0, while sync one doesn't. And given the default temperature is AFAIK set to 1, it reduces reliability of the classification. And in general it looked like sync code is pretty much abandoned in favor for the new async one.

That said, I always thought that an environment is only needed during "teaching". Are you saying there are other use cases for it during normal production operation? The documentation is not very detailed on this part.

@chemeris
Copy link
Contributor Author

Hi, is there anything else required to merge this PR?

@chemeris chemeris marked this pull request as ready for review May 5, 2024 16:45
@chemeris
Copy link
Contributor Author

chemeris commented May 5, 2024

@niklub Please, could you merge this PR?
I see that the change is approved but it's still says "This workflow requires approval from a maintainer"

@robot-ci-heartex robot-ci-heartex marked this pull request as draft May 6, 2024 03:05
@chemeris
Copy link
Contributor Author

Any news?

@chemeris
Copy link
Contributor Author

Hi, ping about this PR - it's really simple

Otherwise this code requires us to create an dummy async environment
which is not used in the code and not even possible with the current
code base.
@chemeris chemeris marked this pull request as ready for review June 4, 2024 10:47
@chemeris
Copy link
Contributor Author

chemeris commented Jun 4, 2024

@niklub @matt-bernstein Any chance this can be merged?
It's a really simple one and @niklub has approved, but someone with write access to the repo has to click the button to merge.

@matt-bernstein matt-bernstein merged commit a20ead5 into HumanSignal:master Jun 4, 2024
2 checks passed
@matt-bernstein
Copy link
Contributor

Thanks for the nudge here. Appreciate not letting this one fall through the cracks. 🙂

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.

None yet

3 participants