Hacker News new | ask | show | jobs
by kouteiheika 320 days ago
> LLMs hallucinated a package named "huggingface-cli" [...] it is not the name of the package [...] software is correctly installed with [...] huggingface_hub

It would be a good idea to disallow registering packages which only differ by '-'/'_'. Rust's crates.io does this, so if you register `foo-bar` you cannot register `foo_bar` anymore.

4 comments

That wouldnt help in this case though, one is -cli, the other is _hub
It is a command line tool "huggingface-cli", it's just installed with a differently-named pypi package. I wouldn't call this a full hallucination because anyone could make this mistake.
If a human user makes this mistake, they’d go to https://pypi.org/project/huggingface-cli/ and see that it a) either doesn’t exist, b) is an unrelated package, or c) that the verified list of its maintainers is unrelated than the maintainers on Hugging Face, Inc.’s GitHub repository.
That’s already how Python packages work. The problem here isn’t the hyphen/underscore.
Case insensitivity is so important.

Underscore is just capital hyphen.

I’d rather say underscore is a capital space :D
I'm tempted to make a keybind for this. Then I might actually start using snake_case instead of CamelCase, which on a certain level I know is better I just hate typing it.