Skip to content
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

Adding mode flag to train command #1113

Merged
merged 3 commits into from Feb 10, 2021
Merged

Conversation

munozemilio
Copy link
Member

Fixes #1087

Copy link
Contributor

@joshgummersall joshgummersall left a comment

Choose a reason for hiding this comment

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

One suggestion, one question. LGTM though.

packages/luis/src/api/http-request.ts Outdated Show resolved Hide resolved
@@ -37,7 +38,7 @@ export default class LuisTrainRun extends Command {
utils.validateRequiredProps(requiredProps)

try {
const trainingRequestStatus = await Train.train({subscriptionKey, endpoint, appId}, versionId)
const trainingRequestStatus = await Train.train({subscriptionKey, endpoint, appId}, versionId, flags.mode)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are string flags defaulted to ''?

Copy link
Member Author

Choose a reason for hiding this comment

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

to undefined

Copy link
Contributor

Choose a reason for hiding this comment

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

It's pedantic, but if undefined is a valid type for the mode parameter, the train function signature should be (..., mode?: string). strict mode would raise an error here.

@munozemilio munozemilio merged commit d80ed6a into main Feb 10, 2021
@munozemilio munozemilio deleted the emimunoz/luis-train-mode branch February 10, 2021 19:37
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.

Add a flag to trigger alternate training mode to BF LUIS:Train
2 participants