Add debug st.info before st.plotly_chart to diagnose invisible chart

This commit is contained in:
2026-03-31 01:49:38 +02:00
parent 72d1c20340
commit 9f98dbae60
28 changed files with 3480 additions and 85 deletions
@@ -1,51 +1,55 @@
# Session: continuity-ledger
Updated: 2026-03-28T12:00:00Z
## Goal
Preserve the essential session context and state for the stemwijzer project so work can resume seamlessly after context clears.
## Constraints
- Keep the ledger concise; only essential information is recorded.
- Focus on WHAT and WHY, not HOW.
- Mark uncertain information explicitly as UNCONFIRMED.
- Include current git branch and key file paths.
- Never store secrets or values from .env files.
## Progress
### Done
- [x] Determine need for a continuity ledger and file location.
- [x] Create and add this continuity ledger file to the repository (this file). UNCONFIRMED: whether committed/pushed to remote.
### In Progress
- [ ] Monitor and merge subsequent ledger updates when provided (ongoing).
### Blocked
- None
## Key Decisions
- **Store concise session state in thoughts/ledgers/**: keeps context portable and easy to merge.
- **Minimal fields only (goal, constraints, progress, decisions, next steps, file ops, context)**: reduces noise and maintenance.
## Next Steps
1. Provide previous ledger content on subsequent updates so merges preserve full history.
2. Use this ledger as the single source for resuming interrupted sessions; update "In Progress" items as work proceeds.
3. Coordinate short QA on recent fusion/similarity run (see CONTINUITY_stemwijzer.md) in a separate session if needed.
## File Operations
### Read
- `README.md`
- `thoughts/ledgers/CONTINUITY_stemwijzer.md` (INSPECTED)
- `thoughts/ledgers/CONTINUITY_fusion_similarity_run.md` (INSPECTED)
### Modified
- `thoughts/ledgers/CONTINUITY_continuity-ledger.md` (this file)
## Critical Context
- Repository root: /home/sgeboers/Projects/stemwijzer
- Current git branch: `main`
- Other existing continuity ledgers: `CONTINUITY_stemwijzer.md`, `CONTINUITY_fusion_similarity_run.md`
- UNCONFIRMED: whether this file has been committed/pushed to remote.
## Working Set
- Branch: `main`
- Key files: `README.md`, `thoughts/ledgers/CONTINUITY_continuity-ledger.md`, `thoughts/ledgers/CONTINUITY_stemwijzer.md`, `thoughts/ledgers/CONTINUITY_fusion_similarity_run.md`
# format: <line>#<hash>#<anchor>|<content>
# use refs exactly as shown in hashline edit/patch tools
#HL REV:C4181A89
#HL 1#AD2#963|# Session: continuity-ledger
#HL 2#625#EA0|Updated: 2026-03-31T12:00:00Z
#HL 3#DA3#29F|
#HL 4#3B8#9B2|## Goal
#HL 5#49D#054|Preserve the essential session context and state for the stemwijzer project so work can resume seamlessly after context clears.
#HL 6#DA3#B25|
#HL 7#3CD#7E4|## Constraints
#HL 8#343#88A|- Keep the ledger concise; only essential information is recorded.
#HL 9#C8A#AD0|- Focus on WHAT and WHY, not HOW.
#HL 10#7DD#B90|- Mark uncertain information explicitly as UNCONFIRMED.
#HL 11#04E#272|- Include current git branch and key file paths.
#HL 12#CCD#F02|- Never store secrets or values from .env files.
#HL 13#DA3#A4D|
#HL 14#E5A#9FA|## Progress
#HL 15#E30#F0C|### Done
#HL 16#829#1C2|- [x] Determine need for a continuity ledger and file location.
#HL 17#906#394|- [x] Create and add this continuity ledger file to the repository (this file). UNCONFIRMED: whether committed/pushed to remote.
#HL 18#B2A#001|- [x] Monitor and merge subsequent ledger updates when provided (inspected other CONTINUITY_* ledgers on 2026-03-31T12:00:00Z). (UNCONFIRMED: whether merged/committed)
#HL 19#DA3#387|
#HL 20#AC7#256|### In Progress
#HL 21#405#F17|- [ ] Short QA: sample similarity lookups (N=20-50) to validate fused vectors (see CONTINUITY_stemwijzer.md). Estimated effort: 3060 minutes. (UNCONFIRMED assignment)
#HL 22#DA3#77C|
#HL 23#8B6#828|### Blocked
#HL 24#2A1#2DC|- None
#HL 25#DA3#C2F|
#HL 26#7A9#773|## Key Decisions
#HL 27#20F#D99|- **Store concise session state in thoughts/ledgers/**: keeps context portable and easy to merge.
#HL 28#4B6#2BB|- **Minimal fields only (goal, constraints, progress, decisions, next steps, file ops, context)**: reduces noise and maintenance.
#HL 29#DA3#F5B|
#HL 30#62A#B91|## Next Steps
#HL 31#22B#0CD|1. Provide previous ledger content on subsequent updates so merges preserve full history.
#HL 32#E49#DA8|2. Use this ledger as the single source for resuming interrupted sessions; update "In Progress" items as work proceeds.
#HL 33#4B7#4A5|3. Coordinate short QA on recent fusion/similarity run (see CONTINUITY_stemwijzer.md) in a separate session if needed.
#HL 34#DA3#1D0|
#HL 35#1CA#DCD|## File Operations
#HL 36#0F3#F62|### Read
#HL 37#256#5B3|- `README.md`
#HL 38#A0D#268|- `thoughts/ledgers/CONTINUITY_stemwijzer.md` (INSPECTED)
#HL 39#AC9#FE0|- `thoughts/ledgers/CONTINUITY_fusion_similarity_run.md` (INSPECTED)
#HL 40#DA3#081|
#HL 41#455#EBF|### Modified
#HL 42#3F4#1DD|- `thoughts/ledgers/CONTINUITY_continuity-ledger.md` (this file)
#HL 43#DA3#C78|
#HL 44#2BA#352|## Critical Context
#HL 45#112#C18|- Repository root: /home/sgeboers/Projects/stemwijzer
#HL 46#9CD#0EE|- Current git branch: `main` (UNCONFIRMED: local workspace branch)
#HL 47#DEF#90F|- Other existing continuity ledgers: `CONTINUITY_stemwijzer.md`, `CONTINUITY_fusion_similarity_run.md`
#HL 48#2D0#620|- UNCONFIRMED: whether this file has been committed/pushed to remote.
#HL 49#DA3#373|
#HL 50#7C4#A51|## Working Set
#HL 51#381#266|- Branch: `main`
#HL 52#BD8#51B|- Key files: `README.md`, `thoughts/ledgers/CONTINUITY_continuity-ledger.md`, `thoughts/ledgers/CONTINUITY_stemwijzer.md`, `thoughts/ledgers/CONTINUITY_fusion_similarity_run.md`
+4 -1
View File
@@ -1,5 +1,5 @@
# Session: stemwijzer
Updated: 2026-03-25T12:00:00Z
Updated: 2026-03-31T12:40:00Z
## Goal
2D political compass + motion similarity search from parliamentary votes + motion text. Full historical coverage 20162026, precomputed similarity cache, fused (SVD + text) embeddings.
@@ -87,6 +87,9 @@ Updated: 2026-03-25T12:00:00Z
- [ ] Short QA: sample similarity lookups and sanity checks (N=20-50) against `fused_embeddings`/similarity results
- Purpose: validate fused vectors, detect padding/anomalies, and confirm similarity rows are sensible
- Estimated effort: 3060 minutes
- [ ] Trajectories tab: chart not rendering — root cause found (silent exception in `st.plotly_chart`)
- Fix applied: commit 72d1c20 — shows st.error + diagnostics when rendering fails
- Pending: user to verify fix by running Explorer with EXPLORER_DEBUG_TRAJECTORIES=1
### Blocked
- None blocking for QA; earlier provider failures affected embedding rerun but rerun was completed per fusion run summary (UNCONFIRMED)
+248
View File
@@ -669,5 +669,253 @@
"target_id": null,
"metadata": {},
"created_at": "2026-03-29T21:09:05.589179Z"
},
{
"id": "11a13431-5d46-486d-b46c-c2adc84b6217",
"actor_id": null,
"action": "embedding_failed",
"target_type": "motion",
"target_id": "99",
"metadata": {
"error": "RuntimeError(\"Simulated embedding failure for index 0: 'failing motion'\")"
},
"created_at": "2026-03-29T21:44:22.514902Z"
},
{
"id": "909e0f8b-6292-4299-b142-1bd523f7b10b",
"actor_id": null,
"action": "test_action",
"target_type": "unit",
"target_id": "u1",
"metadata": {
"k": 1
},
"created_at": "2026-03-29T21:44:23.768305Z"
},
{
"id": "748b042c-4505-41df-a883-d21fe28540ad",
"actor_id": null,
"action": "another_action",
"target_type": "motion",
"target_id": null,
"metadata": {},
"created_at": "2026-03-29T21:44:23.815343Z"
},
{
"id": "6b7982cb-5404-4b21-b347-ba915d62a0d9",
"actor_id": null,
"action": "embedding_failed",
"target_type": "motion",
"target_id": "99",
"metadata": {
"error": "RuntimeError(\"Simulated embedding failure for index 0: 'failing motion'\")"
},
"created_at": "2026-03-29T21:59:12.684721Z"
},
{
"id": "e2c06f76-c88c-4ed7-907a-ccbfb1964940",
"actor_id": null,
"action": "test_action",
"target_type": "unit",
"target_id": "u1",
"metadata": {
"k": 1
},
"created_at": "2026-03-29T21:59:13.959568Z"
},
{
"id": "cf6010f3-e194-464c-af06-92ff879351bc",
"actor_id": null,
"action": "another_action",
"target_type": "motion",
"target_id": null,
"metadata": {},
"created_at": "2026-03-29T21:59:14.005849Z"
},
{
"id": "a75af459-ae06-4e30-b903-83a6f4d6e2ca",
"actor_id": null,
"action": "embedding_failed",
"target_type": "motion",
"target_id": "99",
"metadata": {
"error": "RuntimeError(\"Simulated embedding failure for index 0: 'failing motion'\")"
},
"created_at": "2026-03-29T22:13:10.039634Z"
},
{
"id": "855b86dd-21ff-477a-bcd5-4038aa168d72",
"actor_id": null,
"action": "test_action",
"target_type": "unit",
"target_id": "u1",
"metadata": {
"k": 1
},
"created_at": "2026-03-29T22:13:10.684676Z"
},
{
"id": "3062100d-838d-493b-9e5d-24a1a1c2fb5b",
"actor_id": null,
"action": "another_action",
"target_type": "motion",
"target_id": null,
"metadata": {},
"created_at": "2026-03-29T22:13:10.708575Z"
},
{
"id": "81cd3e04-7a80-48fe-b672-4a01c43cc34f",
"actor_id": null,
"action": "embedding_failed",
"target_type": "motion",
"target_id": "99",
"metadata": {
"error": "RuntimeError(\"Simulated embedding failure for index 0: 'failing motion'\")"
},
"created_at": "2026-03-30T16:31:17.877408Z"
},
{
"id": "16d3c270-d1d6-4d99-8621-cdc6c250dcc7",
"actor_id": null,
"action": "test_action",
"target_type": "unit",
"target_id": "u1",
"metadata": {
"k": 1
},
"created_at": "2026-03-30T16:31:19.567603Z"
},
{
"id": "90676f40-fe78-48ed-96ac-e9ffbef8ba8e",
"actor_id": null,
"action": "another_action",
"target_type": "motion",
"target_id": null,
"metadata": {},
"created_at": "2026-03-30T16:31:19.631440Z"
},
{
"id": "431e737e-16e1-48f6-83cb-5ba1d027e469",
"actor_id": null,
"action": "embedding_failed",
"target_type": "motion",
"target_id": "99",
"metadata": {
"error": "RuntimeError(\"Simulated embedding failure for index 0: 'failing motion'\")"
},
"created_at": "2026-03-30T18:26:00.255862Z"
},
{
"id": "105d745b-dfef-4159-89b6-1a928feefa8f",
"actor_id": null,
"action": "test_action",
"target_type": "unit",
"target_id": "u1",
"metadata": {
"k": 1
},
"created_at": "2026-03-30T18:26:00.601609Z"
},
{
"id": "70b74aa7-03c9-4144-8a51-428ff79a4ca7",
"actor_id": null,
"action": "another_action",
"target_type": "motion",
"target_id": null,
"metadata": {},
"created_at": "2026-03-30T18:26:00.642695Z"
},
{
"id": "ecef4c40-bdbb-44f4-a8ec-a027d1634933",
"actor_id": null,
"action": "embedding_failed",
"target_type": "motion",
"target_id": "99",
"metadata": {
"error": "RuntimeError(\"Simulated embedding failure for index 0: 'failing motion'\")"
},
"created_at": "2026-03-30T18:31:04.409375Z"
},
{
"id": "1331e65d-863a-4c5f-a036-5e0f59694788",
"actor_id": null,
"action": "test_action",
"target_type": "unit",
"target_id": "u1",
"metadata": {
"k": 1
},
"created_at": "2026-03-30T18:31:04.812686Z"
},
{
"id": "206b7610-7b47-4b23-8ef8-f2042429d036",
"actor_id": null,
"action": "another_action",
"target_type": "motion",
"target_id": null,
"metadata": {},
"created_at": "2026-03-30T18:31:04.851848Z"
},
{
"id": "5e9b74b8-0377-4497-99e1-25aec5e55082",
"actor_id": null,
"action": "embedding_failed",
"target_type": "motion",
"target_id": "99",
"metadata": {
"error": "RuntimeError(\"Simulated embedding failure for index 0: 'failing motion'\")"
},
"created_at": "2026-03-30T18:32:23.601326Z"
},
{
"id": "74ec8b6c-7fab-426c-aa48-3fabf016c7e9",
"actor_id": null,
"action": "test_action",
"target_type": "unit",
"target_id": "u1",
"metadata": {
"k": 1
},
"created_at": "2026-03-30T18:32:24.029561Z"
},
{
"id": "a119058b-a4b1-42aa-8921-201e24e0808e",
"actor_id": null,
"action": "another_action",
"target_type": "motion",
"target_id": null,
"metadata": {},
"created_at": "2026-03-30T18:32:24.079920Z"
},
{
"id": "f3d6b7a2-3d3c-41f6-872e-49fd635f0d41",
"actor_id": null,
"action": "embedding_failed",
"target_type": "motion",
"target_id": "99",
"metadata": {
"error": "RuntimeError(\"Simulated embedding failure for index 0: 'failing motion'\")"
},
"created_at": "2026-03-30T18:52:42.235576Z"
},
{
"id": "18620b56-3082-4f42-bda4-a3eb4de6b611",
"actor_id": null,
"action": "test_action",
"target_type": "unit",
"target_id": "u1",
"metadata": {
"k": 1
},
"created_at": "2026-03-30T18:52:43.583303Z"
},
{
"id": "738a557b-0952-45b4-b86c-fda53fae2aa1",
"actor_id": null,
"action": "another_action",
"target_type": "motion",
"target_id": null,
"metadata": {},
"created_at": "2026-03-30T18:52:43.630069Z"
}
]