Page MenuHomePhabricator

Specter of revscoring 1 haunting ORES
Closed, ResolvedPublic

Description

With ores-prod-deploy commit 97a1d80d20a0a4b9794bfdda28e96a96aeb94b1d, we're seeing a freak revscoring 1 error. While importing the arwiki_revert model during startup, the process fails with:

1[2017-11-06T22:19:47] Traceback (most recent call last):
2[2017-11-06T22:19:47] File "/srv/deployment/ores/deploy/ores_wsgi.py", line 6, in <module>
3[2017-11-06T22:19:47] application = wsgi.build()
4[2017-11-06T22:19:47] File "./ores/applications/wsgi.py", line 71, in build
5[2017-11-06T22:19:47] return server.configure(config)
6[2017-11-06T22:19:47] File "./ores/wsgi/server.py", line 28, in configure
7[2017-11-06T22:19:47] scoring_system = ScoringSystem.from_config(config, ss_name)
8[2017-11-06T22:19:47] File "./ores/scoring_systems/scoring_system.py", line 291, in from_config
9[2017-11-06T22:19:47] return Class.from_config(config, name)
10[2017-11-06T22:19:47] File "./ores/scoring_systems/celery_queue.py", line 228, in from_config
11[2017-11-06T22:19:47] config, name, section_key=section_key)
12[2017-11-06T22:19:47] File "./ores/scoring_systems/scoring_system.py", line 260, in _kwargs_from_config
13[2017-11-06T22:19:47] config, name, section_key=section_key)
14[2017-11-06T22:19:47] File "./ores/scoring_systems/celery_queue.py", line 220, in _build_context_map
15[2017-11-06T22:19:47] for name in section['scoring_contexts']}
16[2017-11-06T22:19:47] File "./ores/scoring_systems/celery_queue.py", line 220, in <dictcomp>
17[2017-11-06T22:19:47] for name in section['scoring_contexts']}
18[2017-11-06T22:19:47] File "./ores/scoring_context.py", line 214, in from_config
19[2017-11-06T22:19:47] scorer_model = Model.from_config(config, key)
20[2017-11-06T22:19:47] File "/srv/deployment/ores/venv/lib/python3.4/site-packages/revscoring/scoring/models/model.py", line 127, in from_config
21[2017-11-06T22:19:47] Class = yamlconf.import_module(class_path)
22[2017-11-06T22:19:47] File "/srv/deployment/ores/venv/lib/python3.4/site-packages/yamlconf/import_path.py", line 35, in import_path
23[2017-11-06T22:19:47] module = importlib.import_module(module_path)
24[2017-11-06T22:19:47] File "/srv/deployment/ores/venv/lib/python3.4/importlib/__init__.py", line 109, in import_module
25[2017-11-06T22:19:47] return _bootstrap._gcd_import(name[level:], package, level)
26[2017-11-06T22:19:47] File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
27[2017-11-06T22:19:47] File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
28[2017-11-06T22:19:47] File "<frozen importlib._bootstrap>", line 2224, in _find_and_load_unlocked
29[2017-11-06T22:19:47] ImportError: No module named 'revscoring.scorer_models'

Adding logging, I can show that this error happens when loading the first model, arwiki_reverted. That model can be loaded from the python interpreter using Model.load without issues.

The only discrepancy is that the config file still has scorer_models.defaults.class set to revscoring.scorer_models.MLScorerModel, which doesn't exist in revscoring 2. Is the default class coming into play, and why?

Event Timeline

Change 389726 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/services/ores/deploy@master] Correct default model class

https://gerrit.wikimedia.org/r/389726

Change 389726 merged by Ladsgroup:
[mediawiki/services/ores/deploy@master] Correct default model class

https://gerrit.wikimedia.org/r/389726

Change 389756 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/services/ores/deploy@master] Bump wikiclass

https://gerrit.wikimedia.org/r/389756

Change 389756 merged by Awight:
[mediawiki/services/ores/deploy@master] Bump wikiclass

https://gerrit.wikimedia.org/r/389756

Is this still relevant? All patches are merged here.