Hey fellow participants.
I think i found the reason for long queue waiting time. I noticed that the code provided in the benchmark notebook doesn´t leverage GPU, but instead lets your model do inference on CPU. Since probably most participants start with that notebook, i´m guessing that most didn´t adjust the code in main.py to let their model do inference on GPU. I adjusted the code and tested the difference:
CPU: 1h 44 minutes
GPU: 0h 23 minutes
Here is a little hard coded solution to speed up Inference:
main.py
line 79:
change to:
x = batch[“chip”].to(“cuda”)
instead of:
x = batch[“chip”]
line 81:
change to:
preds = (preds > 0.5).detach().to(“cpu”).numpy().astype(“uint8”)
instead of:
preds = (preds > 0.5).detach().numpy().astype(“uint8”)
line 117:
change to:
model = CloudModel(bands=bands, hparams={“weights”: None, “gpu”: True})
instead of:
model = CloudModel(bands=bands, hparams={“weights”: None})
Please make sure to adjust your code. It would benefit everybody. It would help if the blog post with the benchmark notebook gets adjusted as well to avoid running into the same issues of long queues again.