Page MenuHomePhabricator

Scoring example no longer works
Closed, ResolvedPublic

Description

I submitted a pull request at
https://github.com/wikimedia/draftquality/pull/37
with an example based on
https://github.com/wikimedia/revscoring/blob/0872ba507455881b3ef1ccc88b6bc85efbffe900/examples/scoring.py

However, the original example no longer works:

$ python examples/scoring.py
Traceback (most recent call last):
  File "examples/scoring.py", line 3, in <module>
    from revscoring import ScorerModel
ImportError: cannot import name 'ScorerModel'

This is because it uses the old name ScorerModel, which was changed in
https://github.com/wikimedia/revscoring/commit/d59f5b9f90b82e6e27dc597da05aa46b0de92bfe
However, I'm not able to verify that it wokrs after updating it to Model:

$ python examples/scoring.py
Traceback (most recent call last):
  File "examples/scoring.py", line 6, in <module>
    with open("models/enwiki.damaging.linear_svc.model") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'models/enwiki.damaging.linear_svc.model'

In any case, I've submitted the update at https://github.com/wikimedia/revscoring/pull/486.