Skip to content

RNN models and LR Schedulers - #4

Merged
nickwimer merged 8 commits into
mainfrom
time_dependent
Sep 30, 2025
Merged

RNN models and LR Schedulers#4
nickwimer merged 8 commits into
mainfrom
time_dependent

Conversation

@nickwimer

Copy link
Copy Markdown
Collaborator

No description provided.

@nickwimer
nickwimer requested a review from Copilot September 30, 2025 19:05

Copilot AI left a comment

Copy link
Copy Markdown

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 implements RNN models and learning rate schedulers for the PT-MELT library. The changes include a new RecurrentNeuralNetwork model class with various pooling strategies, enhanced training functionality with scheduler support and early stopping, and improvements to the loss functions.

  • Adds comprehensive RNN implementation with LSTM/GRU/vanilla RNN support and multiple pooling strategies
  • Integrates learning rate schedulers and early stopping mechanisms into the training loop
  • Refactors utility functions from standalone methods to inline implementations within blocks

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
setup.py Updates version and adds safetensors dependency
ptmelt/nn_utils.py Comments out utility functions (get_activation, get_initializer, get_loss_fn)
ptmelt/models.py Adds RNN model class, scheduler support, optimizer factory, and enhanced training loop
ptmelt/losses.py Improves MixtureDensityLoss with MSE weighting and numerical stability
ptmelt/layers.py Adds AttentionPool layer for RNN sequence pooling
ptmelt/blocks.py Replaces imported utility functions with local implementations
Comments suppressed due to low confidence (2)

ptmelt/models.py:1

  • Remove commented-out code that has been replaced by the torch.clamp approach on the next line.
import warnings

ptmelt/models.py:1

  • Remove commented-out code. The loss calculation has been refactored to handle different reduction strategies.
import warnings

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread ptmelt/blocks.py
Comment thread ptmelt/models.py Outdated
Comment thread ptmelt/models.py
@nickwimer nickwimer self-assigned this Sep 30, 2025
@nickwimer
nickwimer merged commit 8173539 into main Sep 30, 2025
1 check passed
@nickwimer
nickwimer deleted the time_dependent branch September 30, 2025 19:23
nickwimer added a commit that referenced this pull request Oct 8, 2025
* Bayesian NNs (#3)

* adding support for hyperparameter tuning using Ray

* remove manditory r2 and rmse from plot text

* WIP; initial code for ptBNN replicating tf flipout

* adding in updates to BNN working tests for iaps...

* adjusting the clamping for the MDN output to try to avoid NaNs

* updates to MDN output for stability

* adding in seed for reproduction testing

* cleaning up before PR

* fixing typos and adding in conditions for partial bayes blocks

* removing pass for unsupported architectures...todo to fully implement

* RNN models and LR Schedulers (#4)

* moving utility functions into class files...might deprecate soon

* making the mixture density loss have mse regularization

* adding in schedulers and early stopping

* fixing mse addition loss term for MDNs

* updating regression notebook

* adding in support for LSTM model from time series modeling work

* cleaning up old commented code

* removing commented code
nickwimer added a commit that referenced this pull request Jun 5, 2026
* adding support for hyperparameter tuning using Ray

* remove manditory r2 and rmse from plot text

* working MDN VAE with example notebook

* Pulling main updates into vae branch (#5)

* Bayesian NNs (#3)

* adding support for hyperparameter tuning using Ray

* remove manditory r2 and rmse from plot text

* WIP; initial code for ptBNN replicating tf flipout

* adding in updates to BNN working tests for iaps...

* adjusting the clamping for the MDN output to try to avoid NaNs

* updates to MDN output for stability

* adding in seed for reproduction testing

* cleaning up before PR

* fixing typos and adding in conditions for partial bayes blocks

* removing pass for unsupported architectures...todo to fully implement

* RNN models and LR Schedulers (#4)

* moving utility functions into class files...might deprecate soon

* making the mixture density loss have mse regularization

* adding in schedulers and early stopping

* fixing mse addition loss term for MDNs

* updating regression notebook

* adding in support for LSTM model from time series modeling work

* cleaning up old commented code

* removing commented code

* adding working MDN vae updated with new example notebook
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