save only model, not everything
This commit is contained in:
parent
9ce0127a72
commit
5c792ac14c
@ -24,7 +24,7 @@ stages {
|
||||
archiveArtifacts artifacts: 'pytorch/result.txt',
|
||||
allowEmptyArchive: true
|
||||
dir('my_runs') {
|
||||
archiveArtifacts artifacts: '**/**'
|
||||
archiveArtifacts artifacts: '**/*.pth'
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -170,7 +170,10 @@ def fit(epochs, lr, model, train_loader, val_loader, _log, opt_func=torch.optim.
|
||||
result = evaluate(model, val_loader)
|
||||
model.epoch_end(epoch, result, epochs)
|
||||
history.append(result)
|
||||
ex.add_artifact("saved_model.pb")
|
||||
|
||||
torch.save(model, 'saved_model.pth')
|
||||
ex.add_artifact("saved_model.pth")
|
||||
|
||||
return history
|
||||
|
||||
|
||||
@ -207,5 +210,7 @@ def main():
|
||||
#my_config()
|
||||
#print("number of epochs is: ", epochs)
|
||||
history5 = fit()
|
||||
|
||||
|
||||
|
||||
#ex.run()
|
||||
|
Loading…
Reference in New Issue
Block a user