Skip to content

Fix device allocation in sample.py / simplify sequence generation#160

Merged
cameronraysmith merged 7 commits intopinellolab:mainfrom
ssenan:sample_fix
Jul 13, 2023
Merged

Fix device allocation in sample.py / simplify sequence generation#160
cameronraysmith merged 7 commits intopinellolab:mainfrom
ssenan:sample_fix

Conversation

@ssenan
Copy link
Collaborator

@ssenan ssenan commented Jul 13, 2023

  • Resolves Sample generation fails to run #159
  • Adds accelerate to sample.py for easy device allocation during sample generation
  • Adds save_timesteps and save_dataframe flags to more easily specify how many samples to generate
  • Removes some old depedencies from environment.yml and pyproject.toml that are currently unused and updates them to allow for torch>=2.0.0

@ssenan ssenan added the enhancement New feature or request label Jul 13, 2023
@ssenan ssenan added this to the 0.0.0 milestone Jul 13, 2023
@ssenan ssenan self-assigned this Jul 13, 2023
@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Merging #160 (133c2a8) into main (a16a94f) will decrease coverage by 0.07%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #160      +/-   ##
==========================================
- Coverage   11.39%   11.32%   -0.07%     
==========================================
  Files          13       13              
  Lines         825      830       +5     
  Branches       89       91       +2     
==========================================
  Hits           94       94              
- Misses        730      735       +5     
  Partials        1        1              
Impacted Files Coverage Δ
src/dnadiffusion/metrics/metrics.py 0.00% <0.00%> (ø)
src/dnadiffusion/utils/sample_util.py 0.00% <0.00%> (ø)

data_path="dnadiffusion/data/K562_hESCT0_HepG2_GM12878_12k_sequences_per_group.txt",
saved_data_path="dnadiffusion/data/encode_data.pkl",
encode_data = load_data(
data_path="src/dnadiffusion/data/K562_hESCT0_HepG2_GM12878_12k_sequences_per_group.txt",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be a separate issue, but we should just make a top-level data/ folder or specify an external source rather than keeping these in a src/ subfolder.

@cameronraysmith cameronraysmith merged commit 4c31977 into pinellolab:main Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codebase enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Sample generation fails to run

2 participants