Skip to content

Commit

Permalink
Update FAQ.md (#444)
Browse files Browse the repository at this point in the history
#443 added explanation in FAQ
  • Loading branch information
bw4sz authored May 10, 2023
1 parent 742e4b0 commit f85644b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,19 @@ m.load_state_dict(ckpt["state_dict"])
On some devices and systems we have found an error referencing the model.trainer object that was created in m.create_trainer().
We welcome a reproducible issue to address this error as it appears highly variable and relates to upstream issues. It appears more common on google colab and github actions.

In most cases, this error appears when running multiple calls to model.predict or model.train. We believe this occurs because garbage collection has deleted the model.trainer object see:
https://github.com/Lightning-AI/lightning/issues/12233
https://github.com/weecology/DeepForest/issues/338

If you run into this error, users (e.g https://github.com/weecology/DeepForest/issues/443), have found that creating the trainer object within the loop can resolve this issue.

```
for tile in tiles_to_predict:
m.create_trainer()
m.predict_tile(tile)
```
Usually creating this object does not cost too much computational time.

### Saving

We have rarely heard that this appears on save:
Expand Down

0 comments on commit f85644b

Please sign in to comment.