test(neuron): try to reduce download errors

This commit is contained in:
David Corvoysier 2025-02-25 12:54:22 +00:00
parent be06297e62
commit b370902626

View File

@ -249,7 +249,9 @@ def neuron_model_config(request):
with TemporaryDirectory() as neuron_model_path: with TemporaryDirectory() as neuron_model_path:
logger.info(f"Fetching {neuron_model_id} from the HuggingFace hub") logger.info(f"Fetching {neuron_model_id} from the HuggingFace hub")
hub = huggingface_hub.HfApi() hub = huggingface_hub.HfApi()
hub.snapshot_download(neuron_model_id, local_dir=neuron_model_path) hub.snapshot_download(
neuron_model_id, etag_timeout=30, local_dir=neuron_model_path
)
# Add dynamic parameters to the model configuration # Add dynamic parameters to the model configuration
model_config["neuron_model_path"] = neuron_model_path model_config["neuron_model_path"] = neuron_model_path
model_config["neuron_model_id"] = neuron_model_id model_config["neuron_model_id"] = neuron_model_id