Module: sarpyx.utils.hf

File: sarpyx/utils/hf.py

No module docstring available; module purpose is inferred from implementation.

Exported Symbols (__all__)

No explicit __all__ list. Public symbols inferred from implementation.

Public Functions (2)

download_folder_from_hf function

Download a specific folder from Hugging Face Hub repository.

File location: sarpyx/utils/hf.py:7

Signature

download_folder_from_hf(repo_id: str, folder_name: str, local_dir: str='/Users/roberto.delprete/Library/CloudStorage/OneDrive-ESA/Desktop/Repos/SARPYX/data', repo_type: str='dataset') -> str

Parameters

ParameterTypeRequiredDefaultDescription
repo_idstryes-The repository ID (e.g., 'username/repo-name').
folder_namestryes-The name of the folder to download.
local_dirstrno'/Users/roberto.delprete/Library/CloudStorage/OneDrive-ESA/Desktop/Repos/SARPYX/data'Local directory where to save the folder. Defaults to './downloads'.
repo_typestrno'dataset'Type of repository ('dataset', 'model', 'space'). Defaults to 'dataset'.

Return Type

str

str: Path to the downloaded folder.

Exceptions

None explicitly documented; inferred from implementation.

Side Effects

  • io

Example Usage

from sarpyx.utils.hf import download_folder_from_hf

result = download_folder_from_hf(repo_id=<repo_id>, folder_name=<folder_name>)

Edge Cases

Includes optional parameters with implementation-defined fallback behavior.

parse_arguments function

Parse command-line arguments for downloading a folder from a Hugging Face Hub repository.

File location: sarpyx/utils/hf.py:59

Signature

parse_arguments() -> argparse.Namespace

Parameters

ParameterTypeRequiredDefaultDescription
--no-No explicit public parameters; behavior inferred from implementation.

Return Type

argparse.Namespace

argparse.Namespace: Parsed arguments.

Exceptions

None explicitly documented; inferred from implementation.

Side Effects

  • inferred from implementation

Example Usage

from sarpyx.utils.hf import parse_arguments

result = parse_arguments()

Edge Cases

No explicit edge-case section found; behavior is inferred from implementation.

Public Classes (0)

No public classes detected.