This PR fixes two error cases related to the display of the confusion matrix:
1. Caching
The browser was apparently caching the image of the confusion matrix (given through a URL), so if you ran a training multiple times in the same directory, you would always only see the first confusion matrix.
Now we directly send the binary image in the response from the server, so no URL can be cached.
2. Showing confusion matrix from previous run
If you ran another training in an existing checkpoint directory, but cancelled it before the first epoch (or ran a temporal training that doesn't produce a confusion matrix), the interface would still show the confusion matrix from the previous training run.
Now we use an Event to check, if a new confusion matrix has actually been produced in this training run.
This PR fixes two error cases related to the display of the confusion matrix:
1. Caching
The browser was apparently caching the image of the confusion matrix (given through a URL), so if you ran a training multiple times in the same directory, you would always only see the first confusion matrix. Now we directly send the binary image in the response from the server, so no URL can be cached.
2. Showing confusion matrix from previous run
If you ran another training in an existing checkpoint directory, but cancelled it before the first epoch (or ran a temporal training that doesn't produce a confusion matrix), the interface would still show the confusion matrix from the previous training run. Now we use an
Event
to check, if a new confusion matrix has actually been produced in this training run.