Skip to content

Fix circular import for lm_eval #6572

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

Merged
merged 1 commit into from
Oct 30, 2024
Merged

Fix circular import for lm_eval #6572

merged 1 commit into from
Oct 30, 2024

Conversation

guangy10
Copy link
Contributor

Issue:

2024-10-29T23:30:30.1159011Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/lm_eval/api/metrics.py", line 12, in <module>
2024-10-29T23:30:30.1159914Z     from lm_eval.api.registry import register_aggregation, register_metric
2024-10-29T23:30:30.1160902Z   File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/lm_eval/api/registry.py", line 6, in <module>
2024-10-29T23:30:30.1161635Z     from lm_eval.api.model import LM
2024-10-29T23:30:30.1163006Z ImportError: cannot import name 'LM' from partially initialized module 'lm_eval.api.model' (most likely due to a circular import) (/opt/conda/envs/py_3.10/lib/python3.10/site-packages/lm_eval/api/model.py)
2024-10-29T23:30:30.1181885Z ##[error]Process completed with exit code 1.

Errors in CI: https://github.com/pytorch/executorch/actions/runs/11583907843/job/32250015409

@guangy10 guangy10 requested a review from Jack-Khuu October 30, 2024 00:02
Copy link

pytorch-bot bot commented Oct 30, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/6572

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit fdcfb90 with merge base 538575f (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 30, 2024
@guangy10 guangy10 requested a review from helunwencser October 30, 2024 00:02
@facebook-github-bot
Copy link
Contributor

@guangy10 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@@ -159,7 +158,7 @@ def _model_call(self, inps):
def gen_eval_wrapper(
model_name: str,
args: argparse.ArgumentParser,
) -> LM:
):
"""
Generates a wrapper interface around the provided model and tokenizer for
Copy link
Contributor

Choose a reason for hiding this comment

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

it can return EagerEvalWrapper instead.

@guangy10 guangy10 merged commit 4a627d4 into main Oct 30, 2024
39 of 41 checks passed
@guangy10 guangy10 deleted the fix_lm_eval_cicular_import branch October 30, 2024 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants