Skip to content

Commit a52692e

Browse files
committed
fix(srt): keep the fabric reference constant importable on Python 3.10
The binder runs in srtctl's Python 3.10 venv, where importing infx.clusters fails on typing.Self.
1 parent e38f0b7 commit a52692e

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎inferencex-e2e/infx/clusters/slurm.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from pydantic import AfterValidator, Field, PlainSerializer, field_validator, model_validator
1414

1515
from infx.clusters.base import Record, SchedulerSettings, Visibility, Volume
16+
from infx.srt_slurm.workload import FABRIC_REFERENCE
1617

1718
if TYPE_CHECKING:
1819
from infx.clusters import Cluster
@@ -157,7 +158,6 @@ def _repository_relative(cls, script: PurePosixPath) -> PurePosixPath:
157158
tuple[FabricName, ...], Field(min_length=1), PlainSerializer(",".join, return_type=str)
158159
]
159160
FabricNumber = Annotated[int, Field(ge=0), PlainSerializer(str, return_type=str)]
160-
FABRIC_REFERENCE = "@fabric."
161161

162162

163163
class Fabric(Record):

‎inferencex-e2e/infx/matrix/generate.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
import yaml
1313

1414
from infx.clusters import CLUSTER_LABEL_PREFIX
15-
from infx.clusters.slurm import FABRIC_REFERENCE, Fabric
15+
from infx.clusters.slurm import Fabric
1616
from infx.srt_slurm.variants import deep_merge, expand_variants
17+
from infx.srt_slurm.workload import FABRIC_REFERENCE
1718

1819
from .validation import (
1920
DEFAULT_AGENTIC_DURATION_SECONDS,

‎inferencex-e2e/infx/srt_slurm/workload.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818

1919
import yaml
2020

21-
from infx.clusters.slurm import FABRIC_REFERENCE
2221
from infx.config import repository_root
2322
from infx.srt_slurm.synthetic_acceptance import selected_recipes, spec_parameters
2423

24+
# Defined here: srtctl's venv runs this module on Python 3.10, so it cannot import infx.clusters.
25+
FABRIC_REFERENCE = "@fabric."
26+
2527
# Keyed by (agentic, multinode).
2628
SHARED_BLOCKS = {
2729
(False, False): Path("configs/srt-recipes/fixed-sequence-single.yaml"),

0 commit comments

Comments
 (0)