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

Fix model version argument conflicting with clap version argument #39

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

DrChat
Copy link
Contributor

@DrChat DrChat commented Sep 8, 2024

Both clap and this example provide a version argument, which causes a panic at runtime when arguments are parsed.
The easiest way to fix this is to rename the model's version argument.

@laggui
Copy link
Member

laggui commented Sep 9, 2024

Thanks for looking into this!

Weirdly I am not having this issue on my end, do you mind sharing how you are providing the argument and what error you're getting?

@DrChat
Copy link
Contributor Author

DrChat commented Sep 11, 2024

You have to run it with this command line to see that error:

> cargo run --features wgpu,llama3 --example chat -- --help

thread 'main' panicked at C:\Users\Justin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\clap_builder-4.5.17\src\builder\debug_asserts.rs:86:13:
Command llama-burn: Argument names must be unique, but 'version' is in use by more than one argument or group (call `cmd.disable_version_flag(true)` to remove the auto-generated `--version`)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\examples\chat.exe --help` (exit code: 101)

Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

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

Ahhh ok I see! Didn't try --help so I never stumbled upon that 😅

Thanks for the response and fix!

@laggui laggui merged commit f2a56b4 into tracel-ai:main Sep 11, 2024
2 checks passed
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.

2 participants