Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virgo HDF5 file format #240

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft

Virgo HDF5 file format #240

wants to merge 23 commits into from

Conversation

jarlsondre
Copy link
Collaborator

Summary

Updates the data loading and synthetic data generation to use the HDF5 file format instead of pickle files. This makes the code both shorter and easier to work with. In particular, we are no longer limited to storing exactly 500 rows per file, but can rather choose a chunk size that suits us after the data has been created. Additionally, due to the functionality of the HDF5 format, all the data is stored in a single file without any issues with loading too much data into memory during runtime.

Related issue :
None

@jarlsondre jarlsondre added the enhancement New feature or request label Nov 7, 2024
@jarlsondre jarlsondre self-assigned this Nov 7, 2024
use-cases/virgo/config.yaml Outdated Show resolved Hide resolved
use-cases/virgo/config.yaml Outdated Show resolved Hide resolved
use-cases/virgo/config.yaml Show resolved Hide resolved
use-cases/virgo/data.py Outdated Show resolved Hide resolved
Comment on lines 12 to 13
# sys.path.append(str(Path("..").resolve()))
sys.path.append(str(Path.cwd().resolve()))
Copy link
Collaborator

Choose a reason for hiding this comment

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

interesting. What is this doing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For some reason, the import was not able to be resolved, so I added the folder to Path. The reason I add cwd is because I usually run this from the use-cases/virgo/ folder instead of the synthetic_data_gen folder. The reason the import is kinda weird is because the use-cases folder sits outside of the src folder, meaning that it's not considered a part of the itwinai library.

Comment on lines 33 to 36
with h5py.File(file_path, "a") as f:
dset = f[dataset_name]
dset.resize(dset.shape[0] + array.shape[0], axis=0)
dset[-array.shape[0] :] = array
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this thread safe? Perhaps HDF5 is ensuring it somehow?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I doubt it's thread safe, but I am using a single file per process so I don't think it should be a problem.

@jarlsondre jarlsondre marked this pull request as draft November 7, 2024 15:04
jarlsondre and others added 10 commits November 7, 2024 16:32
* add gpu utilization decorator and begin work on plots

* add decorator for gpu energy utilization

* Added config option to hpo script, styling (#235)

* Update README.md

* Update README.md

* Update createEnvVega.sh

* remove unused dist file

* run black and isort to fix linting errors

* remove redundant variable

* remove trailing whitespace

* fix issues from PR

* fix import in eurac trainer

* fix linting errors

* update logging directory and pattern

* update default pattern for gpu energy plots

* fix isort linting

* add support for none pattern and general cleanup

* fix linting errors with black and isort

* add configurable and dynamic wait and warmup times for the profiler

* remove old plot

* move horovod import

* fix linting errors

---------

Co-authored-by: Anna Lappe <[email protected]>
Co-authored-by: Matteo Bunino <[email protected]>
* add gpu utilization decorator and begin work on plots

* add decorator for gpu energy utilization

* Added config option to hpo script, styling (#235)

* Update README.md

* Update README.md

* Update createEnvVega.sh

* remove unused dist file

* run black and isort to fix linting errors

* temporary changes

* remove redundant variable

* add absolute time plot

* remove trailing whitespace

* remove redundant variable

* remove trailing whitespace

* begin implementation of backup

* fix issues from PR

* fix issues from PR

* add backup to gpu monitoring

* fix import in eurac trainer

* cleanup backup mechanism slightly

* fix linting errors

* update logging directory and pattern

* update default pattern for gpu energy plots

* fix isort linting

* add support for none pattern and general cleanup

* fix linting errors with black and isort

* fix import in eurac trainer

* fix linting errors

* update logging directory and pattern

* update default pattern for gpu energy plots

* fix isort linting

* add support for none pattern and general cleanup

* fix linting errors with black and isort

* begin implementation of backup

* add backup to gpu monitoring

* add backup functionality to communication plot

* rewrite epochtimetracker and refactor scalability plot code

* cleanup scalability plot code

* updating some epochtimetracker dependencies

* add configurable and dynamic wait and warmup times for the profiler

* temporary changes

* add absolute time plot

* begin implementation of backup

* add backup to gpu monitoring

* cleanup backup mechanism slightly

* fix isort linting

* add support for none pattern and general cleanup

* fix linting errors with black and isort

* begin implementation of backup

* add backup functionality to communication plot

* rewrite epochtimetracker and refactor scalability plot code

* cleanup scalability plot code

* updating some epochtimetracker dependencies

* fix linting errors

* fix more linting errors

* add utilization percentage plot

* run isort for linting

* update default save path for metrics

* add decorators to virgo and some cleanup

* add contributions and cleanup

* fix linting errors

* change 'credits' to 'credit'

* update communication plot style

* update function names

* update scalability function for a more streamlined approach

* run isort

* move horovod import

* fix linting errors

* add contributors

---------

Co-authored-by: Anna Lappe <[email protected]>
Co-authored-by: Matteo Bunino <[email protected]>
@jarlsondre jarlsondre added bug Something isn't working enhancement New feature or request and removed enhancement New feature or request bug Something isn't working labels Nov 8, 2024
@jarlsondre jarlsondre marked this pull request as ready for review November 8, 2024 15:25
@jarlsondre jarlsondre marked this pull request as draft November 8, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants