Page MenuHomePhabricator

JSON error in building models
Closed, ResolvedPublic

Description

Steps to reproduce:

(p3) ladsgroup@stat1005:~/editquality$ rm models/enwiki.*
(p3) ladsgroup@stat1005:~/editquality$ make enwiki_models
cat datasets/enwiki.labeled_revisions.w_cache.20k_2015.json | \
revscoring cv_train \
        revscoring.scoring.models.GradientBoosting \
        editquality.feature_lists.enwiki.damaging \
        damaging \
        --version=0.4.0 \
        -p 'learning_rate=0.01' \
        -p 'max_depth=7' \
        -p 'max_features=log2' \
        -p 'n_estimators=700' \
        --label-weight "true=10" \
        --pop-rate "true=0.034163555464634586" \
        --pop-rate "false=0.9658364445353654" \
        --center --scale > models/enwiki.damaging.gradient_boosting.model
Traceback (most recent call last):
  File "/srv/home/ladsgroup/p3/bin/revscoring", line 11, in <module>
    sys.exit(main())
  File "/srv/home/ladsgroup/p3/lib/python3.5/site-packages/revscoring/revscoring.py", line 51, in main
    module.main(sys.argv[2:])
  File "/srv/home/ladsgroup/p3/lib/python3.5/site-packages/revscoring/utilities/cv_train.py", line 93, in main
    estimator_params[key] = json.loads(value)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Makefile:623: recipe for target 'models/enwiki.damaging.gradient_boosting.model' failed
make: *** [models/enwiki.damaging.gradient_boosting.model] Error 1
make: *** Deleting file 'models/enwiki.damaging.gradient_boosting.model'

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Ladsgroup renamed this task from JSON error in buildign models to JSON error in building models.EditedFeb 28 2018, 7:23 PM

Changing -p 'max_features=log2' \ to -p 'max_features="log2"' \ fixes it. (Mind blown). This was one of changes I did while templating because I thought it won't affect anything at all but it seems it does.

Ladsgroup triaged this task as High priority.
Ladsgroup moved this task from Parked to Review on the Machine-Learning-Team (Active Tasks) board.
awight mentioned this in Unknown Object (Phame Post).May 2 2018, 6:41 PM
awight mentioned this in Unknown Object (Phame Post).
awight mentioned this in Unknown Object (Phame Post).