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

Log generation parameters and allow loading cached dataset without all splits #765

Merged
merged 3 commits into from
May 16, 2023

Conversation

aakashdp6548
Copy link
Collaborator

  1. Logs config used at generation time to generated data folder for reference
  2. Move asserts checking that all splits are present out of CachedSimulatedDataset constructor and into individual dataloader functions. This allows for having separate datasets used for training/testing, e.g. generating training data with certain params and test data with other params.
# no errors
train_only_dataset = instantiate(cfg.cached_simulator, cached_data_path="path/to/train/data")
test_only_dataset = instantiate(cfg.cached_simulator, cached_data_path="path/to/test/data")

trainer.fit(encoder, datamodule=train_only_dataset)
trainer.test(encoder, datamodule=test_only_dataset)

# AssertionError: no cached data found
trainer.fit(encoder, datamodule=test_only_dataset)
trainer.test(encoder, datamodule=train_only_dataset)

@aakashdp6548 aakashdp6548 linked an issue May 16, 2023 that may be closed by this pull request
4 tasks
@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

Merging #765 (b52d6af) into master (760e909) will decrease coverage by 0.03%.
The diff coverage is 93.33%.

❗ Current head b52d6af differs from pull request most recent head c4e7820. Consider uploading reports for the commit c4e7820 to get more accurate results

@@            Coverage Diff             @@
##           master     #765      +/-   ##
==========================================
- Coverage   88.75%   88.73%   -0.03%     
==========================================
  Files          14       14              
  Lines        1254     1260       +6     
==========================================
+ Hits         1113     1118       +5     
- Misses        141      142       +1     
Flag Coverage Δ
unittests 88.73% <93.33%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
bliss/simulator/simulated_dataset.py 88.88% <91.66%> (-0.59%) ⬇️
bliss/generate.py 98.57% <100.00%> (+0.04%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@zhixiangteoh zhixiangteoh left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

bliss/simulator/simulated_dataset.py Outdated Show resolved Hide resolved
@aakashdp6548 aakashdp6548 merged commit a159942 into master May 16, 2023
@aakashdp6548 aakashdp6548 deleted the 762-modifications-to-generation-process branch May 16, 2023 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modifications to generation process
2 participants