Trainers: predict step
See original GitHub issueSummary
This issue is to track progress on adding a predict
step to all Trainers.
- BYOLTask (#819)
- ClassificationTask (#790)
- MultiLabelClassificationTask (#792)
- ObjectDetectionTask (#758)
- RegressionTask (#818)
- SemanticSegmentationTask (#939)
Rationale
The default predict
step does not know how to handle our batch dicts.
Implementation
See implementations that have already been finished.
Alternatives
No response
Additional information
No response
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
Trainer - Hugging Face
prediction_step — Performs an evaluation/test step. evaluate — Runs an evaluation loop and returns metrics. predict — Returns predictions (with metrics if ...
Read more >Trainer — PyTorch Lightning 1.8.6 documentation
Trainer also calls optimizer.step() for the last indivisible step number. ... This argument is different from limit_{train,val,test,predict}_batches because ...
Read more >transformers/trainer.py at main · huggingface ... - GitHub
The Trainer class, to easily train a Transformers from scratch or finetune it on a new task. ... The model to train, evaluate...
Read more >gluon.Trainer — Apache MXNet documentation
Sets a new learning rate of the optimizer. step (batch_size[, ignore_stale_grad]). Makes one step of parameter update.
Read more >PyTorch-Lightning error on trainer.predict() - Stack Overflow
... documentation (see here), to which I tried to add a prediction step. However, when performing trainer.predict(model) I get an error:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes I’ll make a PR for this. I’ll add a note to the docstring for users to override by making a custom task if they want to do something specific with the masks.
BYOL could just return embeddings for each sample. RegressionTask should also be straightforward similar to ClassificationTask. I’ll tackle these today. I think SemanticSegmentation may need some thought since it can be a large amount of data per sample and we don’t want users to run OOM by accumulating masks for each sample.