question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Raise friendly errors in case of `num_epochs` is less than `num_warmup_epochs` in CIFAR10 and Transformers examples

See original GitHub issue

I was trying to benchmark torch.inference_mode vs torch.no_grad on CIFAR10 example, so I just wanted to run for 3 epochs and average the benchmarks, the default warmup epochs is 4, so the scheduler will raise this error, which is not very clear to new users

f"Milestones should be increasing integers, but given {pair[0]} is smaller "
ValueError: Milestones should be increasing integers, but given 291 is smaller than the previous milestone 388

So I suggest to check num_epochs vs num_warmup_epochs inside run method and raise more clear error message for the users.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DebarshiChandacommented, Oct 2, 2021

Hey @KickItLikeShika, I think adding an assertion can solve this issue. Can you assign this to me?

1reaction
KickItLikeShikacommented, Sep 20, 2021

Hey @himanshu007-creator, thanks a lot for showing interest, we have these 2 examples:

in both, if the num_epochs is less the num_warmup_epochs, the error in the description will be raised, we want to check inside the run method in both examples, if num_epochs is less than num_warmupds_epochs we should raise a friendly error message explaining what’s the error and why, and what the user should do (either increase the num_epochs or decrease num_warmup_epochs)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Let's train vision transformers (ViT) for cifar 10! - GitHub
Let's train vision transformers for cifar 10! This is an unofficial and elementary implementation of An Image is Worth 16x16 Words: Transformers for...
Read more >
arXiv:2104.05704v4 [cs.CV] 7 Jun 2022
This allows for a Transformer based model to be trained from scratch on small datasets like CIFAR-10 and CIFAR-100, providing competitive ...
Read more >
CIFAR-10 Benchmark (Image Classification) - Papers With Code
Rank Model Percentage correct PARAMS Year Tags 1 efficient adaptive ensembling 99.612 2022 2 ViT‑H/14 99.5 632M 2020 Transformer 3 µ2Net (ViT‑L/16) 99.49 2022
Read more >
Exploring the Limits of Out-of-Distribution Detection
The paper especially focuses on the case where in-distribution (InD) and OOD samples are close to each other (near OOD) (e.g. when CIFAR100...
Read more >
Quantum Error Correction and Fault Tolerance – Part 2
Terry Rudolph and Naomi Nickerson from PsiQuantum describe how to build a practical measurement-based quantum computer during a series of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found