Skip to content

Conversation

@abramowskia
Copy link
Contributor

I got errors when running metrics within an existing asyncio loop, the asyncio.run part makes the code fail in those cases. Submitting a bugfix.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 2, 2024
try:
score = asyncio.run(self._ascore(row=row, callbacks=group_cm))
loop = asyncio.get_event_loop()
score = loop.run_until_complete(self._ascore(row=row, callbacks=group_cm))
Copy link
Member

Choose a reason for hiding this comment

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

this will still fail in jupyter notebook envs right?

Copy link
Member

Choose a reason for hiding this comment

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

sorry my bad!

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Aug 5, 2024
@jjmachan
Copy link
Member

jjmachan commented Aug 5, 2024

added a few tests but thanks a lot for this PR ❤️

@jjmachan jjmachan merged commit d2486f1 into explodinggradients:main Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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