Zaktualizuj 'ml_pytorch_mlflow.py'

This commit is contained in:
Sebastian Wałęsa 2022-05-15 22:58:19 +02:00
parent b8a80fb138
commit 635259d6f2

View File

@ -131,15 +131,15 @@ def my_main(epochs):
expected = []
predicted = []
inputs = []
inputss = []
for i in range(0, len(val_ds), 1):
input_, target = val_ds[i]
expected.append(float(target))
predicted.append(float(prediction(input_, model)))
inputs.append(input_)
inputss.append(input_)
inputs = pd.DataFrame(inputs, dtype=np.float64)
inputs = inputs.to_numpy()
inputss = pd.DataFrame(inputs, dtype=np.float64)
inputss = inputs.to_numpy()
MSE = mean_squared_error(expected, predicted)
MAE = mean_absolute_error(expected, predicted)
@ -153,10 +153,10 @@ def my_main(epochs):
input_, target = val_ds[i]
file.write(str(predict_single(input_, target, model)))
print(inputs)
print(inputss)
input_example = inputs[0]
signature = infer_signature(inputs, expected)
input_example = inputss[0]
signature = infer_signature(inputss, expected)
tracking_url_type_store = urlparse(mlflow.get_tracking_uri()).scheme
if tracking_url_type_store != "file":