Skip to content

Dnn and transformer modules! - #4

Merged
diegobaronm merged 52 commits into
mainfrom
DNN_and_Transformer_modules!
Sep 16, 2025
Merged

diegobaronm merged 52 commits into
mainfrom
DNN_and_Transformer_modules!

Conversation

@FedericoSaitta

Copy link
Copy Markdown
Collaborator

added my own dnn and transformer regression models along with all their helper modules and a read me file. added the correct testing scripts to the CI and made small modifications to predict, train and performance py and hence to the setup function of your DNN and transformer modules. These changes are minor and are needed for my models as unlike yours, the actual neural netword architecture needs the datamodule to be fully set up to be initialized.

…irectly integrate with it such as PrettyPrinting.py and Plotting.py and similarly have updated the DataScaler.py to add my own custom scaler. I have written quite general code that could be integrated with the other modules. I have not changed any code that interacts with the other data modules hence they should run. The only addition I have done (which has no functional change to your ML modules) is add a get_features to the already present scaler classes, something which my RegressionDNN needs to pretty print data but doesn't have any effects when your modules call their scalers.
…scaler (eg. inverse function) and starting on new Transformer module, created general architecture.py to abstract away model construction
…txt file to log key info about the model (eg. Flops and Max Memory used), added same file but .yaml to ease future data extraction and analysis, increased customization from config.yaml of the transformer model (batchnorm, layernorm, attention pooling). Added new needed imports to requirements.txt
…s that are obtained from the config.yaml file, not complete, some features are Transformer only but should be extended to DNN in the fture aswell such as KDE
…Full capabilities are only ecorporated in the PyTorchLightning module (like invserse data sampling and pretty and professional plotting
…ull capabilities are only ecorporated in the PyTorchLightning module (like invserse data sampling and pretty and professional plotting
…They do shared code between themseleves so idea of creating a centralized library to interact from the notebooks is on the table
…compare them head to head, this should probably be in the directory above as the models compared here are more likely trained with torch lightning but could also be trained with the notebooks. This is not fully polished yet
…ner model architecture, bug with predictions still needs to be fixed
…y own regression models. Changes had to be made because 1: my model is created in the setup function which is called in the datamodule, hence the datamodule is created first by hand. 2: when using custom attention layers the weights saved in the checkpoint can have extra names preceding the saved weights such as model.layer_0.attn_head0, this is taken care of from the new function in utils.py, it should not interfere with Diego's models because if a perfect match is found between the weights and the model keys, that is used
fixed CI bug where sub-directories in results folder were not deleted
Comment thread src/data/VBFDNNDataModule.py Outdated
Comment thread src/data/VBFDNNDataModule.py Outdated
Comment thread src/models/DNNModel.py Outdated
Comment thread configs/config.yaml Outdated
Comment thread configs/configTransformer.yaml
Comment thread src/models/TransformerModel.py Outdated
Comment thread src/models/TransformerModel.py Outdated
Comment thread src/data/VBFTransformerDataModule.py Outdated
Comment thread src/data/VBFTransformerDataModule.py Outdated
Comment thread configs/config.yaml Outdated
Comment thread src/data/VBFDNNDataModule.py Outdated
Comment thread src/models/DNNModel.py Outdated
Comment thread configs/config.yaml Outdated
Comment thread src/data/VBFDNNDataModule.py Outdated
Comment thread src/models/TransformerModel.py Outdated
Comment thread src/models/TransformerModel.py Outdated
@diegobaronm

Copy link
Copy Markdown
Owner

Thanks @FedericoSaitta
Merging!

@diegobaronm
diegobaronm merged commit c7c18ea into main Sep 16, 2025
1 check 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