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.

Trainers: predict step

See original GitHub issue

Summary

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:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
isaaccorleycommented, Dec 7, 2022

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.

1reaction
isaaccorleycommented, Oct 4, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

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