src-d / modelforge

Python library to share machine learning models easily and reliably.
Apache License 2.0
18 stars 13 forks source link

ALWAYS_SIGNOFF env variable is not taken into account #103

Closed warenlg closed 5 years ago

warenlg commented 5 years ago

Although you set the MODELFORGE_ALWAYS_SIGNOFF environment to True, the index is committed without a DCO:

➜  ~ modelforge publish -f .modelforge/bot_detection/bot_detection.asdf --meta .modelforge/bot_detection/template_meta.json
INFO:21f9:GitIndex:Cached index is not up to date, pulling warenlg/models
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
INFO:21f9:generic:Reading /home/waren/.modelforge/bot_detection/bot_detection.asdf (100.0 kB)...
INFO:21f9:gcs-backend:Connecting to the bucket...
INFO:21f9:gcs-backend:Uploading bot-detection from /home/waren/.modelforge/bot_detection/bot_detection.asdf...
[################################] 98304/100278 - 00:00:00
INFO:21f9:publish_model:Uploaded as https://storage.googleapis.com/models.cdn.sourced.tech/models%2Fbot-detection%2F599cf161-8e51-44ad-a576-3dd1518afb80.asdf
INFO:21f9:publish_model:Updating the models index...
INFO:21f9:GitIndex:Loaded /home/waren/.local/lib/python3.6/site-packages/modelforge/templates/template_model.md.jinja2
INFO:21f9:GitIndex:Loaded /home/waren/.local/lib/python3.6/site-packages/modelforge/templates/template_readme.md.jinja2
INFO:21f9:GitIndex:Added /home/waren/.modelforge/cache/source{d}/warenlg/models/bot-detection/599cf161-8e51-44ad-a576-3dd1518afb80.md
INFO:21f9:GitIndex:Updated /home/waren/.modelforge/cache/source{d}/warenlg/models/README.md
INFO:21f9:GitIndex:Writing the new index.json ...
INFO:21f9:GitIndex:Committing the index without DCO
INFO:21f9:GitIndex:Pushing the updated index ...
Push to ssh://git@github.com/warenlg/models successful.
INFO:21f9:publish_model:Successfully published

Indeed, the signoff value could never be None here https://github.com/src-d/modelforge/blob/master/modelforge/index.py#L51 as it is parsed from the arguments as action="store_true" https://github.com/src-d/modelforge/blob/master/modelforge/__main__.py#L37