sotopia-lab / sotopia

Sotopia: an Open-ended Social Learning Environment (ICLR 2024 spotlight)
https://docs.sotopia.world
MIT License
127 stars 16 forks source link

[FEAT]: mypy workflow testing speed can be optimized #79

Closed lwaekfjlk closed 1 week ago

lwaekfjlk commented 1 month ago

Description

Do we need to install --all-extras for mypy testing? I think it would take a lot of time. Only typing-related packages are required.

Additional Information

No response

ProKil commented 1 month ago

Feel free to open a PR that removes --all-extra

ProKil commented 1 month ago

Fixed in #80

lwaekfjlk commented 1 month ago

nice! Just saw the comment.

lwaekfjlk commented 1 month ago

@ProKil do you have any other suggestions on saving CI time with workflow. I faced a exceeding limit of 2000 min when running another codebase.

ProKil commented 1 month ago

One way is to limit CI to PRs. We could change mypy to pyright to save time, but I have not tested that yet.

lwaekfjlk commented 1 month ago

thanks. good to hear.

ProKil commented 1 month ago

There are several things that we could optimize including using a docker that has mypy and other tools pre-installed, and use local cache. You can also use self-hosted test runners and another tip I just found is that you can easily test run your commit before pushing using this https://github.com/nektos/act?tab=readme-ov-file. Maybe we should add this tip to the contribution guide.

lwaekfjlk commented 1 month ago

sounds good. Good to know all of these. I am trying to update my project-template to optimize its CI time.

lwaekfjlk commented 2 weeks ago

@ProKil I personally find that act is kind of not so easy to use? Should we add this into the contribution guide?

ProKil commented 1 week ago

Already improved in https://github.com/sotopia-lab/sotopia/blob/7de34af7b52aadf85c5c4302e660f745032caff8/.github/workflows/mypy.yml#L7-L17

ProKil commented 1 week ago

@ProKil I personally find that act is kind of not so easy to use? Should we add this into the contribution guide?

Does "act" mean "agent.act"?