Skip to content

Add HuggingFace Jobs step operator - #4520

Merged
strickvl merged 17 commits into
developfrom
feature/hf-jobs-step-operator
Nov 29, 2026
Merged

strickvl merged 17 commits into
developfrom
feature/hf-jobs-step-operator

Conversation

@strickvl

@strickvl strickvl commented Feb 23, 2026 •

Copy link
Copy Markdown
Contributor

VIDEO DEMO

Summary

Adds a new HuggingFace Jobs step operator to the existing huggingface integration, allowing individual ZenML pipeline steps to run as HF Jobs on Hugging Face infrastructure with CPU/GPU support.

  • Step operator implementation — submits steps as HF Jobs via huggingface_hub's Jobs API (run_job, inspect_job, cancel_job), delegates polling and server-status fallback to BaseStepOperator.wait(), cancels the remote job on stop/interrupt signals or metadata-publish failures, and persists hf_job_id, hf_job_namespace (falling back to job.owner.name), and clickable job URLs in step run metadata.
  • Async step operator interface — implements submit() / get_status() / wait() / cancel(), supporting both static and dynamic pipelines.
  • Flavor & config — huggingface-jobs flavor with component-level config (token via SecretField, pass_env_as_secrets) and per-step settings (hardware_flavor, timeout, namespace). Hardware flavor strings (e.g., cpu-basic, a10g-small, a100x4, h200) are passed straight through to run_job.
  • Stack validation — requires remote artifact store, remote container registry, and image builder.
  • Token resolution & security — resolves the operator's Jobs API token via component token → huggingface_hub.get_token() (OIDC, HF_TOKEN, hf auth login cache across hub 0.x and 1.x) → legacy HUGGING_FACE_HUB_TOKEN. The operator token is used only for Jobs API calls and is not injected into job containers. Environment variables are sent as HF encrypted secrets by default (pass_env_as_secrets=True), and step-supplied HF_TOKEN/HUGGING_FACE_HUB_TOKEN are always routed to HF secrets. Warns if HF_DEBUG is enabled when submitting secrets.
  • Unit tests — 36 behavioral tests covering submit, wait (including KeyboardInterrupt / RunStoppedException / RunInterruptedException / STOPPED cancellation), get_status with real plain-string JobInfo.status.stage, cancel, validator, split_environment, _resolve_token, and _check_hf_jobs_availability. Tested with huggingface_hub==0.36.2, huggingface_hub==1.33.0, and without huggingface_hub installed.
  • Documentation — new docs page with updated step-operators overview table, TOC, and GitBook redirects.

Files changed

Area Files
Implementation step_operators/huggingface_jobs_step_operator.py, flavors/huggingface_jobs_step_operator_flavor.py
Integration wiring huggingface/__init__.py, huggingface/flavors/__init__.py, huggingface/step_operators/__init__.py
Tests tests/unit/integrations/huggingface/step_operators/test_huggingface_jobs_step_operator.py
Docs step-operators/huggingface-jobs.md, step-operators/README.md, toc.md, .gitbook.yaml

Requirements

  • huggingface_hub >= 0.34.0, < 2.0.0 (runtime-checked; base huggingface integration pin left unchanged to avoid a breaking dependency bump)
  • HF Pro/Team/Enterprise account with Jobs access

Test plan

  • Unit tests pass across huggingface_hub==0.36.2, huggingface_hub==1.33.0, and uninstalled CI mode (36 tests — pytest tests/unit/integrations/huggingface/step_operators/)
  • ruff, pydoclint, mypy, and lychee --offline clean on changed files
  • Live end-to-end tests on Hugging Face Jobs (huggingface_hub==1.33.0, cpu-basic, GCS artifact store, public Docker Hub repo):
    • Static pipeline (submit → wait): passed, 7 polls, whoami called once, artifact round-tripped, confirmed operator HF token not leaked into container, metadata persisted (hf_job_id=6b06f9bfb6a90bbe997db923)
    • Dynamic pipeline (step.submit(...)): passed, async get_status() polling + future.load() artifact round-trip (hf_job_id=6b06fa7db6a90bbe997dbbcd)
    • Live SIGINT cancel during wait(): remote HF job canceled and confirmed stage='CANCELED' via inspect_job() (hf_job_id=6b06fadfd91f621b93082d55)
  • CI

Adds a new step operator to the existing HuggingFace integration that
runs individual ZenML steps as HF Jobs. The operator submits Docker
containers to HF infrastructure via run_job(), polls until completion
with inspect_job(), streams logs, and handles cancellation on interrupt.

Key features:
- Config/Settings/Flavor classes following Modal/Vertex patterns
- Stack validation requiring remote artifact store + container registry
- Environment variables sent as HF encrypted secrets by default
- Per-step overrides for hardware flavor, timeout, and namespace
- Token resolution chain: config → HF_TOKEN env → cached login
- Runtime guard for huggingface_hub Jobs API availability
Adds a new docs page following the Modal step operator template,
covering prerequisites, registration, token resolution, env-as-secrets
behavior, per-step settings, and config reference tables. Updates the
step operators overview table, TOC navigation, and GitBook redirects.
@github-actions github-actions Bot added internal To filter out internal PRs and issues enhancement New feature or request labels Feb 23, 2026
@strickvl strickvl added the release-notes Release notes will be attached and used publicly for this PR. label Feb 23, 2026
- Fix stage.value AttributeError when HF API returns string instead of
  JobStage enum in error cases
- Publish HF Job URL as step run metadata (orchestrator_url,
  orchestrator_logs_url, orchestrator_run_id) so it appears as a
  clickable link in the ZenML dashboard
- Document public container registry requirement (HF Jobs cannot pull
  from private registries like GCR/ECR/ACR)
- Document HF Spaces Docker images as an alternative registry option
- Add GPU hardware section with CUDA base image instructions
- Fix step_operator=True typos to step_operator="<NAME>" in docs
Address code review findings: improve version checking with actionable
error messages, prevent HF token leakage in plain env vars, use public
SpaceHardware import path, add polling retry/backoff with best-effort
job cancellation, make log streaming opt-in, fix test portability for
CI environments without huggingface_hub, and align docs with behavior.
…ep-operator

# Conflicts:
#	docs/book/component-guide/step-operators/README.md
Adapt the HuggingFace Jobs step operator to the new submit/get_status/
cancel interface introduced in PR #4515. This is required for dynamic
pipeline support.

- Add submit() that creates the HF Job and returns immediately,
  persisting job identity in step run metadata
- Add get_status() that maps HF JobStage to ExecutionStatus
- Add cancel() with best-effort cancellation via cancel_job
- Override wait() to preserve HF-specific polling (configurable
  interval, transient error retry, optional log streaming)
- Refactor launch() as thin legacy wrapper (submit + wait)
- Add _get_job_identity() helper for metadata recovery
- Add 16 new unit tests for get_status, cancel, and _get_job_identity
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR has been inactive for 2 weeks and has been marked as stale.
Timeline:

  • Week 2 (now): First reminder - PR marked as stale
  • Week 4: PR will be automatically closed if no activity
    Please update this PR or leave a comment to keep it active. Any activity will reset the timer and remove the stale label.

@github-actions github-actions Bot added the stale label Mar 14, 2026
@strickvl strickvl removed the stale label Mar 15, 2026
- Use _HF_TOKEN_ENV_KEYS constant in _resolve_token() instead of
  hardcoding env var names (DRY fix)
- Stream logs without materializing full history into memory each poll
- Remove unnecessary hasattr(stage, "value") guards (JobStage is
  always an enum)
- Add clarifying comment on cancel() call in launch()
@github-actions

github-actions Bot commented Mar 15, 2026 •

Copy link
Copy Markdown
Contributor

✅ No broken links found!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledging that a lot of mocking going on here. Can strip it down even more if needed.

@strickvl
strickvl requested a review from safoinme March 16, 2026 08:36
@strickvl
strickvl marked this pull request as ready for review March 16, 2026 08:36
@github-actions

github-actions Bot commented Mar 16, 2026 •

Copy link
Copy Markdown
Contributor

Documentation Link Check Results

✅ Absolute links check passed
✅ Relative links check passed
Last checked: 2026-11-25 15:28:46 UTC

@strickvl strickvl added the run-slow-ci Tag that is used to trigger the slow-ci label Mar 16, 2026
Remove documented RuntimeError from get_status docstring (raised
by helper, not directly) and fix 404 SDK docs URL in HF Jobs page.
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR has been inactive for 2 weeks and has been marked as stale.
Timeline:

  • Week 2 (now): First reminder - PR marked as stale
  • Week 4: PR will be automatically closed if no activity
    Please update this PR or leave a comment to keep it active. Any activity will reset the timer and remove the stale label.

@github-actions github-actions Bot added the stale label Mar 31, 2026
@strickvl strickvl removed the stale label Mar 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR has been inactive for 2 weeks and has been marked as stale.
Timeline:

  • Week 2 (now): First reminder - PR marked as stale
  • Week 4: PR will be automatically closed if no activity
    Please update this PR or leave a comment to keep it active. Any activity will reset the timer and remove the stale label.

@github-actions github-actions Bot added the stale label Apr 15, 2026
@strickvl strickvl removed the stale label Apr 30, 2026
@github-actions

github-actions Bot commented Apr 30, 2026 •

Copy link
Copy Markdown
Contributor

✅ No broken links found!

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR has been inactive for 2 weeks and has been marked as stale.
Timeline:

  • Week 2 (now): First reminder - PR marked as stale
  • Week 4: PR will be automatically closed if no activity
    Please update this PR or leave a comment to keep it active. Any activity will reset the timer and remove the stale label.

@github-actions github-actions Bot added the stale label May 15, 2026
@strickvl strickvl removed the stale label May 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR has been inactive for 2 weeks and has been marked as stale.
Timeline:

  • Week 2 (now): First reminder - PR marked as stale
  • Week 4: PR will be automatically closed if no activity
    Please update this PR or leave a comment to keep it active. Any activity will reset the timer and remove the stale label.

@github-actions github-actions Bot added the stale label May 30, 2026
@strickvl strickvl removed the stale label Jun 2, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR has been inactive for 2 weeks and has been marked as stale.
Timeline:

  • Week 2 (now): First reminder - PR marked as stale
  • Week 4: PR will be automatically closed if no activity
    Please update this PR or leave a comment to keep it active. Any activity will reset the timer and remove the stale label.

@github-actions github-actions Bot added the stale label Jun 17, 2026
@strickvl strickvl removed the stale label Jun 17, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

⚠️ This PR has been inactive for 2 weeks and has been marked as stale.
Timeline:

  • Week 2 (now): First reminder - PR marked as stale
  • Week 4: PR will be automatically closed if no activity
    Please update this PR or leave a comment to keep it active. Any activity will reset the timer and remove the stale label.

@github-actions github-actions Bot added the stale label Jul 2, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔒 This PR has been automatically closed due to 4 weeks of inactivity.
If you'd like to continue working on this, please feel free to reopen it. We're happy to help you get it merged!

@github-actions github-actions Bot closed this Jul 16, 2026
@strickvl strickvl removed the stale label Nov 3, 2026
@strickvl strickvl reopened this Nov 3, 2026
@strickvl
strickvl requested a review from bcdurak November 3, 2026 17:48
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR has been inactive for 2 weeks and has been marked as stale.
Timeline:

  • Week 2 (now): First reminder - PR marked as stale
  • Week 4: PR will be automatically closed if no activity
    Please update this PR or leave a comment to keep it active. Any activity will reset the timer and remove the stale label.

@github-actions github-actions Bot added the stale label Nov 18, 2026
@strickvl strickvl removed the stale label Nov 18, 2026

@safoinme safoinme left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, Alex. HF Jobs is a nice addition, and the async lifecycle is the right shape. I went through it against current develop (the branch is ~7 months behind and conflicts in huggingface/__init__.py and the step-operators README; both are trivial to resolve).

The main blocker: wait() crashes on the first poll that finds a job still running (see the inline comment on L626), so static pipelines fail and leave the HF job running. Several other paths also return or fail without cancelling the remote job (polling errors, a swallowed metadata-publish failure, stop signals caught as transient errors). Valid Jobs hardware flavors like h200 are rejected, and every job gets the operator's HF token by default.

What I ran on the merge with develop: pytest tests/unit/integrations/huggingface/step_operators (33 passed) and mypy src/zenml/integrations/huggingface (clean). I couldn't do a live HF Jobs run. An end-to-end run (static + dynamic, including a cancel) would be great before merging, since the unit-test fakes hide the main bug.

logger.debug(
"HuggingFace Job %s stage: %s. Polling again in %ss.",
job_id,
stage.value,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This crashes on the first poll that finds the job still running. inspect_job returns a JobInfo whose status.stage is a plain str, not a JobStage. JobInfo.__init__ does JobStatus(stage=status["stage"]) with no conversion, in both 0.36.x and 1.x. The == checks still work because JobStage is a str-enum. But stage.value here (and at L618) raises AttributeError, outside the inner try.

On develop the static launcher always goes submit → wait, so any step that isn't already COMPLETED at the first poll ends up FAILED. Nothing cancels it, so the HF job keeps running and billing. I reproduced this by feeding wait() real JobInfo(**payload) objects (RUNNING → COMPLETED).

Suggest normalizing once with stage = JobStage(job_info.status.stage), or logging the string, plus one wait() test built from a real JobInfo.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 32469d08f0. Dropped the custom polling loop in wait() in favor of BaseStepOperator.wait(), and normalized stage formatting in get_status() safely for both plain strings and Enum values (never calling .value directly on job_info.status.stage). Added a wait() test using real JobInfo(**payload) objects (SCHEDULING → RUNNING → COMPLETED) and verified live on HF Jobs.

consecutive_errors,
poll_err,
)
return ExecutionStatus.FAILED

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When polling fails three times in a row, this returns FAILED but doesn't cancel the job, so it may still be running on HF. The cancel in launch() was meant to cover that, but on develop launch() never runs when submit() is implemented. The launcher only falls back to launch_with_allocation on NotImplementedError (step_launcher.py ~L537-582).

The base wait() handles this case by falling back to the ZenML server's step status. Could we drop this override and rely on the base wait() + get_status()? If the custom loop is needed, at least cancel before returning FAILED. Then launch() can go, or cleanup_step_submission can be used for the cancel.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 32469d08f0. Dropped the custom polling loop and the dead launch() method, and delegated wait() to BaseStepOperator.wait() (so transient poll errors fall back to the ZenML server's step status instead of prematurely returning FAILED while the HF job keeps running). Kept a thin wrapper in wait() that calls self.cancel(step_run) on stop/interrupt signals or STOPPED/STOPPING status.

token=token,
)
consecutive_errors = 0
except Exception as poll_err:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

except Exception also catches RunStoppedException / RunInterruptedException, which SignalHandler raises on SIGTERM/SIGINT. A user stop that lands during inspect_job is counted as "transient error 1/3", and polling continues until the job ends. The same happens in the log-streaming except at L593, where it's swallowed at debug level. Could we narrow both to network/HTTP errors (requests.RequestException, HfHubHTTPError) and cancel the job on the way out?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 32469d08f0. With the custom polling and log-streaming loops removed, wait() now explicitly catches (KeyboardInterrupt, RunStoppedException, RunInterruptedException) around super().wait(step_run), calls self.cancel(step_run), and re-raises (and also cancels if super().wait() returns STOPPED/STOPPING). Verified live by sending SIGINT during wait() and confirming inspect_job() reports stage='CANCELED'.

step_run_id=info.step_run_id,
step_run_metadata={self.id: step_metadata},
)
except Exception:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If publishing the metadata fails, we only log at debug level. The job is already created, but its ID exists only on the in-memory step run. The dynamic runner, or any other process calling get_status/cancel, then hits "Cannot find HuggingFace Job ID" and can neither monitor nor stop it. Modal's operator handles the same case by terminating and re-raising. Could we cancel job.id here (logging the job URL if that fails) and re-raise?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 32469d08f0. submit() now matches ModalStepOperator: if publish_step_run_metadata (or local metadata update) fails, it calls cancel_job for job.id (logging job.id and job.url via logger.exception if cancel also fails) and re-raises. Covered by unit tests.

METADATA_ORCHESTRATOR_URL: Uri(str(job.url)),
METADATA_ORCHESTRATOR_LOGS_URL: Uri(str(job.url)),
}
if namespace:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When namespace isn't set, nothing is stored. Every later inspect_job / fetch_job_logs / cancel_job then does an extra whoami call to resolve it, doubling API calls per poll. Recovery under a different token would also look in the wrong namespace. job.owner.name is on the returned JobInfo; could we always persist that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 32469d08f0. submit() now persists settings.namespace or job.owner.name in both server metadata and info.step_run.run_metadata. Confirmed in live E2E runs that whoami-v2 is called only once at run_job and zero times during subsequent polls.

if self.config.stream_logs:
try:
count = 0
for count, line in enumerate(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fetch_job_logs follows the stream until the job finishes, so with stream_logs=True the first call blocks and the poll interval stops applying. Also:

  • The generator swallows KeyboardInterrupt internally.
  • log_offset is only updated after a full pass, so a dropped stream re-prints its lines.
  • Concurrent dynamic steps never stream at all, since only get_status() is called.

Maybe stream once, outside the status loop, and say in the docs which modes stream? Minor: the docs intro says logs stream, but stream_logs defaults to False.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 32469d08f0. Removed stream_logs along with the custom wait() loop — fetch_job_logs also diverged between hub 0.36.x (always blocking, no follow arg) and 1.x (follow=False default), and didn't apply to dynamic pipelines anyway. Updated the docs to explain that ZenML captures step logs normally and links directly to the HF Job URL in step metadata.

image = info.get_image(key=HUGGINGFACE_JOBS_DOCKER_IMAGE_KEY)
token = _resolve_token(self.config)

hardware_flavor_str = (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ResourceSettings (e.g. gpu_count=1) is silently ignored here, so the step runs on cpu-basic with no message. A warning pointing to hardware_flavor, like SageMaker does, would save some confusion.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 32469d08f0. Added a warning in submit() when not info.config.resource_settings.empty, pointing users to hardware_flavor (matching SagemakerStepOperator), plus unit test coverage and a note in the docs.

for key in _HF_TOKEN_ENV_KEYS:
secrets[key] = token

job_name = f"zenml-{info.run_name}-{info.pipeline_step_name}"[:63]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nits:

  • job_name is computed and logged but never passed to run_job.
  • The "job_name" metadata key actually stores the job ID.
  • settings.x or self.config.x is redundant, because get_settings() already merges the component config into the settings.
  • _best_effort_cancel(cancel_fn: Any, ...) could just call cancel_job directly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All four fixed in 32469d08f0:

  • Dropped unused job_name computation (log step/run name directly).
  • Renamed the metadata key from "job_name" to "hf_job_id" (STEP_JOB_ID_METADATA_KEY).
  • Read settings.hardware_flavor, settings.timeout, and settings.namespace directly instead of settings.x or self.config.x.
  • _best_effort_cancel now imports and calls cancel_job directly instead of taking cancel_fn: Any.

"increases HF API calls and may cause transient log-fetch errors "
"during job initialization. Enable for real-time step visibility",
)
poll_interval_seconds: float = Field(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This accepts 0, negative values, NaN and inf. 0 makes the loop spin, and a negative value makes time.sleep raise after the job has been submitted. Suggest Field(gt=0, allow_inf_nan=False, ...).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed poll_interval_seconds in 32469d08f0 since wait() now delegates polling to BaseStepOperator.wait().

)


class FakeJobStage(enum.Enum):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fake is a real Enum, but the SDK hands back a plain string for the stage. That mismatch is exactly what hides the stage.value crash in wait(). INITIALIZING also isn't a real JobStage. Likewise, the HfFolder stub hides the hub 1.x break. Rather than more helper tests, I'd swap a good part of this file for a few submit / wait / get_status tests that build real JobInfo(**payload) objects and patch only the network calls. wait(), submit(), the validator and the hardware resolution currently have no coverage.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebuilt the test suite in 32469d08f0: constructs real huggingface_hub.JobInfo(**payload) objects (plain-string status.stage) when huggingface_hub is installed, mirrors that exact plain-string shape with real stages (SCHEDULING, RUNNING, COMPLETED, ERROR, CANCELED, DELETED) and get_token when running in minimal CI without huggingface_hub, and adds coverage for submit(), wait() (including stop/interrupt cancel), get_status(), cancel(), and validator. Verified 36/36 passing across huggingface_hub==0.36.2, huggingface_hub==1.33.0, and uninstalled CI mode.

@strickvl

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review, @safoinme! Merged latest develop, addressed all inline comments (32469d08f0, 50233dfa69), updated the PR description, and ran live end-to-end tests on Hugging Face Jobs (huggingface_hub==1.33.0, cached hf auth login, cpu-basic, GCS artifact store, public Docker Hub repo):

  • Static pipeline (submit → wait): passed (hf_job_id=6b06f9bfb6a90bbe997db923) — polled 7 times with whoami-v2 called only once, GCS artifact round-tripped, confirmed HF_TOKEN/HUGGING_FACE_HUB_TOKEN were not leaked into the job container, and verified hf_job_id, hf_job_namespace, orchestrator_url, and orchestrator_logs_url in step metadata.
  • Dynamic pipeline (step.submit(...)): passed (hf_job_id=6b06fa7db6a90bbe997dbbcd) — async submit() + dynamic runner get_status() polling + future.load() artifact round-trip.
  • Live SIGINT cancel: passed (hf_job_id=6b06fadfd91f621b93082d55) — interrupted wait(), confirmed cancel_job ran, and verified inspect_job() returned stage='CANCELED'.

Unit tests (36 passed) also verified against real huggingface_hub==0.36.2, huggingface_hub==1.33.0, and minimal uninstalled-hub mode, plus ruff, pydoclint, mypy, and lychee --offline. Ready for another look!

@strickvl
strickvl requested a review from safoinme November 25, 2026 15:16
@strickvl
strickvl merged commit 22c0d14 into develop Nov 29, 2026
137 of 141 checks passed
@strickvl
strickvl deleted the feature/hf-jobs-step-operator branch November 29, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request internal To filter out internal PRs and issues release-notes Release notes will be attached and used publicly for this PR. run-slow-ci Tag that is used to trigger the slow-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants