Skip to content

[Feature]: Expose a --timeout flag for remote Hub fetching #27

Description

@pipe1os

Problem Description

In src/modelinfo/parsers/huggingface.py, the network request timeout is hardcoded to 10 seconds: urllib.request.urlopen(req, timeout=10). For users with slow connections fetching massive sharded index manifests, this can cause unexpected timeouts.

Proposed Solution

  1. Add a --timeout argument to argparse in src/modelinfo/cli.py (default: 10.0).
  2. Pass this argument down through analyze_model to fetch_huggingface_repo.
  3. Replace the hardcoded 10 with the user-provided timeout value.

Alternatives Considered

No response

Additional Context

This is a great first issue for those wanting to touch the CLI arguments.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions