Save everything
This commit is contained in:
parent
5c792ac14c
commit
0d09aefb77
@ -24,7 +24,8 @@ stages {
|
|||||||
archiveArtifacts artifacts: 'pytorch/result.txt',
|
archiveArtifacts artifacts: 'pytorch/result.txt',
|
||||||
allowEmptyArchive: true
|
allowEmptyArchive: true
|
||||||
dir('my_runs') {
|
dir('my_runs') {
|
||||||
archiveArtifacts artifacts: '**/*.pth'
|
//archiveArtifacts artifacts: '**/*.pth'
|
||||||
|
archiveArtifacts artifacts: '**/**'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ def evaluate(model, val_loader):
|
|||||||
return model.validation_epoch_end(outputs)
|
return model.validation_epoch_end(outputs)
|
||||||
|
|
||||||
@ex.capture
|
@ex.capture
|
||||||
def fit(epochs, lr, model, train_loader, val_loader, _log, opt_func=torch.optim.SGD):
|
def fit(epochs, lr, model, train_loader, val_loader, _log, _run, opt_func=torch.optim.SGD):
|
||||||
_log.info("log info test ")
|
_log.info("log info test ")
|
||||||
epochs=epochs
|
epochs=epochs
|
||||||
history = []
|
history = []
|
||||||
@ -174,6 +174,8 @@ def fit(epochs, lr, model, train_loader, val_loader, _log, opt_func=torch.optim.
|
|||||||
torch.save(model, 'saved_model.pth')
|
torch.save(model, 'saved_model.pth')
|
||||||
ex.add_artifact("saved_model.pth")
|
ex.add_artifact("saved_model.pth")
|
||||||
|
|
||||||
|
_run.info["epochs"] = epochs
|
||||||
|
|
||||||
return history
|
return history
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user