Skip to content

Conversation

@danieldk
Copy link
Owner

While at it, add progress bars to dpar-train.

While at it, add progress bars to dpar-train.
Copy link
Collaborator

@twuebi twuebi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes seem fine in general. When going through the PR I noticed that there are quite some generic error messages if paths are not valid. While it surfaced here, it is probably worth a separate issue, given that this PR is concerned with the training / parse functionality.

Besides this it'd also be nice to have a working minimum example / a quickstart for both train / parse, but I see how this could be separate issue as well.

let input_file = File::open(&matches.free[1]).or_exit();
let reader = conllx::Reader::new(BufReader::new(FileProgress::new(input_file).or_exit()));
eprintln!("Vectorizing training data...");
let (train_labels, train_inputs) = collect_data(&config, reader).or_exit();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The program exits with the unspecific message Error: No such file or directory (os error 2) if there's a faulty path in the config.

Informing the user which file was not found will ease troubleshooting.

Copy link
Owner Author

@danieldk danieldk Oct 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is one of the last projects that I haven't converted to stdinout 0.4 yet, which allows you to provide error messages, exit status, etc.

For training, all the parts are not there yet ;).

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, another upgrade that I have postponed is going from error-chain to failure, which makes it easier to add context to errors.

@danieldk danieldk merged commit f8427a9 into master Oct 31, 2018
@danieldk danieldk deleted the rewrite-train-parse branch November 5, 2018 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants