Skip to content

feat(runs): give every job an identity that follows it across copies and moves - #402

Open
harenome wants to merge 2 commits into
ThinkFlowLab:mainfrom
harenome:feat/job-identity
Open

harenome wants to merge 2 commits into
ThinkFlowLab:mainfrom
harenome:feat/job-identity

Conversation

@harenome

Copy link
Copy Markdown
Collaborator

Closes #399

What

A job's only name was its folder's, which is not unique and changes nothing when the folder is copied. A new standard job now declares standard.uuid in its config.json: kept when a run resumes into the same folder as the same job (same benchmark, plugged agent or capability, model and dataset), new for another job under that name and for a merge. A job from before standard.uuid, resumed as the same job, declares the uid it was read under. A merge writes its config.json first, whole. The reader adds Job.uid and Job.uid_source (declared, derived, pending) and Trial.key. Without a declared id (Harbor, imports, older standard jobs) the uid is a uuid5 over fixed facts read from the files (format, folder name, what ran, the start: for a standard job the feed's job.start, else result.json started_at; for a Harbor job result.json only), with "v": 1; no path is a fact, so a copy or move keeps it. Nothing reads the uid yet; #362 does. Old files are never rewritten.

Touches

backend · the standard · docs and site

Verified

  • New app/tests/test_job_uid.py: a resume into the same folder keeps the uuid, another model, dataset or plugged agent under the name gets a new one; a resumed job from before standard.uuid declares the uid it was read under; a copy and a move keep the uid of a Harbor fixture job and of an older standard job; another folder name or another start gives another uid; a Harbor job's uid ignores a feed that appears later; a feed that is not UTF-8 is read; a job with no trial and no start is pending; a try is keyed by its attempt.
  • test_standard_shard: a merged job's uid is declared and differs from its three shards'; its config.json is whole before its result.json is written.
  • field_contract.json refreshed (uid, uid_source, key); parse.SCHEMA bumped so caches reparse.
  • Backend suite (2866 tests) and route suite (660 tests) OK in a clean container.

Risk

…and moves

A new Nullius standard job declares a UUID, standard.uuid in its
config.json: a run resumed into the same folder keeps it, a merge makes a
new one. The reader exposes Job.uid and Job.uid_source: the declared id,
else a uuid5 derived from fixed facts of the files (format, folder name,
what ran, the start), else pending for a job with no trial and no start.
No path is a fact, so a copy or a move keeps the identity; old files are
never rewritten to gain one. Trial.key names a trial within it, a try by
its attempt.
…it move with the feed

A run resumed under the same name keeps the folder's uuid only when the earlier config names the same benchmark, plugged agent or capability, model and dataset; a job from before standard.uuid is given the uid it was read under. A Harbor job's start is read from result.json only, never from Nullius's feed, which may appear later; a feed that is not UTF-8 is read with replacement. A merge writes its config.json first and whole, so its result is never read without the merge's uuid. Imports' identity by folder name is marked as a known limit.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Give every job an identity that survives a copy or a move, apart from its folder name

1 participant