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

SupertMetric: sentence_transformers module not found #36

Open
ankitk2109 opened this issue Apr 5, 2022 · 2 comments
Open

SupertMetric: sentence_transformers module not found #36

ankitk2109 opened this issue Apr 5, 2022 · 2 comments

Comments

@ankitk2109
Copy link

ankitk2109 commented Apr 5, 2022

Error:
ModuleNotFoundError: No module named 'sentence_transformers' In call to configurable 'SupertMetric' (<class 'summ_eval.supert_metric.SupertMetric'>)

Version:
0.891

Description
Tried the new summ_eval package but still getting this issue in the reference-free evaluation metric.

Code to Reproduce Error

ARTICLE = "The ex-Reading defender denied fraudulent trading charges relating to the Sodje Sports Foundation - a charity to raise money for Nigerian sport. Mr Sodje, 37, is jointly charged with elder brothers Efe, 44, Bright, 50 and Stephen, 42. Appearing at the Old Bailey earlier, all four denied the offence. The charge relates to offences that allegedly took place between 2008 and 2014. Sam, from Kent, Efe and Bright, of Greater Manchester, and Stephen, from Bexley, are due to stand trial in July. They were all released on bail."
SUM = "Former Premier League footballer Sam Sodje has appeared in court alongside three brothers accused of charity fraud."

def test_supert_single():
    metric = SupertMetric()
    score = metric.evaluate_example(SUM, ARTICLE)
    return score

print(test_supert_single())
@ankitk2109 ankitk2109 changed the title SupertMetric: sentence_transformers Module not found SupertMetric: sentence_transformers module not found Apr 5, 2022
@Alex-Fabbri
Copy link
Contributor

When you run the metric for the first time, it should prompt you to add summ_eval to your PYTHONPATH here. Let me know if you're not being prompted to do so when running this.

@ankitk2109
Copy link
Author

Thanks, Alex for your response.

Yes, It asked and I did set up the PYHTONPATH.

PYTHONPATH=$PYTHONPATH: path\to\my\pc\VirtualEnvs\SummEval\lib\site-packages\summ_eval

But still getting this error.

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

No branches or pull requests

2 participants