Save everything
All checks were successful
s444354-training/pipeline/head This commit looks good
s444354-evaluation/pipeline/head This commit looks good

This commit is contained in:
Adrian Charkiewicz 2022-05-08 21:46:59 +02:00
parent 5c792ac14c
commit 0d09aefb77
2 changed files with 5 additions and 2 deletions

View File

@ -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: '**/**'
} }
} }

View File

@ -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