Zaktualizuj 'train-mlflow.py'

This commit is contained in:
Kornelia Girejko 2022-05-15 21:59:28 +02:00
parent 001b82e11e
commit dd6ae0f8f6

View File

@ -29,7 +29,7 @@ from urllib.parse import urlparse
from mlflow.models import infer_signature
mlflow.set_experiment("478815")
#mlflow.set_tracking_uri("http://172.17.0.1:5000")
mlflow.set_tracking_uri("http://172.17.0.1:5000")
# Model
class Model(nn.Module):
@ -104,7 +104,7 @@ def my_main(epochs):
#result.write(f'{y_predicted}')
input_example = np.array([X_testing.numpy()[0]])
siganture = mlflow.models.signature.infer_signature(np.array(X_training), np.array(y_predicted_train))
siganture = mlflow.models.signature.infer_signature(np.array(X_training.detach().numpy()), np.array(y_predicted_train.detach().numpy()))
tracking_url_type_store = urlparse(mlflow.get_tracking_uri()).scheme
if tracking_url_type_store != "file":