is there an easy way to set a epoch size smaller than my whole dataset? or a good way to do that? I have 650k images - would love to do something like for each epoch randomly sample 50k etc so i can more granularly early stop?
Ultimately all callbacks will be imported together, so we will have to be careful to import them in the order that makes default.callbacks with all defaults.
does v2 have the equivalent of .to_distributed yet? or is there already a good distributed v2 training script laying around for inspiration?
apologies if itās super obvious in the source, i didnāt see it (is see stuff to return the right model if distributed i guess i could wrap up the model myself?)
iām using mixedprecision btw in case that affects anything
Honestly itās often faster for us to be told of an issue on the forum and fix it ourselves, vs deal with merging a PR. So feel free to just ping us when you see a problem.
One thing that I feel would be very useful would be an ability to run inference both on a batch or a single example using a loaded model. This can be useful in the context of a Kaggle competition but more broadly it would allow for building a lot of interesting things. Might be I am doing something wrong, but currently this does not seem possible. I tried looking into this myself not to bother anyone but didnāt get very far.
A bonus here would be an ability to perform TTA. I am not even that interested in a TTA method, but rather something that would allow me to specify augmentations to be applied to data during inference and that would give me the preds from a single inference run. I suspect I could get this as is right now if I can figure out how I can apply augmentations to the validation set (this is not something I have explored).
One other thing I have been interested in doing is custom sampling of examples to go into an epoch, but now looking at code I think this should be fairly straightforward to do somewhere in between DataLoader.sampler and DataLoader.create_batches
I can tell from the commit history that both you and Sylvain are very busy - I am sure that this functionality is coming at some point, just would be helpful to know if you are planning on working on the ability to predict using a loaded model anytime soon. If not maybe Iāll take another stab at it though I am thinking that probably moving around the order in which I was planning to work on things would probably be my best bet.
@radek iām looking at this too because iām now at the point where i want to try submitting a model to the kaggle competition. right now iām doing roughly this based on the #13 learner notebook:
its crashing inside the progress callback due to n_epoch not existing.
In validation, and in get_preds, self._do_begin_fit(n_epoch) is not called inside the learner.
iām debugging this now, when i figure it out iāll let you know
i agree with all your suggestions though, especially the sampler - was thinking the same thing and it would be great for this particular competition (brain injury) because 1) there are a zillion images 2) there are some nice ways to naturally want to segment random draws (by patient, by class type, etc)
anyway, somehow iām going to extract a submission out of this model today, will let you know when i figure out how
Iāve created a Tuple class that inherits from tuple, but adds some nice things - particularly element-wise ops. This is particularly useful for dealing with arithmetic with image shapes. For instances hereās a refactoring I just did in crop_pad: