-
Notifications
You must be signed in to change notification settings - Fork 175
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
Datagen API polish #3951
Datagen API polish #3951
Conversation
(happy to review if needed but at this point there's a lot of stuff going on in datagen and I've only kept up with the high level things) |
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.
Seems good; some minor comments/questions
#[arg(help = "Load a JSON config. All options other than --verbose are ignored.")] | ||
config: Option<PathBuf>, |
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.
Observation: you made this a positional argument
provider/datagen/src/lib.rs
Outdated
/// | [`Preresolved`] | No | Small | | ||
/// | [`Runtime`] | Required, Automatic | Smallest | | ||
/// | [`RuntimeManual`] | Required, Manual | Smallest | | ||
/// | [`Preresolved`] | Not required | Small | |
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.
The problem with runtime fallback on preresolved is that we don't guarantee that things like en-001
are present. You really shouldn't be using preresolved if you plan on runtime fallback.
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.
do you have a suggestion? I'd rather say required for the first two
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.
Now about "N/A" or "Not applicable"
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.
Not supported? If it's actually a problem we should discourage people from doing it
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.
Ok
/// fail with the appropriate error: | ||
/// * [`is_missing_cldr_error`](Self::is_missing_cldr_error) | ||
/// * [`is_missing_icuexport_error`](Self::is_missing_icuexport_error) | ||
/// * [`is_missing_segmenter_lstm_error`](Self::is_missing_segmenter_lstm_error) |
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.
Why did you move these onto DatagenProvider
? I think they were good as free functions in the error module
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.
Free functions are messy. These errors are a property of the DatagenProvider, not of any other part of datagen.
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.
lgtm modulo the preresolved docs
#3564