Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the neural network XML formatting code by extracting functionality into separate modules and reorganizing the training pipeline. The changes improve code organization and modularity while adding new formatting capabilities.
- Refactored monolithic train_from_xml.py into modular components
- Created new LSTMFormatter and XmlOperations classes in dedicated modules
- Added a separate format_xml.py script for model inference/formatting tasks
Reviewed Changes
Copilot reviewed 11 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/project.json | Removed interface.kts test file reference |
| keras/format/train_from_xml.py | Refactored to use new modular components and simplified training workflow |
| keras/format/sequences/init.py | Updated package comment from styxlib to sequences |
| keras/format/sequences/Dictionary.py | Added size() and nextId() utility methods |
| keras/format/lstm_formatter/init.py | New module initialization file |
| keras/format/lstm_formatter/XmlOperations.py | New class extracting XML processing logic |
| keras/format/lstm_formatter/LSTMFormatter.py | New class handling LSTM model operations |
| keras/format/lstm_formatter/.gitignore | Added Python cache ignore file |
| keras/format/format_xml.py | New script for model inference tasks |
| keras/format/data/kotlin_vocab.json | Updated timestamp in vocabulary data |
| keras/format/data/kotlin_sequence.json | Large generated training sequence data file |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| batch_size=16, | ||
| validation_split = 0.2, | ||
| callbacks=[checkpoint], | ||
| epochs=4096) |
There was a problem hiding this comment.
The hardcoded value of 4096 epochs is a magic number that should be configurable. Consider making this a parameter or class attribute to improve maintainability.
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.
No description provided.