Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/syft-job/src/syft_job/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ def _job_has_all_files(self, ref: JobRef) -> bool:
submission_dir = self.manager.submission_dir(ref)
declared = metadata.headers.get(SUBMISSION_HASH_HEADER)
if declared:
return code_hash(submission_dir) == declared
return code_hash(submission_dir, as_sent=True) == declared
return has_listed_files(submission_dir, metadata.files)

def _request_has_all_files(self, ref: RequestRef) -> bool:
Expand Down
15 changes: 9 additions & 6 deletions packages/syft-job/src/syft_job/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,15 @@ def _digest(
) -> str:
digest = hashlib.sha256()
files = sorted(
path
for path in submission_dir.rglob("*")
if path.is_file()
and not _is_skipped(relative := path.relative_to(submission_dir))
and (entries is None or relative.parts[0] in entries)
and relative.as_posix() not in skip
(
path
for path in submission_dir.rglob("*")
if path.is_file()
and not _is_skipped(relative := path.relative_to(submission_dir))
and (entries is None or relative.parts[0] in entries)
and relative.as_posix() not in skip
),
key=lambda p: p.relative_to(submission_dir).as_posix(),
)
for path in files:
content = _as_sent(path) if as_sent else path.read_bytes()
Expand Down
Loading