-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix to support int labels #219
Conversation
- Remove accidental use of `test_directory` for a feature file. - Update name of results file.
…ucationalTestingService/skll into feature/numpy_int64_label_fix
…lTestingService/skll into feature/numpy_int64_label_fix
task=cross_validate | ||
|
||
[Input] | ||
featuresets=[["test_int_labels_cv"]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're using train_file
, you shouldn't use featuresets
. In fact, I thought we had it set so that it would raise an exception if you tried to use both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I forgot to take that out
Thanks for catching this! |
…int64_label_fix fix to support int labels
Integer labels get converted to
numpy.int64
objects when the input is read in, and these can't be JSON-serialized. This causesrun_experiment
to fail when trying to write JSON results files---specifically, the descriptive statistics about the training data.I adapted this solution for a related problem:
http://stackoverflow.com/questions/11561932/why-does-json-dumpslistnp-arange5-fail-while-json-dumpsnp-arange5-tolis
Check out this craziness: