nvflare.apis.utils.job_submit_token module

canonical_job_content_hash(job_content: str | bytes, exclude_names: Iterable[str] | None = None) str[source]

Hash the canonical submitted job content used for submit-token retry validation.

The caller must provide the job content root. Directory input is hashed exactly relative to the provided directory. Zip input may contain one wrapper directory around the job content; that wrapper is stripped so a normal zip -r job.zip job/ archive hashes the same as submitting job/ directly. Passing the parent of a job directory is not equivalent to passing the job directory itself.

canonical_json_hash(value) str[source]
submit_record_scope_hashes(study: str, submitter, submit_token: str) Tuple[str, str, str][source]
submitter_to_dict(submitter) dict[source]
validate_submit_token(submit_token: str | None) str | None[source]