integration: look for the "hf" tool in integration tests (#16765)
The "huggingface-cli" tool is deprecated, so only try to use the "hf" tool.
This commit is contained in:
@@ -48,10 +48,8 @@ func skipIfRemote(t *testing.T) {
|
||||
|
||||
// findHFCLI returns the path to the HuggingFace CLI, or "" if not found.
|
||||
func findHFCLI() string {
|
||||
for _, name := range []string{"huggingface-cli", "hf"} {
|
||||
if p, err := exec.LookPath(name); err == nil {
|
||||
return p
|
||||
}
|
||||
if p, err := exec.LookPath("hf"); err == nil {
|
||||
return p
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user