Zaktualizuj 'train-sacred.py'

This commit is contained in:
Kornelia Girejko 2022-05-09 11:10:46 +02:00
parent c24a7c1f84
commit 67c7816d48

View File

@ -20,7 +20,7 @@ from sacred.observers.mongo import mongo_db_option
ex = Experiment("s478815",save_git_info=False)
ex.observers.append(FileStorageObserver('experiment/'))
ex.observers.append(FileStorageObserver('experiment'))
ex.observers.append(MongoObserver(url='mongodb://admin:IUM_2021@172.17.0.1:27017', db_name='sacred'))
@ -97,6 +97,12 @@ def my_main(epochs):
#result.write(f'{y_predicted}')
torch.save(model, "modelS.pkl")
rmse = mean_squared_error(y_testing, y_predicted)
#print(rmse)
mae = mean_absolute_error(y_testing, y_predicted)
#print(mae)
ex.run()