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.

Improve Epochs docs (and more)

See original GitHub issue

Based on my question in the forum, I suggest to clarify the preload parameter to make it clear that preloading does not depend on the status of raw.preload (which I assumed was the case).

I’d change the preload description as follows:

Load all epochs from disk into memory when creating the object or wait before accessing each epoch (more memory efficient but can be slower).

In addition, I’d add the following note:

Epochs are preloaded based on the value of the preload argument. Even if the raw argument has already been preloaded, the returned Epochs object will not be preloaded by default. This means that bad epochs (e.g. epochs with not enough data) will not be dropped immediately, so the number of good epochs displayed may change once the epochs are preloaded.

@hoechenberger @larsoner @agramfort @drammock since this is such a widely used object I’d be grateful if you commented and edited my suggestion if necessary.

Furthermore, I noticed that preload is used inconsistently across BaseEpochs, Epochs, EpochsArray, and EpochsFIF classes:

  • BaseEpochs: Doesn’t have a preload parameter but preload_at_end - what’s the reason to use a different parameter?
  • Epochs: preload=False
  • EpochsArray: Has neither preload nor preload_at_end parameters.
  • EpochsFIF: preload=True

I think it would be great to double-check these inconsistencies - there are probably good reasons, but if not we should discuss changing accordingly.

Finally, @hoechenberger suggested to discuss preload=None as a default, meaning that this would re-use its raw.preload value.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:25 (25 by maintainers)

github_iconTop GitHub Comments

1reaction
cbrnrcommented, Feb 19, 2021

Type checking with isinstance is exactly the point of ABCs, so yes, it works. It should be as simple as inheriting from collections.ABC and slapping @abstractmethod decorators on methods, but we’ll have to see if it is really that painless. I can try and run the test suite to see if this works.

1reaction
cbrnrcommented, Feb 18, 2021

Other people won’t bother us with these questions again 😄. It’s just a matter of style, you don’t have to do it, but this is a classic example of an abstract base class, so we could as well declare it as such.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Improve Deep Learning Performance
Try training for a few epochs and for a heck of a lot of epochs. Consider a near infinite number of epochs and...
Read more >
Optimal epoch in Doc2Vec - Google Groups
Depends on why you want to use vectors. Usually, a larger number of epochs gives better results. If you want to choose 'optimal'...
Read more >
How many epochs should I train my model with? - Gretel.ai
A good rule of thumb is to start with a value that is 3 times the number of columns in your data. If...
Read more >
Training & evaluation with the built-in methods - Keras
Introduction. This guide covers training, evaluation, and prediction (inference) models when using built-in APIs for training & validation ...
Read more >
Overfit and underfit | TensorFlow Core
A model trained on more complete data will naturally generalize better. ... !pip install git+https://github.com/tensorflow/docs
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