Conversation
The sequences are now not resampled to a common number of samples (1000) anymore. Now, the number of samples is different for each diagnostic group. TODO: Update the trainer class.
…emo.py` has been deleted as it is no longer needed for the current implementation.
…nction has been deleted as it is no longer needed, and the formatting of the HDF5 file path in run_demo.py has been improved for better readability.
… .gitignore, and added new demo script `run_demo_2.py` for demonstrating DataLoader and model training. Enhanced `pyproject.toml` with additional dependencies and fixed paths in existing scripts. Updated `data_loader.py` to improve dataset handling.
…dalities and refining dataset handling. Updated `data_loader.py` to accommodate these changes and improved documentation for clarity.
Latent Mixing and Fast 1D Encoder
chore: Re-organize and use Pixi for workspace management
Foundation model
…iles (from TS CER for example).
Added conv1d models for time-series encoding and spatio-temporal prof…
* Added conv1d models for time-series encoding and spatio-temporal profiles (from TS CER for example). * Bugfixes for shape progression in the baseline models. * Added more parameters for the encoders. * Fixed pre-computing statistics in the dataloader. This matches the new API now. * Bugfix duplicated tensor conversions * Removed profiler * Removed loading the entire time vector. One more speed-up.
- Bugfix in the dataset class - __getitem__ was out-dated. - Bugfix in video_baseline.py (link to the base classes was wrong) - Added demo for fast_time_series_reconstruction.py
- Added a trainer for pretraining autoencoder. - Bugfix in the dataset class - __getitem__ was out-dated. - Bugfix in video_baseline.py (link to the base classes was wrong) - Added demo for fast_time_series_reconstruction.py
Replace ConcatDataset + manual DataLoader with TokamakMultiFileDataset and make_dataloader, gaining LRU file handle caching, sequential I/O via TwoLevelSampler, and persistent length caches. Switch from nn.L1Loss to MaskedL1Loss to support the valid_lengths argument passed by UnimodalTrainer. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…re space is more compact now. Added foundation model utilities. This is under development!!!
Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients).
…, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion.
…for debugging purposes.
…the dataset class.
…s and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes.
The basic encoders are now all working. Examples are in scripts.
* Nathan fm (#53) * chore: Update `pyproject.toml` to reorder authors, enhance README with environment setup instructions, and add validation notes in `validation.txt`. Refactor `dummy_model_2.py` for improved modality configuration and introduce `TextEncoder` enhancements in `text_baseline.py`. * Refactor demo scripts to utilize new `Prediction4FusionModel` and `DictMSELoss`. Update `run_demo_2.py` and `run_demo_3.py` for improved model initialization and data handling. Enhance `TokamakH5Dataset` to handle degenerate signals and improve data extraction logic. Remove unused `latent_space.py` and integrate new modality fusion models in `modality_fusion.py`. * Remove unused shot list configuration files and refactor trainer class to introduce MultimodalTrainer and UnimodalTrainer for improved training structure. * Refactor modality models and trainer classes for improved structure and functionality. Removed unused TimeSeriesEncoder and Decoder, introduced FastTimeSeriesEncoder and SpectrogramAutoEncoder. Updated UnimodalTrainer to support logging and checkpoint management. Enhanced TokamakH5Dataset for better data handling and added checkpoint loading functionality in spectrogram reconstruction script. * Add padding collate function and update training script for unimodal autoencoder - Introduced `collate_fn_pad` to handle variable-length tensors in batches. - Updated `train_unimodal_autoencoder.py` to use the new collate function. - Modified `train_unimodal.sh` to include additional signal modalities for training. - Added new autoencoder classes for fast time series and spatial profile modalities, ensuring output shape consistency with adaptive pooling. - Enhanced video autoencoder implementation for better reconstruction quality. * Remove spectrogram reconstruction script and refactor modality models - Deleted `spectrogram_reconstruction.py` as part of the restructuring. - Refactored modality models to introduce baseline versions for actuator, slow time series, fast time series, spatial profile, spectrogram, and video. - Updated model registry and signal-to-model mappings to reflect new baseline architecture. - Enhanced `TokamakH5Dataset` to support additional parameters for FFT and hop length. - Improved training script for unimodal autoencoders to utilize new baseline models and added support for variable-length tensors. * Update .gitignore to include pixi environments and add link to HSI-compression-benchmark in SpectrogramBaselineAutoEncoder docstring * Remove unused shot list files and delete deprecated scripts for training and data handling * Remove deprecated training scripts for CO2, ECE, MHR, and unimodal training * Dev peter (#48) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Dev peter (#50) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! --------- Co-authored-by: Peter Steiner <61472983+renierts@users.noreply.github.com> * Dev peter (#55) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! * Added a baseline fusion transformer for latent space prediction. Quick fix for the data standardization. Invalid values have to be ignored. Fix in the function to create H5 files. bolo data does not have to be flipped anymore as the data is now stored in the correct format. --------- Co-authored-by: Nathaniel Chen <nathanchen1101@gmail.com>
…5 files. Implemented calculating incremental statistics. Corrected values in the modality configuration. Removed redundant script standardize_dataset.py
TODO: Write a documentation.
…simple file transfer.
- Added information on how to use all the scripts for data fetching. Updated read_mds.sh - Added a switch for globus file transfer. This simply stores the H5 files on Omega and we can add more data later.
Moved prepare_data.py to scripts, added a batch script to do this on compute nodes. Added more point names to the data fetching scripts for Omega. Added docstring to the WelfordTensor class. Updated modalities.yaml with the new point names added.
…tats. This is still not efficient enough and causes memory issues.
Bugfixes in the trainer. Cosmetic changes in tracking.py
…_series_baseline.py to filterscope_baseline.py). Updates in the dataset class: Clipping for log transform can go down to -.99 (sufficient because we subtract 1.0). Updates in drawing.py: We can now draw all kinds of different plots (except for profiles for now). Added functionality to draw correlation plots, which is important for finding feature distributions. Added masked loss functions to not consider out-of-range time slices for training.
…ted for both, linear and log10 scale. Working on more accurate autoencoders for time-series and profiles.
* Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! * Added a baseline fusion transformer for latent space prediction. Quick fix for the data standardization. Invalid values have to be ignored. Fix in the function to create H5 files. bolo data does not have to be flipped anymore as the data is now stored in the correct format. * Foundation model (#56) * Nathan fm (#53) * chore: Update `pyproject.toml` to reorder authors, enhance README with environment setup instructions, and add validation notes in `validation.txt`. Refactor `dummy_model_2.py` for improved modality configuration and introduce `TextEncoder` enhancements in `text_baseline.py`. * Refactor demo scripts to utilize new `Prediction4FusionModel` and `DictMSELoss`. Update `run_demo_2.py` and `run_demo_3.py` for improved model initialization and data handling. Enhance `TokamakH5Dataset` to handle degenerate signals and improve data extraction logic. Remove unused `latent_space.py` and integrate new modality fusion models in `modality_fusion.py`. * Remove unused shot list configuration files and refactor trainer class to introduce MultimodalTrainer and UnimodalTrainer for improved training structure. * Refactor modality models and trainer classes for improved structure and functionality. Removed unused TimeSeriesEncoder and Decoder, introduced FastTimeSeriesEncoder and SpectrogramAutoEncoder. Updated UnimodalTrainer to support logging and checkpoint management. Enhanced TokamakH5Dataset for better data handling and added checkpoint loading functionality in spectrogram reconstruction script. * Add padding collate function and update training script for unimodal autoencoder - Introduced `collate_fn_pad` to handle variable-length tensors in batches. - Updated `train_unimodal_autoencoder.py` to use the new collate function. - Modified `train_unimodal.sh` to include additional signal modalities for training. - Added new autoencoder classes for fast time series and spatial profile modalities, ensuring output shape consistency with adaptive pooling. - Enhanced video autoencoder implementation for better reconstruction quality. * Remove spectrogram reconstruction script and refactor modality models - Deleted `spectrogram_reconstruction.py` as part of the restructuring. - Refactored modality models to introduce baseline versions for actuator, slow time series, fast time series, spatial profile, spectrogram, and video. - Updated model registry and signal-to-model mappings to reflect new baseline architecture. - Enhanced `TokamakH5Dataset` to support additional parameters for FFT and hop length. - Improved training script for unimodal autoencoders to utilize new baseline models and added support for variable-length tensors. * Update .gitignore to include pixi environments and add link to HSI-compression-benchmark in SpectrogramBaselineAutoEncoder docstring * Remove unused shot list files and delete deprecated scripts for training and data handling * Remove deprecated training scripts for CO2, ECE, MHR, and unimodal training * Dev peter (#48) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Dev peter (#50) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! --------- * Dev peter (#55) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! * Added a baseline fusion transformer for latent space prediction. Quick fix for the data standardization. Invalid values have to be ignored. Fix in the function to create H5 files. bolo data does not have to be flipped anymore as the data is now stored in the correct format. --------- * Moved some remaining scripts to the correct subdirectories. * Still working on preparing the dataset. This is not ready to push. Preparation to moving to Stellar. * Updated the data loader. Bugfix for loading the correct slices from H5 files. Implemented calculating incremental statistics. Corrected values in the modality configuration. Removed redundant script standardize_dataset.py * Added scripts for data fetching in Omega. TODO: Write a documentation. * Added a documentation for setting up Globus CLI on Omega and start a simple file transfer. * Updated README.md: - Added information on how to use all the scripts for data fetching. Updated read_mds.sh - Added a switch for globus file transfer. This simply stores the H5 files on Omega and we can add more data later. * More PTData to fetch. * PEP-8 compatible code. Moved prepare_data.py to scripts, added a batch script to do this on compute nodes. Added more point names to the data fetching scripts for Omega. Added docstring to the WelfordTensor class. Updated modalities.yaml with the new point names added. * Generalized make_preprocessing_stats.py and made the function compute_preprocessing_stats more transparent. Bugfix in modalities.yaml - Channels were missing in ECE. * A lot of bugfixes in the dataloader and prepare_data.py * Many bugfixees in the dataset class and for computing preprocessing stats. This is still not efficient enough and causes memory issues. * Speed-ups in data_loader.py. * Speed-ups in the dataloader. Bugfixes in the trainer. Cosmetic changes in tracking.py * drawing.py: - PEP-8 corrections - Support plots of time signals and videos Train-val-test split in fast_time_series_reconstruction.py * Bugfix in processing methods of the dataloader: - Channels was not handled properly (if selecting slices of a signal). - Drawing: Restrict plotting to valid signals (not the padded sections after the actual signal). - Introduced masked loss for fast time series reconstruction. * Added a separate baseline encoder for filterscopes (renamed fast_time_series_baseline.py to filterscope_baseline.py). Updates in the dataset class: Clipping for log transform can go down to -.99 (sufficient because we subtract 1.0). Updates in drawing.py: We can now draw all kinds of different plots (except for profiles for now). Added functionality to draw correlation plots, which is important for finding feature distributions. Added masked loss functions to not consider out-of-range time slices for training. * Added a weighted loss to penalize target distributions. Corrected the R2 score calculation in the drawer. Renamed profile_reconstruction.py to mse_profile_reconstruction.py Added ts_core_density_profile_reconstruction.py * Modified the default parameters of some profile and time-series signals in data_loader.py Added more loss functions in loss.py Switched to HuberLoss in filterscopes_reconstruction.py, in mse_profile_reconstruction.py. Updated model_factory.py to completed signal encoders/decoders. Moved profile_baseline.py into modality. Added training scripts for thomson scattering profiles. * Added CER related info to the dataset class and to the model factory. * Added dummy perceiver stuff. Be careful - this is not structured nicely yet. Only work in progress. * Added more RMP point names to the data fetching script. Restarted work on the latent feature space. * Updated all scripts according to the increased set of diagnostics and actuators we are using. * Updated preprocessing_stats. Here, the statistics are now pre-calculated for both, linear and log10 scale. Working on more accurate autoencoders for time-series and profiles. --------- Co-authored-by: Nathaniel Chen <nathanchen1101@gmail.com> Co-authored-by: renierts <ps9551@princeton.edu>
…re space is more compact now. Added foundation model utilities. This is under development!!!
Too much to comment all. Mainly, the old foundation model is in archive to be able to restore it at any point. The new training scripts are train_e2e*. Adapted dataset functionalities to be compatible with the new training approach.
renierts
added a commit
that referenced
this pull request
Apr 24, 2026
* Dev peter (#73) * Developed basic functionality for training loop. * Reiterating on the dataset class. The sequences are now not resampled to a common number of samples (1000) anymore. Now, the number of samples is different for each diagnostic group. TODO: Update the trainer class. * Added an option to select a subset of input/target modalities. * Remove demo script for DataLoader and model training. The file `run_demo.py` has been deleted as it is no longer needed for the current implementation. * Remove main function and clean up run_demo.py formatting. The main function has been deleted as it is no longer needed, and the formatting of the HDF5 file path in run_demo.py has been improved for better readability. * Restructured nn package. * Added modules for encoder and latent space. * Refactor data loading and demo scripts. Removed unused files, updated .gitignore, and added new demo script `run_demo_2.py` for demonstrating DataLoader and model training. Enhanced `pyproject.toml` with additional dependencies and fixed paths in existing scripts. Updated `data_loader.py` to improve dataset handling. * Enhance data loading functionality by adding support for new input modalities and refining dataset handling. Updated `data_loader.py` to accommodate these changes and improved documentation for clarity. * chore: Update `LICENSE` year and copyright holders * chore: Move utility scripts to `utils/` * chore: Add `.gitignore` for Python projects https://raw.githubusercontent.com/github/gitignore/refs/heads/main/Python.gitignore * chore: Use `pixi` for package and environment management * chore: Move notebooks and demo script to `./scripts/` * chore: Add PyPI dependencies to `pyproject.toml` * Added conv1d models for time-series encoding and spatio-temporal profiles (from TS CER for example). * Bugfixes for shape progression in the baseline models. * Added more parameters for the encoders. * Fixed pre-computing statistics in the dataloader. This matches the new API now. * Bugfix duplicated tensor conversions * Removed profiler * Removed loading the entire time vector. One more speed-up. * feat: Add models and sample `xdata` for shape (#36) * Added conv1d models for time-series encoding and spatio-temporal profiles (from TS CER for example). * Bugfixes for shape progression in the baseline models. * Added more parameters for the encoders. * Fixed pre-computing statistics in the dataloader. This matches the new API now. * Bugfix duplicated tensor conversions * Removed profiler * Removed loading the entire time vector. One more speed-up. * - Added a trainer for pretraining autoencoder. - Bugfix in the dataset class - __getitem__ was out-dated. - Bugfix in video_baseline.py (link to the base classes was wrong) - Added demo for fast_time_series_reconstruction.py * Nathan fm (#42) * chore: Update `pyproject.toml` to reorder authors, enhance README with environment setup instructions, and add validation notes in `validation.txt`. Refactor `dummy_model_2.py` for improved modality configuration and introduce `TextEncoder` enhancements in `text_baseline.py`. * Refactor demo scripts to utilize new `Prediction4FusionModel` and `DictMSELoss`. Update `run_demo_2.py` and `run_demo_3.py` for improved model initialization and data handling. Enhance `TokamakH5Dataset` to handle degenerate signals and improve data extraction logic. Remove unused `latent_space.py` and integrate new modality fusion models in `modality_fusion.py`. * Remove unused shot list configuration files and refactor trainer class to introduce MultimodalTrainer and UnimodalTrainer for improved training structure. * Refactor modality models and trainer classes for improved structure and functionality. Removed unused TimeSeriesEncoder and Decoder, introduced FastTimeSeriesEncoder and SpectrogramAutoEncoder. Updated UnimodalTrainer to support logging and checkpoint management. Enhanced TokamakH5Dataset for better data handling and added checkpoint loading functionality in spectrogram reconstruction script. * Add padding collate function and update training script for unimodal autoencoder - Introduced `collate_fn_pad` to handle variable-length tensors in batches. - Updated `train_unimodal_autoencoder.py` to use the new collate function. - Modified `train_unimodal.sh` to include additional signal modalities for training. - Added new autoencoder classes for fast time series and spatial profile modalities, ensuring output shape consistency with adaptive pooling. - Enhanced video autoencoder implementation for better reconstruction quality. * Remove spectrogram reconstruction script and refactor modality models - Deleted `spectrogram_reconstruction.py` as part of the restructuring. - Refactored modality models to introduce baseline versions for actuator, slow time series, fast time series, spatial profile, spectrogram, and video. - Updated model registry and signal-to-model mappings to reflect new baseline architecture. - Enhanced `TokamakH5Dataset` to support additional parameters for FFT and hop length. - Improved training script for unimodal autoencoders to utilize new baseline models and added support for variable-length tensors. * Dev peter (#43) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Dev peter (#48) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Dev peter (#50) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! * Nathan fm (#53) * chore: Update `pyproject.toml` to reorder authors, enhance README with environment setup instructions, and add validation notes in `validation.txt`. Refactor `dummy_model_2.py` for improved modality configuration and introduce `TextEncoder` enhancements in `text_baseline.py`. * Refactor demo scripts to utilize new `Prediction4FusionModel` and `DictMSELoss`. Update `run_demo_2.py` and `run_demo_3.py` for improved model initialization and data handling. Enhance `TokamakH5Dataset` to handle degenerate signals and improve data extraction logic. Remove unused `latent_space.py` and integrate new modality fusion models in `modality_fusion.py`. * Remove unused shot list configuration files and refactor trainer class to introduce MultimodalTrainer and UnimodalTrainer for improved training structure. * Refactor modality models and trainer classes for improved structure and functionality. Removed unused TimeSeriesEncoder and Decoder, introduced FastTimeSeriesEncoder and SpectrogramAutoEncoder. Updated UnimodalTrainer to support logging and checkpoint management. Enhanced TokamakH5Dataset for better data handling and added checkpoint loading functionality in spectrogram reconstruction script. * Add padding collate function and update training script for unimodal autoencoder - Introduced `collate_fn_pad` to handle variable-length tensors in batches. - Updated `train_unimodal_autoencoder.py` to use the new collate function. - Modified `train_unimodal.sh` to include additional signal modalities for training. - Added new autoencoder classes for fast time series and spatial profile modalities, ensuring output shape consistency with adaptive pooling. - Enhanced video autoencoder implementation for better reconstruction quality. * Remove spectrogram reconstruction script and refactor modality models - Deleted `spectrogram_reconstruction.py` as part of the restructuring. - Refactored modality models to introduce baseline versions for actuator, slow time series, fast time series, spatial profile, spectrogram, and video. - Updated model registry and signal-to-model mappings to reflect new baseline architecture. - Enhanced `TokamakH5Dataset` to support additional parameters for FFT and hop length. - Improved training script for unimodal autoencoders to utilize new baseline models and added support for variable-length tensors. * Update .gitignore to include pixi environments and add link to HSI-compression-benchmark in SpectrogramBaselineAutoEncoder docstring * Remove unused shot list files and delete deprecated scripts for training and data handling * Remove deprecated training scripts for CO2, ECE, MHR, and unimodal training * Dev peter (#48) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Dev peter (#50) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! --------- Co-authored-by: Peter Steiner <61472983+renierts@users.noreply.github.com> * Dev peter (#55) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! * Added a baseline fusion transformer for latent space prediction. Quick fix for the data standardization. Invalid values have to be ignored. Fix in the function to create H5 files. bolo data does not have to be flipped anymore as the data is now stored in the correct format. * some rebased changes * Enhance DDP support in unimodal autoencoder training script - Integrated DistributedManager for distributed training setup. - Updated DataLoader to utilize DistributedSampler when in distributed mode. - Adjusted logging levels based on the main process. - Modified checkpointing to ensure directories are created only by the main process. - Enhanced UnimodalTrainer to support distributed training and model wrapping. * Dev aza (#59) * use dev-peter. Older traner. Things seem to work. * video pipeline ready to push. video model optimization in progress. --------- Co-authored-by: Azarakhsh Jalalvand <aj17@stellar-vis2.princeton.edu> Co-authored-by: Peter Steiner <61472983+renierts@users.noreply.github.com> * Nathan fm (#60) * Update training script for unimodal autoencoder to support distributed training - Replaced `srun pixi run python` with `srun pixi run torchrun` for improved distributed execution. - Added parameters for distributed training configuration in the training script. - Included a comment in the UnimodalTrainer class to indicate the integration of distributed training support. * Update training script for unimodal autoencoder to support distributed training - Replaced `srun pixi run python` with `srun pixi run torchrun` for improved distributed execution. - Added parameters for distributed training configuration in the training script. - Included a comment in the UnimodalTrainer class to indicate the integration of distributed training support. * Add README for modality models * Update README and refactor modality models - Added detailed sections in the README for data storage locations and Flash Attention installation instructions. - Removed unused SpectrogramResLSTM classes and related imports from modality models. - Introduced new Conv3dEncoderBlock and Conv3dDecoderBlock classes in the SpectrogramBaselineEncoder and SpectrogramBaselineDecoder for improved architecture. - Enhanced SpectrogramBaselineEncoder and Decoder to support LSTM integration and modular block structures. * Update README for clarity and accuracy - Clarified instructions for activating the environment. - Improved wording on Flash Attention benefits. - Updated the description for the pre-downloaded wheel URL for Princeton clusters. * Update README for improved clarity and structure - Reorganized environment setup instructions for better readability. - Enhanced the explanation of Flash Attention's benefits and usage. - Updated links for Flash Attention wheel downloads to be more user-friendly. * Refactor README and remove unused CER model - Corrected spelling in the "Environment Setup" section and clarified the use of Pixi for environment management. - Updated section titles for consistency, changing "Datas" to "Data." - Removed the unused CER model implementation from the codebase to streamline the project. * Update .gitignore to include secrets.toml for Streamlit - Re-added .streamlit/secrets.toml to the .gitignore file to prevent tracking of sensitive information. - Removed previous entries for .pixi/* while retaining .pixi/config.toml to maintain necessary configuration files. * feat: Enhance drawing utilities and add NullDrawer for non-main processes - Updated `__init__.py` to include `NullDrawer` in the module exports. - Refactored `distributed.py` to improve DDP wrapping and added `unwrap` method. - Enhanced `drawing.py` with a new `DrawerProtocol` and implemented `NullDrawer` for no-op drawing. - Modified `DefaultDrawer` to streamline loss tracking and visualization. - Added new scripts for SLURM job submissions for various training configurations. - Introduced `spectrogram_tf_only.py` model with encoder-decoder architecture for spectrogram processing. - Implemented new metrics for PSNR and SSIM in `metrics.py`. - Created tracking utilities in `tracking.py` for better training progress monitoring and logging. * feat: Add BigTFUNet model and configuration files * feat: Implement SpectrogramTFAttnAutoEncoder with channel attention and gated target loss (also returned to normalized spectrum, non-normalized causing issues) * Dev peter (#61) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! * Added a baseline fusion transformer for latent space prediction. Quick fix for the data standardization. Invalid values have to be ignored. Fix in the function to create H5 files. bolo data does not have to be flipped anymore as the data is now stored in the correct format. * Foundation model (#56) * Nathan fm (#53) * chore: Update `pyproject.toml` to reorder authors, enhance README with environment setup instructions, and add validation notes in `validation.txt`. Refactor `dummy_model_2.py` for improved modality configuration and introduce `TextEncoder` enhancements in `text_baseline.py`. * Refactor demo scripts to utilize new `Prediction4FusionModel` and `DictMSELoss`. Update `run_demo_2.py` and `run_demo_3.py` for improved model initialization and data handling. Enhance `TokamakH5Dataset` to handle degenerate signals and improve data extraction logic. Remove unused `latent_space.py` and integrate new modality fusion models in `modality_fusion.py`. * Remove unused shot list configuration files and refactor trainer class to introduce MultimodalTrainer and UnimodalTrainer for improved training structure. * Refactor modality models and trainer classes for improved structure and functionality. Removed unused TimeSeriesEncoder and Decoder, introduced FastTimeSeriesEncoder and SpectrogramAutoEncoder. Updated UnimodalTrainer to support logging and checkpoint management. Enhanced TokamakH5Dataset for better data handling and added checkpoint loading functionality in spectrogram reconstruction script. * Add padding collate function and update training script for unimodal autoencoder - Introduced `collate_fn_pad` to handle variable-length tensors in batches. - Updated `train_unimodal_autoencoder.py` to use the new collate function. - Modified `train_unimodal.sh` to include additional signal modalities for training. - Added new autoencoder classes for fast time series and spatial profile modalities, ensuring output shape consistency with adaptive pooling. - Enhanced video autoencoder implementation for better reconstruction quality. * Remove spectrogram reconstruction script and refactor modality models - Deleted `spectrogram_reconstruction.py` as part of the restructuring. - Refactored modality models to introduce baseline versions for actuator, slow time series, fast time series, spatial profile, spectrogram, and video. - Updated model registry and signal-to-model mappings to reflect new baseline architecture. - Enhanced `TokamakH5Dataset` to support additional parameters for FFT and hop length. - Improved training script for unimodal autoencoders to utilize new baseline models and added support for variable-length tensors. * Update .gitignore to include pixi environments and add link to HSI-compression-benchmark in SpectrogramBaselineAutoEncoder docstring * Remove unused shot list files and delete deprecated scripts for training and data handling * Remove deprecated training scripts for CO2, ECE, MHR, and unimodal training * Dev peter (#48) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Dev peter (#50) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! --------- Co-authored-by: Peter Steiner <61472983+renierts@users.noreply.github.com> * Dev peter (#55) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! * Added a baseline fusion transformer for latent space prediction. Quick fix for the data standardization. Invalid values have to be ignored. Fix in the function to create H5 files. bolo data does not have to be flipped anymore as the data is now stored in the correct format. --------- Co-authored-by: Nathaniel Chen <nathanchen1101@gmail.com> * Moved some remaining scripts to the correct subdirectories. * Still working on preparing the dataset. This is not ready to push. Preparation to moving to Stellar. * Updated the data loader. Bugfix for loading the correct slices from H5 files. Implemented calculating incremental statistics. Corrected values in the modality configuration. Removed redundant script standardize_dataset.py * Added scripts for data fetching in Omega. TODO: Write a documentation. * Added a documentation for setting up Globus CLI on Omega and start a simple file transfer. * Updated README.md: - Added information on how to use all the scripts for data fetching. Updated read_mds.sh - Added a switch for globus file transfer. This simply stores the H5 files on Omega and we can add more data later. * More PTData to fetch. * PEP-8 compatible code. Moved prepare_data.py to scripts, added a batch script to do this on compute nodes. Added more point names to the data fetching scripts for Omega. Added docstring to the WelfordTensor class. Updated modalities.yaml with the new point names added. * Generalized make_preprocessing_stats.py and made the function compute_preprocessing_stats more transparent. Bugfix in modalities.yaml - Channels were missing in ECE. * A lot of bugfixes in the dataloader and prepare_data.py --------- Co-authored-by: Nathaniel Chen <nathanchen1101@gmail.com> Co-authored-by: renierts <ps9551@princeton.edu> * Dev peter (#62) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! * Added a baseline fusion transformer for latent space prediction. Quick fix for the data standardization. Invalid values have to be ignored. Fix in the function to create H5 files. bolo data does not have to be flipped anymore as the data is now stored in the correct format. * Foundation model (#56) * Nathan fm (#53) * chore: Update `pyproject.toml` to reorder authors, enhance README with environment setup instructions, and add validation notes in `validation.txt`. Refactor `dummy_model_2.py` for improved modality configuration and introduce `TextEncoder` enhancements in `text_baseline.py`. * Refactor demo scripts to utilize new `Prediction4FusionModel` and `DictMSELoss`. Update `run_demo_2.py` and `run_demo_3.py` for improved model initialization and data handling. Enhance `TokamakH5Dataset` to handle degenerate signals and improve data extraction logic. Remove unused `latent_space.py` and integrate new modality fusion models in `modality_fusion.py`. * Remove unused shot list configuration files and refactor trainer class to introduce MultimodalTrainer and UnimodalTrainer for improved training structure. * Refactor modality models and trainer classes for improved structure and functionality. Removed unused TimeSeriesEncoder and Decoder, introduced FastTimeSeriesEncoder and SpectrogramAutoEncoder. Updated UnimodalTrainer to support logging and checkpoint management. Enhanced TokamakH5Dataset for better data handling and added checkpoint loading functionality in spectrogram reconstruction script. * Add padding collate function and update training script for unimodal autoencoder - Introduced `collate_fn_pad` to handle variable-length tensors in batches. - Updated `train_unimodal_autoencoder.py` to use the new collate function. - Modified `train_unimodal.sh` to include additional signal modalities for training. - Added new autoencoder classes for fast time series and spatial profile modalities, ensuring output shape consistency with adaptive pooling. - Enhanced video autoencoder implementation for better reconstruction quality. * Remove spectrogram reconstruction script and refactor modality models - Deleted `spectrogram_reconstruction.py` as part of the restructuring. - Refactored modality models to introduce baseline versions for actuator, slow time series, fast time series, spatial profile, spectrogram, and video. - Updated model registry and signal-to-model mappings to reflect new baseline architecture. - Enhanced `TokamakH5Dataset` to support additional parameters for FFT and hop length. - Improved training script for unimodal autoencoders to utilize new baseline models and added support for variable-length tensors. * Update .gitignore to include pixi environments and add link to HSI-compression-benchmark in SpectrogramBaselineAutoEncoder docstring * Remove unused shot list files and delete deprecated scripts for training and data handling * Remove deprecated training scripts for CO2, ECE, MHR, and unimodal training * Dev peter (#48) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Dev peter (#50) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! --------- Co-authored-by: Peter Steiner <61472983+renierts@users.noreply.github.com> * Dev peter (#55) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! * Added a baseline fusion transformer for latent space prediction. Quick fix for the data standardization. Invalid values have to be ignored. Fix in the function to create H5 files. bolo data does not have to be flipped anymore as the data is now stored in the correct format. --------- Co-authored-by: Nathaniel Chen <nathanchen1101@gmail.com> * Moved some remaining scripts to the correct subdirectories. * Still working on preparing the dataset. This is not ready to push. Preparation to moving to Stellar. * Updated the data loader. Bugfix for loading the correct slices from H5 files. Implemented calculating incremental statistics. Corrected values in the modality configuration. Removed redundant script standardize_dataset.py * Added scripts for data fetching in Omega. TODO: Write a documentation. * Added a documentation for setting up Globus CLI on Omega and start a simple file transfer. * Updated README.md: - Added information on how to use all the scripts for data fetching. Updated read_mds.sh - Added a switch for globus file transfer. This simply stores the H5 files on Omega and we can add more data later. * More PTData to fetch. * PEP-8 compatible code. Moved prepare_data.py to scripts, added a batch script to do this on compute nodes. Added more point names to the data fetching scripts for Omega. Added docstring to the WelfordTensor class. Updated modalities.yaml with the new point names added. * Generalized make_preprocessing_stats.py and made the function compute_preprocessing_stats more transparent. Bugfix in modalities.yaml - Channels were missing in ECE. * A lot of bugfixes in the dataloader and prepare_data.py * Many bugfixees in the dataset class and for computing preprocessing stats. This is still not efficient enough and causes memory issues. * Speed-ups in data_loader.py. * Speed-ups in the dataloader. Bugfixes in the trainer. Cosmetic changes in tracking.py --------- Co-authored-by: Nathaniel Chen <nathanchen1101@gmail.com> Co-authored-by: renierts <ps9551@princeton.edu> * Dev peter (#63) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! * Added a baseline fusion transformer for latent space prediction. Quick fix for the data standardization. Invalid values have to be ignored. Fix in the function to create H5 files. bolo data does not have to be flipped anymore as the data is now stored in the correct format. * Foundation model (#56) * Nathan fm (#53) * chore: Update `pyproject.toml` to reorder authors, enhance README with environment setup instructions, and add validation notes in `validation.txt`. Refactor `dummy_model_2.py` for improved modality configuration and introduce `TextEncoder` enhancements in `text_baseline.py`. * Refactor demo scripts to utilize new `Prediction4FusionModel` and `DictMSELoss`. Update `run_demo_2.py` and `run_demo_3.py` for improved model initialization and data handling. Enhance `TokamakH5Dataset` to handle degenerate signals and improve data extraction logic. Remove unused `latent_space.py` and integrate new modality fusion models in `modality_fusion.py`. * Remove unused shot list configuration files and refactor trainer class to introduce MultimodalTrainer and UnimodalTrainer for improved training structure. * Refactor modality models and trainer classes for improved structure and functionality. Removed unused TimeSeriesEncoder and Decoder, introduced FastTimeSeriesEncoder and SpectrogramAutoEncoder. Updated UnimodalTrainer to support logging and checkpoint management. Enhanced TokamakH5Dataset for better data handling and added checkpoint loading functionality in spectrogram reconstruction script. * Add padding collate function and update training script for unimodal autoencoder - Introduced `collate_fn_pad` to handle variable-length tensors in batches. - Updated `train_unimodal_autoencoder.py` to use the new collate function. - Modified `train_unimodal.sh` to include additional signal modalities for training. - Added new autoencoder classes for fast time series and spatial profile modalities, ensuring output shape consistency with adaptive pooling. - Enhanced video autoencoder implementation for better reconstruction quality. * Remove spectrogram reconstruction script and refactor modality models - Deleted `spectrogram_reconstruction.py` as part of the restructuring. - Refactored modality models to introduce baseline versions for actuator, slow time series, fast time series, spatial profile, spectrogram, and video. - Updated model registry and signal-to-model mappings to reflect new baseline architecture. - Enhanced `TokamakH5Dataset` to support additional parameters for FFT and hop length. - Improved training script for unimodal autoencoders to utilize new baseline models and added support for variable-length tensors. * Update .gitignore to include pixi environments and add link to HSI-compression-benchmark in SpectrogramBaselineAutoEncoder docstring * Remove unused shot list files and delete deprecated scripts for training and data handling * Remove deprecated training scripts for CO2, ECE, MHR, and unimodal training * Dev peter (#48) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Dev peter (#50) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! --------- Co-authored-by: Peter Steiner <61472983+renierts@users.noreply.github.com> * Dev peter (#55) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! * Added a baseline fusion transformer for latent space prediction. Quick fix for the data standardization. Invalid values have to be ignored. Fix in the function to create H5 files. bolo data does not have to be flipped anymore as the data is now stored in the correct format. --------- Co-authored-by: Nathaniel Chen <nathanchen1101@gmail.com> * Moved some remaining scripts to the correct subdirectories. * Still working on preparing the dataset. This is not ready to push. Preparation to moving to Stellar. * Updated the data loader. Bugfix for loading the correct slices from H5 files. Implemented calculating incremental statistics. Corrected values in the modality configuration. Removed redundant script standardize_dataset.py * Added scripts for data fetching in Omega. TODO: Write a documentation. * Added a documentation for setting up Globus CLI on Omega and start a simple file transfer. * Updated README.md: - Added information on how to use all the scripts for data fetching. Updated read_mds.sh - Added a switch for globus file transfer. This simply stores the H5 files on Omega and we can add more data later. * More PTData to fetch. * PEP-8 compatible code. Moved prepare_data.py to scripts, added a batch script to do this on compute nodes. Added more point names to the data fetching scripts for Omega. Added docstring to the WelfordTensor class. Updated modalities.yaml with the new point names added. * Generalized make_preprocessing_stats.py and made the function compute_preprocessing_stats more transparent. Bugfix in modalities.yaml - Channels were missing in ECE. * A lot of bugfixes in the dataloader and prepare_data.py * Many bugfixees in the dataset class and for computing preprocessing stats. This is still not efficient enough and causes memory issues. * Speed-ups in data_loader.py. * Speed-ups in the dataloader. Bugfixes in the trainer. Cosmetic changes in tracking.py * drawing.py: - PEP-8 corrections - Support plots of time signals and videos Train-val-test split in fast_time_series_reconstruction.py * Added functionalities for preprocessing. - Convert float64 to float32 in an existing H5 file - Add new data from another H5 file to an existing target file --------- Co-authored-by: Nathaniel Chen <nathanchen1101@gmail.com> Co-authored-by: renierts <ps9551@princeton.edu> * Dev peter (#64) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! * Added a baseline fusion transformer for latent space prediction. Quick fix for the data standardization. Invalid values have to be ignored. Fix in the function to create H5 files. bolo data does not have to be flipped anymore as the data is now stored in the correct format. * Foundation model (#56) * Nathan fm (#53) * chore: Update `pyproject.toml` to reorder authors, enhance README with environment setup instructions, and add validation notes in `validation.txt`. Refactor `dummy_model_2.py` for improved modality configuration and introduce `TextEncoder` enhancements in `text_baseline.py`. * Refactor demo scripts to utilize new `Prediction4FusionModel` and `DictMSELoss`. Update `run_demo_2.py` and `run_demo_3.py` for improved model initialization and data handling. Enhance `TokamakH5Dataset` to handle degenerate signals and improve data extraction logic. Remove unused `latent_space.py` and integrate new modality fusion models in `modality_fusion.py`. * Remove unused shot list configuration files and refactor trainer class to introduce MultimodalTrainer and UnimodalTrainer for improved training structure. * Refactor modality models and trainer classes for improved structure and functionality. Removed unused TimeSeriesEncoder and Decoder, introduced FastTimeSeriesEncoder and SpectrogramAutoEncoder. Updated UnimodalTrainer to support logging and checkpoint management. Enhanced TokamakH5Dataset for better data handling and added checkpoint loading functionality in spectrogram reconstruction script. * Add padding collate function and update training script for unimodal autoencoder - Introduced `collate_fn_pad` to handle variable-length tensors in batches. - Updated `train_unimodal_autoencoder.py` to use the new collate function. - Modified `train_unimodal.sh` to include additional signal modalities for training. - Added new autoencoder classes for fast time series and spatial profile modalities, ensuring output shape consistency with adaptive pooling. - Enhanced video autoencoder implementation for better reconstruction quality. * Remove spectrogram reconstruction script and refactor modality models - Deleted `spectrogram_reconstruction.py` as part of the restructuring. - Refactored modality models to introduce baseline versions for actuator, slow time series, fast time series, spatial profile, spectrogram, and video. - Updated model registry and signal-to-model mappings to reflect new baseline architecture. - Enhanced `TokamakH5Dataset` to support additional parameters for FFT and hop length. - Improved training script for unimodal autoencoders to utilize new baseline models and added support for variable-length tensors. * Update .gitignore to include pixi environments and add link to HSI-compression-benchmark in SpectrogramBaselineAutoEncoder docstring * Remove unused shot list files and delete deprecated scripts for training and data handling * Remove deprecated training scripts for CO2, ECE, MHR, and unimodal training * Dev peter (#48) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Dev peter (#50) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! --------- Co-authored-by: Peter Steiner <61472983+renierts@users.noreply.github.com> * Dev peter (#55) * Removed the argument "batch_size" from the trainers. Changed default hyperparameters in the models. Added demo for profile reconstruction. Added script for dataset standardization (has to be run once before model training to store normalization coefficients). * Bugfix in the dataset class. When iterating over movie configurations, the wrong configuration was used to find the correct signal name. Also, removed warning for duplicated tensor conversion. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Added base script for video reconstruction. Copied from Aza's branch for debugging purposes. * Minor changes in the example scripts. More preprocessing options for the dataset class. * Fixed a bug where the dataset class failed when using multiple workers and opening an H5 file prior to distributing the dataset across all workers. Significant updates in the Fast time series baseline and actuator reconstruction classes. * Lots of bugfixes in the dataset, trainer, and models. The basic encoders are now all working. Examples are in scripts. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Extended checkpointing - the trainer stores now: - Model - Optimizer state - Scheduler state - Current loss - Current epoch For the sake of continual training. * Adapted the other reconstruction scripts to match the new API. * Bugfix in the dataset class. When splitting inputs and targets, I forgot to remove unused modalities. This follows the standard getitem function now. * Prepared an option to preprocess movies. This has to be fully integrated!!! * Added a baseline fusion transformer for latent space prediction. Quick fix for the data standardization. Invalid values have to be ignored. Fix in the function to create H5 files. bolo data does not have to be flipped anymore as the data is now stored in the correct format. --------- Co-authored-by: Nathaniel Chen <nathanchen1101@gmail.com> * Moved some remaining scripts to the correct subdirectories. * Still working on preparing the dataset. This is not ready to push. Preparation to moving to Stellar. * Updated the data loader. Bugfix for loading the correct slices from H5 files. Implemented calculating incremental statistics. Corrected values in the modality configuration. Removed redundant script standardize_dataset.py * Added scripts for data fetching in Omega. TODO: Write a documentation. * Added a documentation for setting up Globus CLI o…
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.