when agent tried to export Kedro experiment metrics agent failed error session store locked
Unlock or relocate the session store before exporting: Kedro session data is held in a store that another live session has locked, so close the competing session, or export from a copy of the project session store taken when no session is active. Use when an agent workflow exporting Kedro session or experiment metrics after pipeline runs. Not for a store left locked by a crashed session, which needs the stale lock
TL;DR
Unlock or relocate the session store before exporting: Kedro session data is held in a store that another live session has locked, so close the competing session, or export from a copy of the project session store taken when no session is active. Kedro sessions record run data as they go, and the store allows one active writer. An export that arrives while a session holds the store gets a lock error that looks like missing data.
when agent tried to export Kedro experiment metrics agent failed error session store lockedUse this when
- The check or run fails with this symptom: an agent tries to export Kedro experiment metrics and fails with a session store locked error.
- You are working on an agent workflow exporting Kedro session or experiment metrics after pipeline runs and the failure repeats on the same data or configuration.
- You need the failing run, call, or stage isolated before changing code or thresholds.
Not for this skill when
- A store left locked by a crashed session, which needs the stale lock cleared after confirming no process is alive.
- The error text names a different tool, stage, or root cause. Match the verbatim error first and use that skill.
Steps
- Identify the process holding the session store, from the lock details or the running processes. Verify: a live session or a stale lock is confirmed
- If a session is live, wait for it to finish or export after it closes. Verify: the lock releases with the session
- If the holder is gone, clear the stale lock following the store layout for the Kedro version in use. Verify: the store opens for reading
- Run the export. Verify: metrics for the recorded sessions are written out
- Schedule exports after pipeline completion in the workflow. Verify: exports stop racing live sessions
Variant phrasings
agent export kedro experiment metrics session store locked
The shorter phrasing focused on the named failure.
kedro session store locked export failed error
The symptom phrasing a searcher tries next.
kedro session lock export fix
The variant naming the failing stage or tool directly.
Compatibility: Kedro session stores and experiment exports, agent workflow scheduling
Why it happens
Kedro writes session records during a run, and exports are usually bolted on afterwards by a different tool or agent that does not know a session is still open, especially when a notebook kernel keeps one alive. The lock is the store protecting the records the export wants to read.
Edge cases / pitfalls
- Notebook kernels hold sessions open invisibly; check for kernels before declaring a lock stale.
- Copying a locked store mid-write can produce a torn export; copy only after the lock clears.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_69OU7JfQlXifasejaqfD-g