Skip to content
Branch: master
Find file History
benjamin-work and ottonemo Feature: quick CLIs (#390)
* Helper functions to for CLIs with almost boilerplate.

Add a helper function parse_args that makes it very simple to build
custom CLIs. Add an example for the usage of this and extend docs.

* Extend and adjust README and docs.

* Add CLI implementation and unit tests.

* Update dev requirements: pytest >= 3.4

* Add fire library to dev requirements.

* Remove fire from dev requirements, install in travis.

fire is not on the conda channels, so install would fail. Also, modify
cli tests to be skipped if fire is not installed.

* Correct typos.

* Add the option to have custom defaults.

E.g., if you would like to use batch_size=256 as a default instead of
128, you can now pass a dict `{'batch_size': 256}` to
`parse_args`. This will not only update your model to use those
defaults but also change the help to show your custom defaults.

To achieve the latter effect, it was necessary to parse the sklearn
docstrings for default values and replace them by the new
default. This turned out to be more difficult than expected because
the docstring defaults are not always written in the same fashion. I
tried to catch some variants that I found but there are certainly more
variants out there. It should, however, work fine with the way we
write docstrings in skorch.

* Fix typo in docs/user/helper.rst

Co-Authored-By: benjamin-work <>

* Update docstring, remove unnecessary try..except.

* Simplify function that matches span for docstring match.
Latest commit 3712369 Dec 13, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmarks Rewrite History to not use any recursion. (#312) Sep 26, 2018
datasets Add a benchmark based on MNIST data. May 25, 2018
nuclei_image_segmentation [MRG] Adds optimizer and history to save/load_params (#360) Oct 22, 2018
rnn_classifer Explain how to use Dask to parallelize grid search across GPUs Jun 14, 2018
word_language_model Non-functional code style changes. (#377) Nov 12, 2018
You can’t perform that action at this time.