diff --git a/notebooks/dislibs.ipynb b/notebooks/dislibs.ipynb index d1ebbe0342694a57e1c877ae6a8d2cfc0e0959b3..74707133612ae3ccbe08a81b29a1d2824776f84b 100644 --- a/notebooks/dislibs.ipynb +++ b/notebooks/dislibs.ipynb @@ -22,7 +22,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 1, "id": "24716b0f", "metadata": {}, "outputs": [], @@ -43,7 +43,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 2, "id": "7eba2399", "metadata": {}, "outputs": [], @@ -66,7 +66,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 3, "id": "7cdf795d", "metadata": {}, "outputs": [ @@ -95,7 +95,7 @@ "* ~-.< *\n", "********************************************************\n", "* - Starting COMPSs runtime... *\n", - "* - Log path : /root/.COMPSs/Interactive_03/\n", + "* - Log path : /root/.COMPSs/Interactive_01/\n", "* - PyCOMPSs Runtime started... Have fun! *\n", "********************************************************\n" ] @@ -110,7 +110,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 5, "id": "9ccb1851", "metadata": {}, "outputs": [], @@ -123,29 +123,36 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 8, "id": "e9a55fb8", "metadata": {}, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023/04/27 06:24:47 INFO mlflow.tracking.fluent: Experiment with name 'dislib-tests-usage' does not exist. Creating a new experiment.\n" + ] + }, { "data": { "text/plain": [ - "<Experiment: artifact_location='mlflow-artifacts:/5', creation_time=1680077947468, experiment_id='5', last_update_time=1680077947468, lifecycle_stage='active', name='dislib-tests-clean', tags={}>" + "<Experiment: artifact_location='mlflow-artifacts:/6', creation_time=1682576687659, experiment_id='6', last_update_time=1682576687659, lifecycle_stage='active', name='dislib-tests-usage', tags={}>" ] }, - "execution_count": 9, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mlflow.set_tracking_uri('https://zam10017.zam.kfa-juelich.de/')\n", - "mlflow.set_experiment('dislib-tests-clean')" + "mlflow.set_experiment('dislib-tests-usage')" ] }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 6, "id": "e749733a", "metadata": {}, "outputs": [], @@ -167,7 +174,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 9, "id": "3f2b341d", "metadata": {}, "outputs": [ @@ -177,7 +184,7 @@ "<ActiveRun: >" ] }, - "execution_count": 12, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -188,8 +195,8 @@ }, { "cell_type": "code", - "execution_count": 13, - "id": "213adb03", + "execution_count": 10, + "id": "48f63f3d", "metadata": {}, "outputs": [ { @@ -199,7 +206,7 @@ " function(dialog) {\n", " dialog.modal({\n", " title: 'WARNING: Some tasks may have failed',\n", - " body: $('<p>[ERRMGR] - WARNING: [WARNING] Null value obtained while loading ${ComputingUnits} from environment<br>[ERRMGR] - WARNING: [WARNING] Null value obtained while loading ${ComputingUnits} from environment<br>[ERRMGR] - WARNING: [WARNING] Null value obtained while loading ${ComputingUnits} from environment</p>'),\n", + " body: $('<p>[ERRMGR] - WARNING: [WARNING] Null value obtained while loading ${ComputingUnits} from environment<br>[ERRMGR] - WARNING: [WARNING] Null value obtained while loading ${ComputingUnits} from environment</p>'),\n", " buttons: {\n", " 'Continue': { },\n", " }\n", @@ -228,8 +235,37 @@ "\n", "km.fit(x_ds)\n", "y_pred = km.predict(x_ds)\n", - "centers = km.centers\n", - "\n", + "centers = km.centers" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "9e7ba97f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "ds-array(blocks=(...), top_left_shape=(1, 1), reg_shape=(1, 1), shape=(1, 1), sparse=False)" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "km.predict(ds.array([[-1, -2]], block_size=(1,1)))" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "213adb03", + "metadata": {}, + "outputs": [], + "source": [ "#log model\n", "wrapped = PyCompssWrapper(km)\n", "model_info = mlflow.pyfunc.log_model(artifact_path='dislibmodel', \n", @@ -239,7 +275,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 17, "id": "642782c7", "metadata": {}, "outputs": [ @@ -264,7 +300,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 18, "id": "d1025134", "metadata": {}, "outputs": [], @@ -275,7 +311,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 19, "id": "97282393", "metadata": {}, "outputs": [ @@ -299,7 +335,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 20, "id": "7fcdfcdd", "metadata": {}, "outputs": [],