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

When evaluation done, add case which all theorem is discarded. Modify num_gpus in ray.init #24

Merged
merged 6 commits into from
Sep 24, 2023

Conversation

irene622
Copy link
Contributor

Hi, I experiment your code,
I think the some of code would be good if it is changed.

  1. After evaluation is done, in my experiment, all theorem are discarded, so I meet ZeroDivisionError.
    Hence, by using if, adding the case of all theorem are discarded can avoid the ZeroDivisionError.

  2. When evaluating with gpus and cpus more than 2 respectively,
    ray.init takes the argument num_gpus as num_cpus.
    It cause the error in case of num gpus and num cpus are not equal.
    I think it is typo, because it is easy to confuse num_cpus and num_gpus.
    So, add torch.cuda.device_count() to find num_gpus instead of getting num_gpus as arguments.

Thank you for spending your time,
I hope to merge my modification soon. :)

prover/evaluate.py Outdated Show resolved Hide resolved
prover/proof_search.py Outdated Show resolved Hide resolved
@yangky11
Copy link
Member

Thank you for the PR! Please see my comments in the code.

@irene622 irene622 closed this Sep 21, 2023
@irene622 irene622 reopened this Sep 21, 2023
@irene622
Copy link
Contributor Author

Thanks, I change them!
Please merge them. :)

@yangky11
Copy link
Member

@irene622 The black code formatter failed. Could you please fix it (black prover/evaluate.py)? Thx

Copy link
Member

@yangky11 yangky11 left a comment

Choose a reason for hiding this comment

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

Please fix the code format issue.

@irene622
Copy link
Contributor Author

Oh, I done black prover/evaluate.py.

Copy link
Member

@yangky11 yangky11 left a comment

Choose a reason for hiding this comment

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

looks good to me, thx!

@yangky11 yangky11 merged commit 54df3b5 into lean-dojo:main Sep 24, 2023
1 check failed
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.

2 participants