Repository navigation
Conversation
Move the flat scripts into inference/pilot_inference/, grouped by the domain concerns in GLOSSARY.md: - capture/: data_logger - performance/: deviation features, clustering, synthetic pilots - event_classification/: the rule-based labeler and Random Forest, kept apart because the client has not asked for it - angles.py and paths.py shared at the package root The package is installed editable (hatchling build-system), so scripts run as `python -m pilot_inference.<group>.<module>` from any directory. Paths for data/ and models/ come from paths.py instead of each script's own __file__. Also: - lowercase Data/, Models/ and dataset/ (prepared splits now live in data/prepared/); tests/ mirrors the package - test_model.py -> evaluate_model.py, since it is not a test - stop tracking models/*.pkl (already in .gitignore) and write only bestModel.pkl, not an identical finalModel.pkl - drop requirements.txt, Results/results.txt and Models/sample_Models.txt - keep raw_flight_data_updated.csv: it is the source of the committed labeled dataset, documented in inference/README.md - GLOSSARY.md: add Segment and Instruction, move the event classification terms to an out-of-scope section - update README, AGENTS.md, docs and .gitignore for the new paths
- GLOSSARY.md: put the out-of-scope terms under a subheading of Language and its relationship under Relationships, drop implementation detail from the section intro and the Segment definition, and stop the Segment and Flight phase _Avoid_ lists overlapping on "stage" - evaluate_model.py: describe it as an evaluation, not a test - error and hint messages now give the python -m form - name the project pilot-inference to match the package - README: drop the stale scikit-learn pickle note - formatting: blank lines after the new imports, wrap one docstring line - .gitignore: explain why both Client spellings are listed
Sanjana-Siddani
self-requested a review
October 24, 2026 17:13
Sanjana-Siddani
requested changes
Oct 24, 2026
Collaborator
There was a problem hiding this comment.
Big cleanup, nice work! I followed the README from scratch: uv sync, all 73 tests pass, and every command works from inference/ and from the root. Clustering gives the same result as before (0.792), and train → evaluate works on a fresh clone without the .pkl files. One small idea for later: running the event-classification steps still overwrites the committed files in data/prepared/, so maybe stop tracking those at some point. Approving
Sanjana-Siddani
approved these changes
Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #244
Summary
inference/becomes one installed package, grouped by the concerns inGLOSSARY.md. Event classification, which the client never asked for, stays in its own folder and is marked out of scope.Run scripts as
uv run python -m pilot_inference.<group>.<module>, frominference/or from the repo root with--project inference.pyproject.tomlgains a build-system, souv syncinstalls the package editable.Also:
GLOSSARY.mdgains Segment, Instruction and Leg, and the event label terms move to an out-of-scope section. The rootREADME.md,inference/README.md,AGENTS.md,docs/telemetry_schema.mdand ADR 0002 are updated for the new paths and commands. The.pklmodels stop being tracked (they were already in.gitignore), andtrain_modelwrites onlybestModel.pkl, not an identicalfinalModel.pkl.requirements.txtand two empty files are removed.Evidence
uv run pytestgave 73 passed. The flat scripts ran aspython inference/cluster_pilots.py, andtest_data_logger.pyneededsys.path.insert(... / "Data")to import the logger.After:
uv run pytestgives 73 passed (same tests, moved and re-imported). The logger test importspilot_inference.capture.data_logger.Every
event_classificationscript also ran end to end viapython -m. The data logger needs a live relay, so it was not run. Anything needing X-Plane or iMotions is unverified.Merge Danger
Door: two-way. It is moves and edits, and a revert restores the old layout.
Two things are not a clean undo for other people. The
.pklmodels are no longer tracked, so a fresh clone must runtrain_modelbeforeevaluate_model.raw_flight_data_updated.csvwas meant to be pruned but is kept: it is the source of the committedlabeled_flight_data.csv, and runninglabel_generatoras documented overwrites that file with the 597-rowraw_flight_data.csvversion (documented ininference/README.md).Blast Radius: inference/
Anyone with a local
inference/.venvmust runuv syncagain. Open branches that touchinference/will conflict with the moves (PR #176 changes 6 files there). Open issues #212 and #229 cite the oldData/andResults/paths.Data/todata/is a case-only rename, so on a case-insensitive checkout a staleData/folder can linger until it is deleted by hand.