Skip to content

Commit 8b66fe4

Browse files
committed
chore: huggingface-hub is optional requirement
1 parent b4c19d7 commit 8b66fe4

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ dependencies = [
3636
"httpx >=0.26,<1",
3737
"humanfriendly >=10",
3838
"jinja2 >=3",
39-
"huggingface-hub >0.17",
4039
"marshmallow >=3.20,<4",
4140
"omegaconf >=2.3,<3",
4241
"psutil >=7,<8",
@@ -74,6 +73,9 @@ docs = [
7473
"sphinx-codeautolink>=0.15",
7574
"sphinx-copybutton>=0.5",
7675
]
76+
huggingface = [
77+
"huggingface-hub>0.17",
78+
]
7779
ssh = [
7880
"paramiko>=3.3",
7981
"fabric>=3",

src/experimaestro/huggingface.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22
from typing import Optional, Union
33
from experimaestro.core.context import SerializationContext, SerializedPath
44
from experimaestro.core.objects import ConfigInformation, ConfigMixin
5-
from huggingface_hub import ModelHubMixin, hf_hub_download, snapshot_download
65
import os
76

7+
try:
8+
from huggingface_hub import ModelHubMixin, hf_hub_download, snapshot_download
9+
except ImportError:
10+
raise ImportError(
11+
"huggingface-hub is required for ExperimaestroHFHub. "
12+
"Install it with: pip install experimaestro[huggingface]"
13+
)
14+
815

916
class ExperimaestroHFHub(ModelHubMixin):
1017
"""Defines models that can be uploaded/downloaded from the Hub

src/experimaestro/launchers/slurm/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,9 @@ class SlurmOptions:
833833
nodelist: Optional[str] = None
834834
"""Request a specific list of hosts"""
835835

836+
ntasks_per_node: Optional[int] = None
837+
"""Number of tasks to run on each node"""
838+
836839
# GPU-related
837840
gpus: Optional[int] = None
838841
"""Number of GPUs"""

0 commit comments

Comments
 (0)