Skip to content

Conversation

@vshcryabets
Copy link
Owner

No description provided.

@vshcryabets vshcryabets requested a review from Copilot October 13, 2025 16:01
@vshcryabets vshcryabets self-assigned this Oct 13, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@vshcryabets vshcryabets marked this pull request as ready for review October 13, 2025 16:02
@vshcryabets vshcryabets merged commit ee823ba into main Oct 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants