如何在手术结束之前从湿干b中取回gged的价值?
import os
import wandb
wandb.init(project= someproject )
def loss_a():
# do_stuff and log:
wandb.log({"loss_a": 1.0})
def loss_b():
# do_stuff and log:
wandb.log({"loss_b": 2.0})
for epoch in range(2):
loss_a()
loss_b()
# somehow retrieve loss_a and loss_b and print them here:
print(f loss_a={??}, loss_b={??} )
运行完成后,我可以找到<代码>wandb.Api,到run.history
。 但似乎在操作之前是最后的,见run.history
。 没有工作。