This repository was archived by the owner on Jan 7, 2025. It is now read-only.
Support for downloading on-device models#46
Merged
Conversation
thisismatu
suggested changes
Sep 23, 2022
thisismatu
left a comment
There was a problem hiding this comment.
@teelisyys looks good, but few things needs addressing:
1. When entering an invalid option to the model flag the error message is printed twice along with the help message. One error message should be sufficient without the help message.
> ./bin/speechly download 12345 testi --model asd
Error: "asd" is not a valid option. Available options are: ort, tflite, coreml and all
Usage:
speechly download [<app_id>] <directory> [flags]
Examples:
speechly download <app_id> /path/to/config
speechly download -a <app_id> .
speechly download -a <app_id> . --model tflite
Flags:
-a, --app string Which application's configuration or model to download. Can be given as the first positional argument.
-h, --help help for download
--model string Specify the machine learning framework model to download. Available options are: ort, tflite, coreml and all. This feature is available on Enterprise plans (https://speechly.com/pricing)
Error executing command: "asd" is not a valid option. Available options are: ort, tflite, coreml and all
2. When entering just some random app_id i get a memory access violation.
> ./bin/speechly download 9dbba3e2-0d75-40db-a45a-a351d6cb8ce7 testi --model=all
Downloading to /Users/matu/Sites/speechly/cli/testi
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x15277d6]
goroutine 1 [running]:
github.com/speechly/cli/cmd.downloadCurrentModel({0x174c268, 0xc0002180f0}, {0xc0000425d0, 0x24}, {0x7ff7bfeffb28, 0x24}, {0x16510b5, 0x3})
/Users/matu/Sites/speechly/cli/cmd/download.go:177 +0x356
github.com/speechly/cli/cmd.glob..func18(0x1af4660, {0xc000218330, 0x2, 0x3?})
/Users/matu/Sites/speechly/cli/cmd/download.go:67 +0x287
github.com/spf13/cobra.(*Command).execute(0x1af4660, {0xc000218300, 0x3, 0x3})
/Users/matu/go/pkg/mod/github.com/spf13/[email protected]/command.go:860 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0x1af5ce0)
/Users/matu/go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
/Users/matu/go/pkg/mod/github.com/spf13/[email protected]/command.go:902
github.com/spf13/cobra.(*Command).ExecuteContext(...)
/Users/matu/go/pkg/mod/github.com/spf13/[email protected]/command.go:895
github.com/speechly/cli/cmd.Execute()
/Users/matu/Sites/speechly/cli/cmd/root.go:41 +0x65
main.main()
/Users/matu/Sites/speechly/cli/main.go:10 +0x19
thisismatu
reviewed
Sep 23, 2022
Contributor
Author
|
thisismatu
approved these changes
Sep 26, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.