Repository navigation
Add a Colab notebook for training models from log files - #112
Merged
Merged
Conversation
notebooks/impsy_training.ipynb installs impsy from PyPI, takes uploaded .log files (or a .zip), makes a dataset, trains a model and downloads the .tflite. It uses the train_mdrnn/generate_dataset APIs from the released 1.1.0 so it works before the next release, and runs outside Colab too using a local logs folder. Linked from the README and the get-started page. Part of #97. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016oUxTsghWZWfnCnnkKcuNv
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The notebook has a critical Colab dependency conflict and additional validation issues remain unresolved.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds a Google Colab workflow for training IMPSY models from log files and links it from the documentation.
Changes:
- Adds upload, dataset generation, training, and
.tflitedownload steps. - Adds configurable model and training settings.
- Links the notebook from
README.mdanddocs/get-started.md.
| File | Summary | Findings |
|---|---|---|
README.md |
Links to the Colab training notebook. | None. |
notebooks/impsy_training.ipynb |
Implements the Colab training workflow. | Critical psutil dependency conflict (4 votes); moderate short-dataset and invalid-dimension validation issues (1 vote each). |
docs/get-started.md |
Documents the Colab training option. | Nit: clarify the “no cloud component” statement (1 vote). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "%pip install -q impsy" |
Owner
Author
There was a problem hiding this comment.
Constraint and lock are fixed in d99cabc (psutil>=6.0.0,<8, locked at 7.2.2). The notebook installs from PyPI, so this reaches Colab with the next impsy release, which should go out soon after this merges.
psutil was capped at <7 only because the original Poetry caret constraint (^6.0.0) was carried over in the PEP 621 migration. IMPSY only uses cpu_count() and virtual_memory(), which are unchanged in 7. The cap conflicts with current IPython (psutil>=7), e.g., when installing impsy in Colab. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016oUxTsghWZWfnCnnkKcuNv
The notebook now says which dimensions are available when DIMENSION has no logs, and stops before training when no log is longer than the training sequence, instead of failing inside Keras. The get-started page no longer says training has no cloud component, now that it links to Colab. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016oUxTsghWZWfnCnnkKcuNv
This was referenced Sep 26, 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.

Part of #97 (option 1 from the discussion).
Adds
notebooks/impsy_training.ipynb, which can be opened straight from GitHub in Colab: open in Colab. That link will work once this is merged tomain.Steps
%pip install impsy.logfiles or a.zipof them.-{N}d-mdrnn.logfilename.generate_datasettrain_mdrnnwith early stopping..tflite, with notes on using it in IMPSY/IMPSYpi, the AUv3 app and IMPSY Web.The notebook only uses
generate_dataset/train_mdrnnarguments that exist in the released 1.1.0, so it works with the PyPI version now and doesn't depend on #111. Outside Colab, it uses a locallogs/folder and prints the model path instead of downloading it.The README training section and
docs/get-started.mdnow link to the notebook.Testing
jupyter nbconvert --executein a clean Python 3.12 venv withpip install impsy(1.1.0) and 6 synthetic 4d logs. Every cell ran and it trained ansmodel to.tflite.files.upload()/files.download()cells, the#@paramform fields, and whether Colab asks for a session restart after the install.Dependency fix
This also allows psutil 7 (
>=6.0.0,<8, lock updated to 7.2.2). The<7cap wasn't deliberate: it came from the original Poetry^6.0.0constraint, which the PEP 621 migration kept as<7. It clashed with current IPython (psutil>=7) when installingimpsyin Colab. IMPSY only callscpu_count()andvirtual_memory(), which are unchanged in 7. The full test suite passes on 7.2.2.🤖 Generated with Claude Code
https://claude.ai/code/session_016oUxTsghWZWfnCnnkKcuNv