Rework user-facing learning materials; fix Replay tutorial bug; remove package logging side-effects#42
Conversation
|
Updated plan from PR #42 as the current application point. What PR #42 already closes
What still remains as the next true priorityThese are now the most important remaining issues because they affect correctness/portability for real user datasets:
Updated planPhase 1 — correctness / portability fixes
Phase 2 — docs cleanup from migration-era wording
Phase 3 — final repo polish
First next Codex prompt (Phase 1 only)Fix the next correctness-and-portability issues in the Important context:
Main goals:
Update the outcome-model path so that binary-vs-continuous behavior is determined from the target values/data itself rather than a hard-coded target name. Requirements:
Requirements:
Non-goals:
Deliverables:
Expected next pass after thatAfter Phase 1 is merged, the next Codex pass should be a docs cleanup pass focused on removing migration-era wording and making the architecture docs describe the current stable state. |
|
Next step after core portability fixes: focused docs cleanup. Current status:
Next Codex prompt: Perform a focused documentation cleanup pass for the Important context:
Main goals:
Specifically remove or sharply reduce sections that are artifacts of past transition work, such as:
Keep the useful architectural content:
The document should read as: “this is how Policyscope is structured now”, not “this is how we migrated it”.
Keep README as a navigator:
Do not turn README back into a long migration document.
Deliverables:
After this pass, the next review should focus on final consistency across README, docs, examples, and public API surface. |
|
Practical UX gap to consider before/after merge: A user may arrive with a dataframe that already contains:
In the current API this is still representable by wrapping Recommended follow-up:
This is not necessarily a blocker for PR #42, but it is important for real bring-your-own-data usability. |
|
Another practical docs/tutorial gap: explain Users need to understand that Recommended docs/example addition:
This should probably be added to the quickstart and/or |
|
Architectural note on where to place Recommended placement: create a new module Rationale:
Suggested public API: from policyscope.policy_adapters import DeterministicActionColumnPolicy
policyB = DeterministicActionColumnPolicy(
action_col="action_B",
action_space=["card", "loan", "deposit"],
)Implementation expectations:
Do not auto-wrap Optional export choice:
|
Motivation
replay_value(...)was called with probabilities instead of policy-B actions and remove noisy package-level logging side-effects on import.Description
logging.basicConfig(...)fromsrc/policyscope/__init__.pyso importing the package no longer mutates global logging configuration.a_B = policyB.action_argmax(...)and callreplay_value(logged.df, a_B, ...), and compute overlap from action matches.examples/quickstart_own_data_ru.ipynbthat demonstratesBanditSchema,LoggedBanditDataset,compare_policies(...), propensity-source modes, and how to readDelta, CI,p_value, diagnostics andtrust_level.examples/compare_estimators_vs_oracle_ru.ipynbthat compares Replay / IPS / SNIPS / DM / DR / SNDR / Switch-DR against oracle under healthy and poor-overlap scenarios and logged-vs-estimated propensity contrasts, and add a practical RU interpretation guidedocs/how_to_interpret_ope_outputs_ru.mdand README navigation updates.Testing
examples/quickstart_own_data_ru.ipynbandexamples/compare_estimators_vs_oracle_ru.ipynb(notebook execution completed successfully).tests/test_docs_consistency.py) under the repository Python path and they passed.PYTHONPATH=src pytest -qand59 passed(note: an initialpytestwithoutPYTHONPATH=srcfailed at collection due to import path configuration, which is addressed by thePYTHONPATH=srcinvocation used in CI/validation).Codex Task