diff --git a/Jenkinsfile3 b/Jenkinsfile3 index 0b3bab9..2b8c218 100644 --- a/Jenkinsfile3 +++ b/Jenkinsfile3 @@ -24,7 +24,8 @@ stages { archiveArtifacts artifacts: 'pytorch/result.txt', allowEmptyArchive: true dir('my_runs') { - archiveArtifacts artifacts: '**/*.pth' + //archiveArtifacts artifacts: '**/*.pth' + archiveArtifacts artifacts: '**/**' } } diff --git a/pytorch/pytorch.py b/pytorch/pytorch.py index 3a6ca07..9185d5a 100644 --- a/pytorch/pytorch.py +++ b/pytorch/pytorch.py @@ -156,7 +156,7 @@ def evaluate(model, val_loader): return model.validation_epoch_end(outputs) @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 ") epochs=epochs 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') ex.add_artifact("saved_model.pth") + _run.info["epochs"] = epochs + return history