43 read support log file#52
Conversation
|
Hi @SarahAlidoost , I added the timestamp to logfile suffix. However I found |
Hi @rogerkuou Thanks! There are a information in train.py and predict.py that are written by SummaryWriter, for example |
|
Hi @SarahAlidoost , I updated the variable names in train to solve the duplication of the training loss. Also added an example of reading log and plotted the history of training/validation loss. |
|
@SarahAlidoost and just solved the conflict. Feel free to review! |
SarahAlidoost
left a comment
There was a problem hiding this comment.
@rogerkuou thanks for the implementation 👍 In addition to what I suggested on changed code, I have two more comments about the notebook:
- You added a plotting code (train vs validation loss) to the notebook as below. Can we have the plotting as a util function? also can we use a better axis labels so later we can put the plots in presentations/publications? Here suggestions: replace "
step" with "epoch", in "ylabel" replace "Loss" with "Average loss per epoch (K)". It would be nice if the unit i.e.Kcan be adjusted based on the input data.
# Load saved training status with tbparse.SummaryReader
reader = SummaryReader(run_dir)
# plot training and validation loss
plt.figure(figsize=(10, 5))
train_loss = reader.scalars[reader.scalars["tag"] == "Loss/train"]
validation_loss = reader.scalars[reader.scalars["tag"] == "Loss/validation"]
plt.plot(train_loss["step"], train_loss["value"], label="Train Loss")
plt.plot(validation_loss["step"], validation_loss["value"], label="Validation Loss")
plt.xlabel("Step")
plt.ylabel("Loss")
plt.legend()- in the line below, why
chunkandcompute()is needed? I can tun the notebook without them:
monthly_data = xr.open_mfdataset(file_names, chunks={'time': 1, 'lat': 240, 'lon': 240}).compute()Co-authored-by: SarahAlidoost <55081872+SarahAlidoost@users.noreply.github.com>
|
Thanks @SarahAlidoost, I maked the |
SarahAlidoost
left a comment
There was a problem hiding this comment.
@rogerkuou thanks 👍 . Let's merge this.
fix #43