Skip to content

Commit 11445e1

Browse files
small fix
1 parent bf5343c commit 11445e1

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

mlflow-project/train_keras.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
@click.option("--hidden-units", default=20, type=int)
3434
def train_keras(ratings_data, als_model_uri, hidden_units):
3535
np.random.seed(0)
36-
tf.set_random_seed(42) # For reproducibility
36+
tf.random.set_seed(42) # For reproducibility
3737

3838
spark = pyspark.sql.SparkSession.builder.getOrCreate()
3939
als_model = mlflow.spark.load_model(als_model_uri).stages[0]

notebooks/3-mlflow-models-and-model-registry.ipynb

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,6 @@
5353
")[0]"
5454
]
5555
},
56-
{
57-
"cell_type": "code",
58-
"execution_count": null,
59-
"metadata": {},
60-
"outputs": [],
61-
"source": [
62-
"run_id, metric_value = best_run('r2', experiment_id=1)\n",
63-
"print(f\"best run: '{run_id}', r2-score: {metric_value:.5f}\")"
64-
]
65-
},
6656
{
6757
"cell_type": "markdown",
6858
"metadata": {},
@@ -77,7 +67,7 @@
7767
"outputs": [],
7868
"source": [
7969
"result = mlflow.register_model(\n",
80-
" f\"runs:/{run_id}/model\",\n",
70+
" f\"runs:/{run.info.run_id}/model\",\n",
8171
" \"wine-quality-predictor\"\n",
8272
")"
8373
]

0 commit comments

Comments
 (0)