Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Pass a seeding value to the fit method #816

Closed
Shotgun167 opened this issue Jun 27, 2019 · 2 comments
Closed

Pass a seeding value to the fit method #816

Shotgun167 opened this issue Jun 27, 2019 · 2 comments
Assignees

Comments

@Shotgun167
Copy link

Shotgun167 commented Jun 27, 2019

To get a deterministic model, you can pass in a value for the random seed to the fit method; however, there is no way to pass that in from the command line. Could we add an optional parameter to the train function of the CLI?

Also, it would be interesting if the value could be printed when a random value IS chosen.

We're retraining the engine every time we build. Pass rate is about 25% right now, because sometimes the engine is accurate and sometime it isn't. It's be cool to know if a particular range of values correlates with success.

@adrienball adrienball self-assigned this Jun 28, 2019
adrienball added a commit that referenced this issue Jul 2, 2019
@adrienball adrienball mentioned this issue Jul 2, 2019
3 tasks
@adrienball
Copy link
Contributor

Hey @Shotgun167 ,
I have done a bit of work to revamp the snips-nlu CLI, and I took the opportunity to add a random_seed parameter to the training CLI:

$ snips-nlu train --random_seed 42 sample_datasets/beverage_dataset.json nlu_engine

However, it is not possible in general to print the random_state used as it is an instance of numpy.random.RandomState which cannot be serialized easily.

@Shotgun167
Copy link
Author

Oh, well. I guy can't have everything. Now, can he? :-)

adrienball added a commit that referenced this issue Jul 9, 2019
* Import modules lazily to speed up startup time

* Use argparse instead of plac

* Add random_seed parameter to training CLI

addresses #816

* Fix issue with versions in CLI

* Fix issue with Python2.7

* Add tests for CLI argparser

* Do not import lazily snips_nlu subpackages

* Update Changelog
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants