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

RemoraError: Not enough chunks #181

Closed
adrienvillain opened this issue Jul 1, 2024 · 2 comments
Closed

RemoraError: Not enough chunks #181

adrienvillain opened this issue Jul 1, 2024 · 2 comments

Comments

@adrienvillain
Copy link

Hello,

Thanks for the great tool. I'm trying out remora test data and encountered this error at the model train step:

$ remora   model train   train_dataset.jsn   --model ../../models/ConvLSTM_w_ref.py   --device cpu   --chunk-con
text 50 50   --output-path train_results

[...]
[09:03:52.325] Gradients will be clipped (by value) at 0.00 MADs above the median of the last 1000 gradient maximums.
[09:03:52.513] Params (k) 134.08 | MACs (M) 7327.45
[09:03:52.513] Preparing training settings
[09:03:52.514] Training optimizer and scheduler settings: TrainOpts(epochs=100, early_stopping=10, optimizer_str='AdamW', opt_kwargs=(('weight_decay', 0.0001, 'float'),), learning_rate=0.001, lr_
scheduler_str='CosineAnnealingLR', lr_scheduler_kwargs=(('T_max', 100, 'int'), ('eta_min', 1e-06, 'float')), lr_cool_down_epochs=5, lr_cool_down_lr=1e-07)
Traceback (most recent call last):
[...]
File "/lib/python3.8/site-packages/remora/data_chunks.py", line 2104, in train_test_split
    raise RemoraError("Not enough chunks")
remora.RemoraError: Not enough chunks

Here is the output of dataset inspect:

$ remora dataset inspect train_dataset.jsn 
Dataset summary:
                     size : 415
     modified_base_labels : True
                mod_bases : ['m']
           mod_long_names : ['5mC']
       kmer_context_bases : (4, 4)
            chunk_context : (200, 200)
                   motifs : [('CG', 0)]
           reverse_signal : False
 chunk_extract_base_start : False
     chunk_extract_offset : 0
               pa_scaling : None
          sig_map_refiner : Loaded 9-mer table with 7 central position. Rough re-scaling will be executed.

Thanks for your advice.
Adrien

@adrienvillain
Copy link
Author

Got it solved by adding --num-test-chunks 200 to the command line.

Best,
Adrien

@marcus1487
Copy link
Collaborator

Yes. This is the correct solution. Glad you found it.

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

No branches or pull requests

2 participants