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

Fix error in init town #8

Merged
merged 31 commits into from
May 9, 2024
Merged

Fix error in init town #8

merged 31 commits into from
May 9, 2024

Conversation

Monstertail
Copy link
Collaborator

@Monstertail Monstertail commented May 4, 2024

Closes #

πŸ“‘ Description

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed
  • Branch name follows type/descript (e.g. feature/add-llm-agents)
  • Ready for code review

β„Ή Additional Information

Test whether more relaxed mypy could reduce error during init-town here

@Monstertail
Copy link
Collaborator Author

Monstertail commented May 4, 2024

With a relaxed setting of mypy, the captured error of "import" is reduced compared with PR here.
e.g. of the eliminated bugs:
line 19-20

research-town/env_paper_submission.py:2: error: Skipping analyzing ".agent_base": module is installed, but missing library stubs or py.typed marker [import-untyped]
research-town/env_paper_submission.py:3: error: Skipping analyzing ".env_base": module is installed, but missing library stubs or py.typed marker [import-untyped]

line 28-30:

research-town/utils.py:8: error: Cannot find implementation or library stub for module named "faiss" [import-not-found]
research-town/utils.py:10: error: Cannot find implementation or library stub for module named "torch" [import-not-found]
research-town/utils.py:14: error: Cannot find implementation or library stub for module named "arxiv" [import-not-found]

After "mypy" relaxation, the total number of bugs is reduced from 98 to 82.
The remaining 82 bugs usually are about type checking. e.g. error: Function is missing a type annotation.
Shall we relax the type checking of function defs/function calls?
@lwaekfjlk @ft2023

@lwaekfjlk
Copy link
Member

Hi @ft2023 , Jinwei helps reduce some mypy errors and update the template. I think we can fix all these mypy error before mergin.

@lwaekfjlk lwaekfjlk mentioned this pull request May 9, 2024
6 tasks
@lwaekfjlk lwaekfjlk changed the title Bug/fix error in init town Fix error in init town May 9, 2024
@lwaekfjlk lwaekfjlk merged commit 913aee0 into main May 9, 2024
12 checks passed
chengzr01 pushed a commit that referenced this pull request May 15, 2024
* Add files via upload

* Add files via upload

* Add files via upload

* Test whether more relaxed mypy could reduce captured error in init-town

* sync template

* support research_town

* fix codespell bug

* fix formatting

* test pytest

* fix mypy errors

* try to pass pytest

* try to pass pytest

* pass all pre-commit

* pass all pre-commit

* pass all pre-commit

* fix isort bug

* fix isort bug

* fix mypy types

* fix ruff

* delete install mypy things

* fix isort

* fix isort

* update poetry dependency

* add torch support

* add isort support

* add transformers

* fix pytest error

* fix pytest error

* solve pytest warning

* solve pytest

---------

Co-authored-by: ft2023 <[email protected]>
Co-authored-by: Haofei Yu <[email protected]>
lwaekfjlk added a commit that referenced this pull request May 15, 2024
* Initial commit

* support project template (#1)

* support template

* init test

* change test file name

* fix mypy

* support empty class structure (#3)

* just create a structure

* pass all tests

* Make mytest checking more relaxed in research town (#7)

Import errors eliminated when push

* sync with template repo (#9)

* delete useless stubs and sync with template repo

* sync with project template

* Fix error in init town (#8)

* Add files via upload

* Add files via upload

* Add files via upload

* Test whether more relaxed mypy could reduce captured error in init-town

* sync template

* support research_town

* fix codespell bug

* fix formatting

* test pytest

* fix mypy errors

* try to pass pytest

* try to pass pytest

* pass all pre-commit

* pass all pre-commit

* pass all pre-commit

* fix isort bug

* fix isort bug

* fix mypy types

* fix ruff

* delete install mypy things

* fix isort

* fix isort

* update poetry dependency

* add torch support

* add isort support

* add transformers

* fix pytest error

* fix pytest error

* solve pytest warning

* solve pytest

---------

Co-authored-by: ft2023 <[email protected]>
Co-authored-by: Haofei Yu <[email protected]>

* fix typo in issue template (#18)

* Update codebase_reorg.yml

* fix bug issue

* split the utils and reorg (#19)

* split the utils

* fix isort

* move prompting into agents

* move prompting into agents

* Fix pytest warning on arxiv lib (#26)

* support communicate method for agent (#24)

Co-authored-by: Haofei Yu <[email protected]>

* support write abstract method for agent (#25)

* Implemented write abstract method for agent

* fix merge error

* add communicate func

---------

Co-authored-by: Haofei Yu <[email protected]>

* fix pytest segmentation fault bug (#29)

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Update test_agent_base.py

* Update agent_base.py

* Update test_agent_base.py

* fix ruff

* fix testing path error

---------

Co-authored-by: ft2023 <[email protected]>

* support review paper in agent class (#15)

* test review paper (#15)

* test review paper (#15)

* support find collaborators (#16)

* fix test errors

* fix test errors

* fix test error

* update prompting function name

---------

Co-authored-by: Haofei Yu <[email protected]>
Co-authored-by: Haofei Yu <[email protected]>
Co-authored-by: Jinwei <[email protected]>
Co-authored-by: ft2023 <[email protected]>
Co-authored-by: timsanders256 <[email protected]>
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.

3 participants