Zaktualizuj 'train-mlflow.py'

This commit is contained in:
Kornelia Girejko 2022-05-15 15:31:24 +02:00
parent 619e7f6645
commit e1b813d136

View File

@ -91,8 +91,8 @@ def my_main(epochs):
with open ("output.txt",'a+') as f:
if (epochs%100==0):
f.write(f'epoch:{epochs+1},loss = {loss.item():.4f}')
x = X_training.detach().numpy()
y = y_predicted_train.detach().numpy()
#x = X_training.detach().numpy()
#y = y_predicted_train.detach().numpy()
with torch.no_grad():
y_predicted = model(X_testing)
@ -102,8 +102,8 @@ def my_main(epochs):
#result = open("output",'w+')
#result.write(f'{y_predicted}')
input_example = X_testing[0].numpy()
siganture = infer_signature(x,y)
input_example = X_testing[1].numpy()
siganture = mlflow.models.signature.infer_signature(X_training,model(X_training))
tracking_url_type_store = urlparse(mlflow.get_tracking_uri()).scheme
if tracking_url_type_store != "file":