From dba52b4120ab4eeb9a4c4f7d798a9adc2ea29088 Mon Sep 17 00:00:00 2001 From: Ilia Moiseev Date: Thu, 30 Mar 2023 10:49:46 +0300 Subject: [PATCH] Update all notebooks --- .../source/examples/data_validation.ipynb | 108 +++---- .../docs/source/examples/dataset_zoo.ipynb | 22 +- .../docs/source/examples/model_training.ipynb | 266 +++++++++--------- .../examples/model_training_trainers.ipynb | 123 ++++---- .../source/examples/pipeline_building.ipynb | 107 ++++++- 5 files changed, 364 insertions(+), 262 deletions(-) diff --git a/cascade/docs/source/examples/data_validation.ipynb b/cascade/docs/source/examples/data_validation.ipynb index 02c0ec0d..d8604b52 100644 --- a/cascade/docs/source/examples/data_validation.ipynb +++ b/cascade/docs/source/examples/data_validation.ipynb @@ -411,7 +411,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Saved as ./.cascade\\a3d6bd5de325ec32c9ce499b153b43bb.yml!\n" + "OK!\n" ] }, { @@ -533,12 +533,12 @@ "evalue": "Checks in positions [0] failed\nItems failed by check:\n0: 0, 10, 20, 30, 36 ... 1739, 1745, 1746, 1768, 1793", "output_type": "error", "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[1;31mDataValidationException\u001b[0m Traceback (most recent call last)", - "\u001b[1;32mc:\\cascade\\cascade\\docs\\source\\examples\\data_validation.ipynb Cell 34\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[0m cde\u001b[39m.\u001b[39;49mPredicateValidator(digits_ds, \u001b[39mlambda\u001b[39;49;00m x: x[\u001b[39m1\u001b[39;49m] \u001b[39m!=\u001b[39;49m \u001b[39m0\u001b[39;49m)\n", - "File \u001b[1;32mC:\\cascade\\cascade\\meta\\validator.py:98\u001b[0m, in \u001b[0;36mPredicateValidator.__init__\u001b[1;34m(self, dataset, func, **kwargs)\u001b[0m\n\u001b[0;32m 96\u001b[0m bad_counts \u001b[39m=\u001b[39m [\u001b[39mlen\u001b[39m(bad_items[i]) \u001b[39mfor\u001b[39;00m i \u001b[39min\u001b[39;00m \u001b[39mrange\u001b[39m(\u001b[39mlen\u001b[39m(\u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_func))]\n\u001b[0;32m 97\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39many\u001b[39m(bad_counts):\n\u001b[1;32m---> 98\u001b[0m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_raise(bad_items)\n\u001b[0;32m 99\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[0;32m 100\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39m'\u001b[39m\u001b[39mOK!\u001b[39m\u001b[39m'\u001b[39m)\n", - "File \u001b[1;32mC:\\cascade\\cascade\\meta\\validator.py:107\u001b[0m, in \u001b[0;36mPredicateValidator._raise\u001b[1;34m(self, items)\u001b[0m\n\u001b[0;32m 105\u001b[0m failed_checks \u001b[39m=\u001b[39m [i \u001b[39mfor\u001b[39;00m i \u001b[39min\u001b[39;00m \u001b[39mrange\u001b[39m(\u001b[39mlen\u001b[39m(bad_counts)) \u001b[39mif\u001b[39;00m bad_counts[i]]\n\u001b[0;32m 106\u001b[0m failed_items \u001b[39m=\u001b[39m \u001b[39m'\u001b[39m\u001b[39m\\n\u001b[39;00m\u001b[39m'\u001b[39m\u001b[39m.\u001b[39mjoin([\u001b[39mf\u001b[39m\u001b[39m'\u001b[39m\u001b[39m{\u001b[39;00mi\u001b[39m}\u001b[39;00m\u001b[39m: \u001b[39m\u001b[39m{\u001b[39;00mprettify_items(items[i])\u001b[39m}\u001b[39;00m\u001b[39m'\u001b[39m \u001b[39mfor\u001b[39;00m i \u001b[39min\u001b[39;00m items])\n\u001b[1;32m--> 107\u001b[0m \u001b[39mraise\u001b[39;00m DataValidationException(\n\u001b[0;32m 108\u001b[0m \u001b[39mf\u001b[39m\u001b[39m'\u001b[39m\u001b[39mChecks in positions \u001b[39m\u001b[39m{\u001b[39;00mfailed_checks\u001b[39m}\u001b[39;00m\u001b[39m failed\u001b[39m\u001b[39m\\n\u001b[39;00m\u001b[39m'\u001b[39m\n\u001b[0;32m 109\u001b[0m \u001b[39mf\u001b[39m\u001b[39m'\u001b[39m\u001b[39mItems failed by check:\u001b[39m\u001b[39m\\n\u001b[39;00m\u001b[39m'\u001b[39m\n\u001b[0;32m 110\u001b[0m \u001b[39mf\u001b[39m\u001b[39m'\u001b[39m\u001b[39m{\u001b[39;00mfailed_items\u001b[39m}\u001b[39;00m\u001b[39m'\u001b[39m\n\u001b[0;32m 111\u001b[0m )\n", - "\u001b[1;31mDataValidationException\u001b[0m: Checks in positions [0] failed\nItems failed by check:\n0: 0, 10, 20, 30, 36 ... 1739, 1745, 1746, 1768, 1793" + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mDataValidationException\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[16], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m cde\u001b[39m.\u001b[39;49mPredicateValidator(digits_ds, \u001b[39mlambda\u001b[39;49;00m x: x[\u001b[39m1\u001b[39;49m] \u001b[39m!=\u001b[39;49m \u001b[39m0\u001b[39;49m)\n", + "File \u001b[0;32m~/work/cascade/cascade/cascade/meta/validator.py:98\u001b[0m, in \u001b[0;36mPredicateValidator.__init__\u001b[0;34m(self, dataset, func, **kwargs)\u001b[0m\n\u001b[1;32m 96\u001b[0m bad_counts \u001b[39m=\u001b[39m [\u001b[39mlen\u001b[39m(bad_items[i]) \u001b[39mfor\u001b[39;00m i \u001b[39min\u001b[39;00m \u001b[39mrange\u001b[39m(\u001b[39mlen\u001b[39m(\u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_func))]\n\u001b[1;32m 97\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39many\u001b[39m(bad_counts):\n\u001b[0;32m---> 98\u001b[0m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_raise(bad_items)\n\u001b[1;32m 99\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[1;32m 100\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39m'\u001b[39m\u001b[39mOK!\u001b[39m\u001b[39m'\u001b[39m)\n", + "File \u001b[0;32m~/work/cascade/cascade/cascade/meta/validator.py:107\u001b[0m, in \u001b[0;36mPredicateValidator._raise\u001b[0;34m(self, items)\u001b[0m\n\u001b[1;32m 105\u001b[0m failed_checks \u001b[39m=\u001b[39m [i \u001b[39mfor\u001b[39;00m i \u001b[39min\u001b[39;00m \u001b[39mrange\u001b[39m(\u001b[39mlen\u001b[39m(bad_counts)) \u001b[39mif\u001b[39;00m bad_counts[i]]\n\u001b[1;32m 106\u001b[0m failed_items \u001b[39m=\u001b[39m \u001b[39m'\u001b[39m\u001b[39m\\n\u001b[39;00m\u001b[39m'\u001b[39m\u001b[39m.\u001b[39mjoin([\u001b[39mf\u001b[39m\u001b[39m'\u001b[39m\u001b[39m{\u001b[39;00mi\u001b[39m}\u001b[39;00m\u001b[39m: \u001b[39m\u001b[39m{\u001b[39;00mprettify_items(items[i])\u001b[39m}\u001b[39;00m\u001b[39m'\u001b[39m \u001b[39mfor\u001b[39;00m i \u001b[39min\u001b[39;00m items])\n\u001b[0;32m--> 107\u001b[0m \u001b[39mraise\u001b[39;00m DataValidationException(\n\u001b[1;32m 108\u001b[0m \u001b[39mf\u001b[39m\u001b[39m'\u001b[39m\u001b[39mChecks in positions \u001b[39m\u001b[39m{\u001b[39;00mfailed_checks\u001b[39m}\u001b[39;00m\u001b[39m failed\u001b[39m\u001b[39m\\n\u001b[39;00m\u001b[39m'\u001b[39m\n\u001b[1;32m 109\u001b[0m \u001b[39mf\u001b[39m\u001b[39m'\u001b[39m\u001b[39mItems failed by check:\u001b[39m\u001b[39m\\n\u001b[39;00m\u001b[39m'\u001b[39m\n\u001b[1;32m 110\u001b[0m \u001b[39mf\u001b[39m\u001b[39m'\u001b[39m\u001b[39m{\u001b[39;00mfailed_items\u001b[39m}\u001b[39;00m\u001b[39m'\u001b[39m\n\u001b[1;32m 111\u001b[0m )\n", + "\u001b[0;31mDataValidationException\u001b[0m: Checks in positions [0] failed\nItems failed by check:\n0: 0, 10, 20, 30, 36 ... 1739, 1745, 1746, 1768, 1793" ] } ], @@ -555,7 +555,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -565,7 +565,7 @@ "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mDataValidationException\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[16], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m cde\u001b[39m.\u001b[39;49mAggregateValidator(digits_ds, \u001b[39mlambda\u001b[39;49;00m ds: \u001b[39mlen\u001b[39;49m(ds) \u001b[39m<\u001b[39;49m \u001b[39m1000\u001b[39;49m)\n", + "Cell \u001b[0;32mIn[17], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m cde\u001b[39m.\u001b[39;49mAggregateValidator(digits_ds, \u001b[39mlambda\u001b[39;49;00m ds: \u001b[39mlen\u001b[39;49m(ds) \u001b[39m<\u001b[39;49m \u001b[39m1000\u001b[39;49m)\n", "File \u001b[0;32m~/work/cascade/cascade/cascade/meta/validator.py:67\u001b[0m, in \u001b[0;36mAggregateValidator.__init__\u001b[0;34m(self, dataset, func, **kwargs)\u001b[0m\n\u001b[1;32m 64\u001b[0m bad_results\u001b[39m.\u001b[39mappend(i)\n\u001b[1;32m 66\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mlen\u001b[39m(bad_results):\n\u001b[0;32m---> 67\u001b[0m \u001b[39mraise\u001b[39;00m DataValidationException(\u001b[39mf\u001b[39m\u001b[39m'\u001b[39m\u001b[39mChecks in positions \u001b[39m\u001b[39m{\u001b[39;00mbad_results\u001b[39m}\u001b[39;00m\u001b[39m failed\u001b[39m\u001b[39m'\u001b[39m)\n\u001b[1;32m 68\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[1;32m 69\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39m'\u001b[39m\u001b[39mOK!\u001b[39m\u001b[39m'\u001b[39m)\n", "\u001b[0;31mDataValidationException\u001b[0m: Checks in positions [0] failed" ] @@ -591,7 +591,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -603,7 +603,7 @@ " 'obj_type': \"\"}]" ] }, - "execution_count": 17, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -615,7 +615,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -630,12 +630,12 @@ "evalue": "{'values_changed': {\"root[0]['len']\": {'new_value': 1000, 'old_value': 1797}}}", "output_type": "error", "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[1;31mDataValidationException\u001b[0m Traceback (most recent call last)", - "\u001b[1;32mc:\\cascade\\cascade\\docs\\source\\examples\\data_validation.ipynb Cell 40\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[0m cde\u001b[39m.\u001b[39;49mMetaValidator(digits_ds, meta_fmt\u001b[39m=\u001b[39;49m\u001b[39m'\u001b[39;49m\u001b[39m.yml\u001b[39;49m\u001b[39m'\u001b[39;49m)\n", - "File \u001b[1;32mC:\\cascade\\cascade\\meta\\meta_validator.py:105\u001b[0m, in \u001b[0;36mMetaValidator.__init__\u001b[1;34m(self, dataset, root, meta_fmt)\u001b[0m\n\u001b[0;32m 103\u001b[0m \u001b[39mif\u001b[39;00m os\u001b[39m.\u001b[39mpath\u001b[39m.\u001b[39mexists(name):\n\u001b[0;32m 104\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mbase_meta \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_load(name)\n\u001b[1;32m--> 105\u001b[0m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_check(meta)\n\u001b[0;32m 106\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[0;32m 107\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_save(meta, name)\n", - "File \u001b[1;32mC:\\cascade\\cascade\\meta\\meta_validator.py:120\u001b[0m, in \u001b[0;36mMetaValidator._check\u001b[1;34m(self, query_meta)\u001b[0m\n\u001b[0;32m 118\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mlen\u001b[39m(diff):\n\u001b[0;32m 119\u001b[0m \u001b[39mprint\u001b[39m(diff\u001b[39m.\u001b[39mpretty())\n\u001b[1;32m--> 120\u001b[0m \u001b[39mraise\u001b[39;00m DataValidationException(diff)\n\u001b[0;32m 121\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[0;32m 122\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39m'\u001b[39m\u001b[39mOK!\u001b[39m\u001b[39m'\u001b[39m)\n", - "\u001b[1;31mDataValidationException\u001b[0m: {'values_changed': {\"root[0]['len']\": {'new_value': 1000, 'old_value': 1797}}}" + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mDataValidationException\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[19], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m cde\u001b[39m.\u001b[39;49mMetaValidator(digits_ds, meta_fmt\u001b[39m=\u001b[39;49m\u001b[39m'\u001b[39;49m\u001b[39m.yml\u001b[39;49m\u001b[39m'\u001b[39;49m)\n", + "File \u001b[0;32m~/work/cascade/cascade/cascade/meta/meta_validator.py:105\u001b[0m, in \u001b[0;36mMetaValidator.__init__\u001b[0;34m(self, dataset, root, meta_fmt)\u001b[0m\n\u001b[1;32m 103\u001b[0m \u001b[39mif\u001b[39;00m os\u001b[39m.\u001b[39mpath\u001b[39m.\u001b[39mexists(name):\n\u001b[1;32m 104\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mbase_meta \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_load(name)\n\u001b[0;32m--> 105\u001b[0m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_check(meta)\n\u001b[1;32m 106\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[1;32m 107\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_save(meta, name)\n", + "File \u001b[0;32m~/work/cascade/cascade/cascade/meta/meta_validator.py:120\u001b[0m, in \u001b[0;36mMetaValidator._check\u001b[0;34m(self, query_meta)\u001b[0m\n\u001b[1;32m 118\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mlen\u001b[39m(diff):\n\u001b[1;32m 119\u001b[0m \u001b[39mprint\u001b[39m(diff\u001b[39m.\u001b[39mpretty())\n\u001b[0;32m--> 120\u001b[0m \u001b[39mraise\u001b[39;00m DataValidationException(diff)\n\u001b[1;32m 121\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[1;32m 122\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39m'\u001b[39m\u001b[39mOK!\u001b[39m\u001b[39m'\u001b[39m)\n", + "\u001b[0;31mDataValidationException\u001b[0m: {'values_changed': {\"root[0]['len']\": {'new_value': 1000, 'old_value': 1797}}}" ] } ], @@ -661,7 +661,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 20, "metadata": {}, "outputs": [], "source": [ @@ -672,7 +672,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 21, "metadata": {}, "outputs": [], "source": [ @@ -690,7 +690,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -713,7 +713,7 @@ "[150 rows x 4 columns]" ] }, - "execution_count": 21, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -735,7 +735,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ @@ -751,7 +751,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [ @@ -765,7 +765,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 25, "metadata": {}, "outputs": [ { @@ -781,7 +781,7 @@ "cascade.utils.pa_schema_validator.PaSchemaValidator" ] }, - "execution_count": 24, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } @@ -799,7 +799,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ @@ -808,7 +808,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 27, "metadata": {}, "outputs": [ { @@ -824,7 +824,7 @@ "cascade.utils.pa_schema_validator.PaSchemaValidator" ] }, - "execution_count": 26, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } @@ -842,7 +842,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 28, "metadata": {}, "outputs": [], "source": [ @@ -851,7 +851,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 29, "metadata": {}, "outputs": [ { @@ -859,29 +859,29 @@ "evalue": " failed element-wise validator 0:\n\nfailure cases:\n index failure_case\n0 0 -5.1\n1 1 -4.9\n2 2 -4.7\n3 3 -4.6\n4 4 -5.0\n.. ... ...\n145 145 -6.7\n146 146 -6.3\n147 147 -6.5\n148 148 -6.2\n149 149 -5.9\n\n[150 rows x 2 columns]", "output_type": "error", "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[1;31mSchemaError\u001b[0m Traceback (most recent call last)", - "File \u001b[1;32mC:\\cascade\\cascade\\utils\\pa_schema_validator.py:54\u001b[0m, in \u001b[0;36mPaSchemaValidator._validate\u001b[1;34m(ds, schema)\u001b[0m\n\u001b[0;32m 53\u001b[0m schema \u001b[39m=\u001b[39m paio\u001b[39m.\u001b[39mfrom_yaml(schema)\n\u001b[1;32m---> 54\u001b[0m schema\u001b[39m.\u001b[39;49mvalidate(ds\u001b[39m.\u001b[39;49m_table)\n\u001b[0;32m 55\u001b[0m \u001b[39mexcept\u001b[39;00m SchemaError \u001b[39mas\u001b[39;00m e:\n", - "File \u001b[1;32mc:\\Users\\илья\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\pandera\\schemas.py:534\u001b[0m, in \u001b[0;36mDataFrameSchema.validate\u001b[1;34m(self, check_obj, head, tail, sample, random_state, lazy, inplace)\u001b[0m\n\u001b[0;32m 532\u001b[0m \u001b[39mreturn\u001b[39;00m check_obj\u001b[39m.\u001b[39mpandera\u001b[39m.\u001b[39madd_schema(\u001b[39mself\u001b[39m)\n\u001b[1;32m--> 534\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_validate(\n\u001b[0;32m 535\u001b[0m check_obj\u001b[39m=\u001b[39;49mcheck_obj,\n\u001b[0;32m 536\u001b[0m head\u001b[39m=\u001b[39;49mhead,\n\u001b[0;32m 537\u001b[0m tail\u001b[39m=\u001b[39;49mtail,\n\u001b[0;32m 538\u001b[0m sample\u001b[39m=\u001b[39;49msample,\n\u001b[0;32m 539\u001b[0m random_state\u001b[39m=\u001b[39;49mrandom_state,\n\u001b[0;32m 540\u001b[0m lazy\u001b[39m=\u001b[39;49mlazy,\n\u001b[0;32m 541\u001b[0m inplace\u001b[39m=\u001b[39;49minplace,\n\u001b[0;32m 542\u001b[0m )\n", - "File \u001b[1;32mc:\\Users\\илья\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\pandera\\schemas.py:732\u001b[0m, in \u001b[0;36mDataFrameSchema._validate\u001b[1;34m(self, check_obj, head, tail, sample, random_state, lazy, inplace)\u001b[0m\n\u001b[0;32m 731\u001b[0m \u001b[39mexcept\u001b[39;00m errors\u001b[39m.\u001b[39mSchemaError \u001b[39mas\u001b[39;00m err:\n\u001b[1;32m--> 732\u001b[0m error_handler\u001b[39m.\u001b[39;49mcollect_error(\u001b[39m\"\u001b[39;49m\u001b[39mschema_component_check\u001b[39;49m\u001b[39m\"\u001b[39;49m, err)\n\u001b[0;32m 733\u001b[0m \u001b[39mexcept\u001b[39;00m errors\u001b[39m.\u001b[39mSchemaErrors \u001b[39mas\u001b[39;00m err:\n", - "File \u001b[1;32mc:\\Users\\илья\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\pandera\\error_handlers.py:32\u001b[0m, in \u001b[0;36mSchemaErrorHandler.collect_error\u001b[1;34m(self, reason_code, schema_error, original_exc)\u001b[0m\n\u001b[0;32m 31\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_lazy:\n\u001b[1;32m---> 32\u001b[0m \u001b[39mraise\u001b[39;00m schema_error \u001b[39mfrom\u001b[39;00m \u001b[39moriginal_exc\u001b[39;00m\n\u001b[0;32m 34\u001b[0m \u001b[39m# delete data of validated object from SchemaError object to prevent\u001b[39;00m\n\u001b[0;32m 35\u001b[0m \u001b[39m# storing copies of the validated DataFrame/Series for every\u001b[39;00m\n\u001b[0;32m 36\u001b[0m \u001b[39m# SchemaError collected.\u001b[39;00m\n", - "File \u001b[1;32mc:\\Users\\илья\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\pandera\\schemas.py:724\u001b[0m, in \u001b[0;36mDataFrameSchema._validate\u001b[1;34m(self, check_obj, head, tail, sample, random_state, lazy, inplace)\u001b[0m\n\u001b[0;32m 723\u001b[0m \u001b[39mtry\u001b[39;00m:\n\u001b[1;32m--> 724\u001b[0m result \u001b[39m=\u001b[39m schema_component(\n\u001b[0;32m 725\u001b[0m df_to_validate,\n\u001b[0;32m 726\u001b[0m lazy\u001b[39m=\u001b[39;49mlazy,\n\u001b[0;32m 727\u001b[0m \u001b[39m# don't make a copy of the data\u001b[39;49;00m\n\u001b[0;32m 728\u001b[0m inplace\u001b[39m=\u001b[39;49m\u001b[39mTrue\u001b[39;49;00m,\n\u001b[0;32m 729\u001b[0m )\n\u001b[0;32m 730\u001b[0m check_results\u001b[39m.\u001b[39mappend(check_utils\u001b[39m.\u001b[39mis_table(result))\n", - "File \u001b[1;32mc:\\Users\\илья\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\pandera\\schemas.py:2138\u001b[0m, in \u001b[0;36mSeriesSchemaBase.__call__\u001b[1;34m(self, check_obj, head, tail, sample, random_state, lazy, inplace)\u001b[0m\n\u001b[0;32m 2137\u001b[0m \u001b[39m\"\"\"Alias for ``validate`` method.\"\"\"\u001b[39;00m\n\u001b[1;32m-> 2138\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mvalidate(\n\u001b[0;32m 2139\u001b[0m check_obj, head, tail, sample, random_state, lazy, inplace\n\u001b[0;32m 2140\u001b[0m )\n", - "File \u001b[1;32mc:\\Users\\илья\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\pandera\\schema_components.py:223\u001b[0m, in \u001b[0;36mColumn.validate\u001b[1;34m(self, check_obj, head, tail, sample, random_state, lazy, inplace)\u001b[0m\n\u001b[0;32m 222\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[1;32m--> 223\u001b[0m validate_column(check_obj, column_name)\n\u001b[0;32m 225\u001b[0m \u001b[39mreturn\u001b[39;00m check_obj\n", - "File \u001b[1;32mc:\\Users\\илья\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\pandera\\schema_components.py:196\u001b[0m, in \u001b[0;36mColumn.validate..validate_column\u001b[1;34m(check_obj, column_name)\u001b[0m\n\u001b[0;32m 195\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mvalidate_column\u001b[39m(check_obj, column_name):\n\u001b[1;32m--> 196\u001b[0m \u001b[39msuper\u001b[39;49m(Column, copy(\u001b[39mself\u001b[39;49m)\u001b[39m.\u001b[39;49mset_name(column_name))\u001b[39m.\u001b[39;49mvalidate(\n\u001b[0;32m 197\u001b[0m check_obj,\n\u001b[0;32m 198\u001b[0m head,\n\u001b[0;32m 199\u001b[0m tail,\n\u001b[0;32m 200\u001b[0m sample,\n\u001b[0;32m 201\u001b[0m random_state,\n\u001b[0;32m 202\u001b[0m lazy,\n\u001b[0;32m 203\u001b[0m inplace\u001b[39m=\u001b[39;49minplace,\n\u001b[0;32m 204\u001b[0m )\n", - "File \u001b[1;32mc:\\Users\\илья\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\pandera\\schemas.py:2096\u001b[0m, in \u001b[0;36mSeriesSchemaBase.validate\u001b[1;34m(self, check_obj, head, tail, sample, random_state, lazy, inplace)\u001b[0m\n\u001b[0;32m 2095\u001b[0m \u001b[39mexcept\u001b[39;00m errors\u001b[39m.\u001b[39mSchemaError \u001b[39mas\u001b[39;00m err:\n\u001b[1;32m-> 2096\u001b[0m error_handler\u001b[39m.\u001b[39;49mcollect_error(\u001b[39m\"\u001b[39;49m\u001b[39mdataframe_check\u001b[39;49m\u001b[39m\"\u001b[39;49m, err)\n\u001b[0;32m 2097\u001b[0m \u001b[39mexcept\u001b[39;00m \u001b[39mException\u001b[39;00m \u001b[39mas\u001b[39;00m err: \u001b[39m# pylint: disable=broad-except\u001b[39;00m\n\u001b[0;32m 2098\u001b[0m \u001b[39m# catch other exceptions that may occur when executing the\u001b[39;00m\n\u001b[0;32m 2099\u001b[0m \u001b[39m# Check\u001b[39;00m\n", - "File \u001b[1;32mc:\\Users\\илья\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\pandera\\error_handlers.py:32\u001b[0m, in \u001b[0;36mSchemaErrorHandler.collect_error\u001b[1;34m(self, reason_code, schema_error, original_exc)\u001b[0m\n\u001b[0;32m 31\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_lazy:\n\u001b[1;32m---> 32\u001b[0m \u001b[39mraise\u001b[39;00m schema_error \u001b[39mfrom\u001b[39;00m \u001b[39moriginal_exc\u001b[39;00m\n\u001b[0;32m 34\u001b[0m \u001b[39m# delete data of validated object from SchemaError object to prevent\u001b[39;00m\n\u001b[0;32m 35\u001b[0m \u001b[39m# storing copies of the validated DataFrame/Series for every\u001b[39;00m\n\u001b[0;32m 36\u001b[0m \u001b[39m# SchemaError collected.\u001b[39;00m\n", - "File \u001b[1;32mc:\\Users\\илья\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\pandera\\schemas.py:2091\u001b[0m, in \u001b[0;36mSeriesSchemaBase.validate\u001b[1;34m(self, check_obj, head, tail, sample, random_state, lazy, inplace)\u001b[0m\n\u001b[0;32m 2089\u001b[0m \u001b[39mtry\u001b[39;00m:\n\u001b[0;32m 2090\u001b[0m check_results\u001b[39m.\u001b[39mappend(\n\u001b[1;32m-> 2091\u001b[0m _handle_check_results(\n\u001b[0;32m 2092\u001b[0m \u001b[39mself\u001b[39;49m, check_index, check, check_obj, \u001b[39m*\u001b[39;49mcheck_args\n\u001b[0;32m 2093\u001b[0m )\n\u001b[0;32m 2094\u001b[0m )\n\u001b[0;32m 2095\u001b[0m \u001b[39mexcept\u001b[39;00m errors\u001b[39m.\u001b[39mSchemaError \u001b[39mas\u001b[39;00m err:\n", - "File \u001b[1;32mc:\\Users\\илья\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\pandera\\schemas.py:2482\u001b[0m, in \u001b[0;36m_handle_check_results\u001b[1;34m(schema, check_index, check, check_obj, *check_args)\u001b[0m\n\u001b[0;32m 2481\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mTrue\u001b[39;00m\n\u001b[1;32m-> 2482\u001b[0m \u001b[39mraise\u001b[39;00m errors\u001b[39m.\u001b[39mSchemaError(\n\u001b[0;32m 2483\u001b[0m schema,\n\u001b[0;32m 2484\u001b[0m check_obj,\n\u001b[0;32m 2485\u001b[0m error_msg,\n\u001b[0;32m 2486\u001b[0m failure_cases\u001b[39m=\u001b[39mfailure_cases,\n\u001b[0;32m 2487\u001b[0m check\u001b[39m=\u001b[39mcheck,\n\u001b[0;32m 2488\u001b[0m check_index\u001b[39m=\u001b[39mcheck_index,\n\u001b[0;32m 2489\u001b[0m check_output\u001b[39m=\u001b[39mcheck_result\u001b[39m.\u001b[39mcheck_output,\n\u001b[0;32m 2490\u001b[0m )\n\u001b[0;32m 2491\u001b[0m \u001b[39mreturn\u001b[39;00m check_result\u001b[39m.\u001b[39mcheck_passed\n", - "\u001b[1;31mSchemaError\u001b[0m: failed element-wise validator 0:\n\nfailure cases:\n index failure_case\n0 0 -5.1\n1 1 -4.9\n2 2 -4.7\n3 3 -4.6\n4 4 -5.0\n.. ... ...\n145 145 -6.7\n146 146 -6.3\n147 147 -6.5\n148 148 -6.2\n149 149 -5.9\n\n[150 rows x 2 columns]", + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mSchemaError\u001b[0m Traceback (most recent call last)", + "File \u001b[0;32m~/work/cascade/cascade/cascade/utils/pa_schema_validator.py:54\u001b[0m, in \u001b[0;36mPaSchemaValidator._validate\u001b[0;34m(ds, schema)\u001b[0m\n\u001b[1;32m 53\u001b[0m schema \u001b[39m=\u001b[39m paio\u001b[39m.\u001b[39mfrom_yaml(schema)\n\u001b[0;32m---> 54\u001b[0m schema\u001b[39m.\u001b[39;49mvalidate(ds\u001b[39m.\u001b[39;49m_table)\n\u001b[1;32m 55\u001b[0m \u001b[39mexcept\u001b[39;00m SchemaError \u001b[39mas\u001b[39;00m e:\n", + "File \u001b[0;32m~/work/cascade/cascade_full_env/lib/python3.10/site-packages/pandera/schemas.py:534\u001b[0m, in \u001b[0;36mDataFrameSchema.validate\u001b[0;34m(self, check_obj, head, tail, sample, random_state, lazy, inplace)\u001b[0m\n\u001b[1;32m 532\u001b[0m \u001b[39mreturn\u001b[39;00m check_obj\u001b[39m.\u001b[39mpandera\u001b[39m.\u001b[39madd_schema(\u001b[39mself\u001b[39m)\n\u001b[0;32m--> 534\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_validate(\n\u001b[1;32m 535\u001b[0m check_obj\u001b[39m=\u001b[39;49mcheck_obj,\n\u001b[1;32m 536\u001b[0m head\u001b[39m=\u001b[39;49mhead,\n\u001b[1;32m 537\u001b[0m tail\u001b[39m=\u001b[39;49mtail,\n\u001b[1;32m 538\u001b[0m sample\u001b[39m=\u001b[39;49msample,\n\u001b[1;32m 539\u001b[0m random_state\u001b[39m=\u001b[39;49mrandom_state,\n\u001b[1;32m 540\u001b[0m lazy\u001b[39m=\u001b[39;49mlazy,\n\u001b[1;32m 541\u001b[0m inplace\u001b[39m=\u001b[39;49minplace,\n\u001b[1;32m 542\u001b[0m )\n", + "File \u001b[0;32m~/work/cascade/cascade_full_env/lib/python3.10/site-packages/pandera/schemas.py:732\u001b[0m, in \u001b[0;36mDataFrameSchema._validate\u001b[0;34m(self, check_obj, head, tail, sample, random_state, lazy, inplace)\u001b[0m\n\u001b[1;32m 731\u001b[0m \u001b[39mexcept\u001b[39;00m errors\u001b[39m.\u001b[39mSchemaError \u001b[39mas\u001b[39;00m err:\n\u001b[0;32m--> 732\u001b[0m error_handler\u001b[39m.\u001b[39;49mcollect_error(\u001b[39m\"\u001b[39;49m\u001b[39mschema_component_check\u001b[39;49m\u001b[39m\"\u001b[39;49m, err)\n\u001b[1;32m 733\u001b[0m \u001b[39mexcept\u001b[39;00m errors\u001b[39m.\u001b[39mSchemaErrors \u001b[39mas\u001b[39;00m err:\n", + "File \u001b[0;32m~/work/cascade/cascade_full_env/lib/python3.10/site-packages/pandera/error_handlers.py:32\u001b[0m, in \u001b[0;36mSchemaErrorHandler.collect_error\u001b[0;34m(self, reason_code, schema_error, original_exc)\u001b[0m\n\u001b[1;32m 31\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_lazy:\n\u001b[0;32m---> 32\u001b[0m \u001b[39mraise\u001b[39;00m schema_error \u001b[39mfrom\u001b[39;00m \u001b[39moriginal_exc\u001b[39;00m\n\u001b[1;32m 34\u001b[0m \u001b[39m# delete data of validated object from SchemaError object to prevent\u001b[39;00m\n\u001b[1;32m 35\u001b[0m \u001b[39m# storing copies of the validated DataFrame/Series for every\u001b[39;00m\n\u001b[1;32m 36\u001b[0m \u001b[39m# SchemaError collected.\u001b[39;00m\n", + "File \u001b[0;32m~/work/cascade/cascade_full_env/lib/python3.10/site-packages/pandera/schemas.py:724\u001b[0m, in \u001b[0;36mDataFrameSchema._validate\u001b[0;34m(self, check_obj, head, tail, sample, random_state, lazy, inplace)\u001b[0m\n\u001b[1;32m 723\u001b[0m \u001b[39mtry\u001b[39;00m:\n\u001b[0;32m--> 724\u001b[0m result \u001b[39m=\u001b[39m schema_component(\n\u001b[1;32m 725\u001b[0m df_to_validate,\n\u001b[1;32m 726\u001b[0m lazy\u001b[39m=\u001b[39;49mlazy,\n\u001b[1;32m 727\u001b[0m \u001b[39m# don't make a copy of the data\u001b[39;49;00m\n\u001b[1;32m 728\u001b[0m inplace\u001b[39m=\u001b[39;49m\u001b[39mTrue\u001b[39;49;00m,\n\u001b[1;32m 729\u001b[0m )\n\u001b[1;32m 730\u001b[0m check_results\u001b[39m.\u001b[39mappend(check_utils\u001b[39m.\u001b[39mis_table(result))\n", + "File \u001b[0;32m~/work/cascade/cascade_full_env/lib/python3.10/site-packages/pandera/schemas.py:2138\u001b[0m, in \u001b[0;36mSeriesSchemaBase.__call__\u001b[0;34m(self, check_obj, head, tail, sample, random_state, lazy, inplace)\u001b[0m\n\u001b[1;32m 2137\u001b[0m \u001b[39m\u001b[39m\u001b[39m\"\"\"Alias for ``validate`` method.\"\"\"\u001b[39;00m\n\u001b[0;32m-> 2138\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mvalidate(\n\u001b[1;32m 2139\u001b[0m check_obj, head, tail, sample, random_state, lazy, inplace\n\u001b[1;32m 2140\u001b[0m )\n", + "File \u001b[0;32m~/work/cascade/cascade_full_env/lib/python3.10/site-packages/pandera/schema_components.py:223\u001b[0m, in \u001b[0;36mColumn.validate\u001b[0;34m(self, check_obj, head, tail, sample, random_state, lazy, inplace)\u001b[0m\n\u001b[1;32m 222\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[0;32m--> 223\u001b[0m validate_column(check_obj, column_name)\n\u001b[1;32m 225\u001b[0m \u001b[39mreturn\u001b[39;00m check_obj\n", + "File \u001b[0;32m~/work/cascade/cascade_full_env/lib/python3.10/site-packages/pandera/schema_components.py:196\u001b[0m, in \u001b[0;36mColumn.validate..validate_column\u001b[0;34m(check_obj, column_name)\u001b[0m\n\u001b[1;32m 195\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mvalidate_column\u001b[39m(check_obj, column_name):\n\u001b[0;32m--> 196\u001b[0m \u001b[39msuper\u001b[39;49m(Column, copy(\u001b[39mself\u001b[39;49m)\u001b[39m.\u001b[39;49mset_name(column_name))\u001b[39m.\u001b[39;49mvalidate(\n\u001b[1;32m 197\u001b[0m check_obj,\n\u001b[1;32m 198\u001b[0m head,\n\u001b[1;32m 199\u001b[0m tail,\n\u001b[1;32m 200\u001b[0m sample,\n\u001b[1;32m 201\u001b[0m random_state,\n\u001b[1;32m 202\u001b[0m lazy,\n\u001b[1;32m 203\u001b[0m inplace\u001b[39m=\u001b[39;49minplace,\n\u001b[1;32m 204\u001b[0m )\n", + "File \u001b[0;32m~/work/cascade/cascade_full_env/lib/python3.10/site-packages/pandera/schemas.py:2096\u001b[0m, in \u001b[0;36mSeriesSchemaBase.validate\u001b[0;34m(self, check_obj, head, tail, sample, random_state, lazy, inplace)\u001b[0m\n\u001b[1;32m 2095\u001b[0m \u001b[39mexcept\u001b[39;00m errors\u001b[39m.\u001b[39mSchemaError \u001b[39mas\u001b[39;00m err:\n\u001b[0;32m-> 2096\u001b[0m error_handler\u001b[39m.\u001b[39;49mcollect_error(\u001b[39m\"\u001b[39;49m\u001b[39mdataframe_check\u001b[39;49m\u001b[39m\"\u001b[39;49m, err)\n\u001b[1;32m 2097\u001b[0m \u001b[39mexcept\u001b[39;00m \u001b[39mException\u001b[39;00m \u001b[39mas\u001b[39;00m err: \u001b[39m# pylint: disable=broad-except\u001b[39;00m\n\u001b[1;32m 2098\u001b[0m \u001b[39m# catch other exceptions that may occur when executing the\u001b[39;00m\n\u001b[1;32m 2099\u001b[0m \u001b[39m# Check\u001b[39;00m\n", + "File \u001b[0;32m~/work/cascade/cascade_full_env/lib/python3.10/site-packages/pandera/error_handlers.py:32\u001b[0m, in \u001b[0;36mSchemaErrorHandler.collect_error\u001b[0;34m(self, reason_code, schema_error, original_exc)\u001b[0m\n\u001b[1;32m 31\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_lazy:\n\u001b[0;32m---> 32\u001b[0m \u001b[39mraise\u001b[39;00m schema_error \u001b[39mfrom\u001b[39;00m \u001b[39moriginal_exc\u001b[39;00m\n\u001b[1;32m 34\u001b[0m \u001b[39m# delete data of validated object from SchemaError object to prevent\u001b[39;00m\n\u001b[1;32m 35\u001b[0m \u001b[39m# storing copies of the validated DataFrame/Series for every\u001b[39;00m\n\u001b[1;32m 36\u001b[0m \u001b[39m# SchemaError collected.\u001b[39;00m\n", + "File \u001b[0;32m~/work/cascade/cascade_full_env/lib/python3.10/site-packages/pandera/schemas.py:2091\u001b[0m, in \u001b[0;36mSeriesSchemaBase.validate\u001b[0;34m(self, check_obj, head, tail, sample, random_state, lazy, inplace)\u001b[0m\n\u001b[1;32m 2089\u001b[0m \u001b[39mtry\u001b[39;00m:\n\u001b[1;32m 2090\u001b[0m check_results\u001b[39m.\u001b[39mappend(\n\u001b[0;32m-> 2091\u001b[0m _handle_check_results(\n\u001b[1;32m 2092\u001b[0m \u001b[39mself\u001b[39;49m, check_index, check, check_obj, \u001b[39m*\u001b[39;49mcheck_args\n\u001b[1;32m 2093\u001b[0m )\n\u001b[1;32m 2094\u001b[0m )\n\u001b[1;32m 2095\u001b[0m \u001b[39mexcept\u001b[39;00m errors\u001b[39m.\u001b[39mSchemaError \u001b[39mas\u001b[39;00m err:\n", + "File \u001b[0;32m~/work/cascade/cascade_full_env/lib/python3.10/site-packages/pandera/schemas.py:2482\u001b[0m, in \u001b[0;36m_handle_check_results\u001b[0;34m(schema, check_index, check, check_obj, *check_args)\u001b[0m\n\u001b[1;32m 2481\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mTrue\u001b[39;00m\n\u001b[0;32m-> 2482\u001b[0m \u001b[39mraise\u001b[39;00m errors\u001b[39m.\u001b[39mSchemaError(\n\u001b[1;32m 2483\u001b[0m schema,\n\u001b[1;32m 2484\u001b[0m check_obj,\n\u001b[1;32m 2485\u001b[0m error_msg,\n\u001b[1;32m 2486\u001b[0m failure_cases\u001b[39m=\u001b[39mfailure_cases,\n\u001b[1;32m 2487\u001b[0m check\u001b[39m=\u001b[39mcheck,\n\u001b[1;32m 2488\u001b[0m check_index\u001b[39m=\u001b[39mcheck_index,\n\u001b[1;32m 2489\u001b[0m check_output\u001b[39m=\u001b[39mcheck_result\u001b[39m.\u001b[39mcheck_output,\n\u001b[1;32m 2490\u001b[0m )\n\u001b[1;32m 2491\u001b[0m \u001b[39mreturn\u001b[39;00m check_result\u001b[39m.\u001b[39mcheck_passed\n", + "\u001b[0;31mSchemaError\u001b[0m: failed element-wise validator 0:\n\nfailure cases:\n index failure_case\n0 0 -5.1\n1 1 -4.9\n2 2 -4.7\n3 3 -4.6\n4 4 -5.0\n.. ... ...\n145 145 -6.7\n146 146 -6.3\n147 147 -6.5\n148 148 -6.2\n149 149 -5.9\n\n[150 rows x 2 columns]", "\nDuring handling of the above exception, another exception occurred:\n", - "\u001b[1;31mDataValidationException\u001b[0m Traceback (most recent call last)", - "\u001b[1;32mc:\\cascade\\cascade\\docs\\source\\examples\\data_validation.ipynb Cell 57\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[0m PaSchemaValidator(iris_ds, \u001b[39m'\u001b[39;49m\u001b[39m./iris_schema.yml\u001b[39;49m\u001b[39m'\u001b[39;49m)\n", - "File \u001b[1;32mC:\\cascade\\cascade\\utils\\pa_schema_validator.py:47\u001b[0m, in \u001b[0;36mPaSchemaValidator.__init__\u001b[1;34m(self, dataset, schema, *args, **kwargs)\u001b[0m\n\u001b[0;32m 32\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39m__init__\u001b[39m(\u001b[39mself\u001b[39m, dataset: TableDataset, schema, \u001b[39m*\u001b[39margs: Any, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs: Any) \u001b[39m-\u001b[39m\u001b[39m>\u001b[39m \u001b[39mNone\u001b[39;00m:\n\u001b[0;32m 33\u001b[0m \u001b[39m\"\"\"\u001b[39;00m\n\u001b[0;32m 34\u001b[0m \u001b[39m Parameters\u001b[39;00m\n\u001b[0;32m 35\u001b[0m \u001b[39m ----------\u001b[39;00m\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 45\u001b[0m \u001b[39m DataValidationException\u001b[39;00m\n\u001b[0;32m 46\u001b[0m \u001b[39m \"\"\"\u001b[39;00m\n\u001b[1;32m---> 47\u001b[0m \u001b[39msuper\u001b[39m()\u001b[39m.\u001b[39m\u001b[39m__init__\u001b[39m(dataset, \u001b[39m*\u001b[39margs, func\u001b[39m=\u001b[39m\u001b[39mlambda\u001b[39;00m x: \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_validate(x, schema), \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs)\n", - "File \u001b[1;32mC:\\cascade\\cascade\\meta\\validator.py:63\u001b[0m, in \u001b[0;36mAggregateValidator.__init__\u001b[1;34m(self, dataset, func, **kwargs)\u001b[0m\n\u001b[0;32m 61\u001b[0m bad_results \u001b[39m=\u001b[39m []\n\u001b[0;32m 62\u001b[0m \u001b[39mfor\u001b[39;00m i, func \u001b[39min\u001b[39;00m \u001b[39menumerate\u001b[39m(\u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_func):\n\u001b[1;32m---> 63\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m func(\u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_dataset):\n\u001b[0;32m 64\u001b[0m bad_results\u001b[39m.\u001b[39mappend(i)\n\u001b[0;32m 66\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mlen\u001b[39m(bad_results):\n", - "File \u001b[1;32mC:\\cascade\\cascade\\utils\\pa_schema_validator.py:47\u001b[0m, in \u001b[0;36mPaSchemaValidator.__init__..\u001b[1;34m(x)\u001b[0m\n\u001b[0;32m 32\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39m__init__\u001b[39m(\u001b[39mself\u001b[39m, dataset: TableDataset, schema, \u001b[39m*\u001b[39margs: Any, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs: Any) \u001b[39m-\u001b[39m\u001b[39m>\u001b[39m \u001b[39mNone\u001b[39;00m:\n\u001b[0;32m 33\u001b[0m \u001b[39m\"\"\"\u001b[39;00m\n\u001b[0;32m 34\u001b[0m \u001b[39m Parameters\u001b[39;00m\n\u001b[0;32m 35\u001b[0m \u001b[39m ----------\u001b[39;00m\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 45\u001b[0m \u001b[39m DataValidationException\u001b[39;00m\n\u001b[0;32m 46\u001b[0m \u001b[39m \"\"\"\u001b[39;00m\n\u001b[1;32m---> 47\u001b[0m \u001b[39msuper\u001b[39m()\u001b[39m.\u001b[39m\u001b[39m__init__\u001b[39m(dataset, \u001b[39m*\u001b[39margs, func\u001b[39m=\u001b[39m\u001b[39mlambda\u001b[39;00m x: \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_validate(x, schema), \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs)\n", - "File \u001b[1;32mC:\\cascade\\cascade\\utils\\pa_schema_validator.py:56\u001b[0m, in \u001b[0;36mPaSchemaValidator._validate\u001b[1;34m(ds, schema)\u001b[0m\n\u001b[0;32m 54\u001b[0m schema\u001b[39m.\u001b[39mvalidate(ds\u001b[39m.\u001b[39m_table)\n\u001b[0;32m 55\u001b[0m \u001b[39mexcept\u001b[39;00m SchemaError \u001b[39mas\u001b[39;00m e:\n\u001b[1;32m---> 56\u001b[0m \u001b[39mraise\u001b[39;00m DataValidationException(e)\n\u001b[0;32m 57\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[0;32m 58\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mTrue\u001b[39;00m\n", - "\u001b[1;31mDataValidationException\u001b[0m: failed element-wise validator 0:\n\nfailure cases:\n index failure_case\n0 0 -5.1\n1 1 -4.9\n2 2 -4.7\n3 3 -4.6\n4 4 -5.0\n.. ... ...\n145 145 -6.7\n146 146 -6.3\n147 147 -6.5\n148 148 -6.2\n149 149 -5.9\n\n[150 rows x 2 columns]" + "\u001b[0;31mDataValidationException\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[29], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m PaSchemaValidator(iris_ds, \u001b[39m'\u001b[39;49m\u001b[39m./iris_schema.yml\u001b[39;49m\u001b[39m'\u001b[39;49m)\n", + "File \u001b[0;32m~/work/cascade/cascade/cascade/utils/pa_schema_validator.py:47\u001b[0m, in \u001b[0;36mPaSchemaValidator.__init__\u001b[0;34m(self, dataset, schema, *args, **kwargs)\u001b[0m\n\u001b[1;32m 32\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39m__init__\u001b[39m(\u001b[39mself\u001b[39m, dataset: TableDataset, schema, \u001b[39m*\u001b[39margs: Any, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs: Any) \u001b[39m-\u001b[39m\u001b[39m>\u001b[39m \u001b[39mNone\u001b[39;00m:\n\u001b[1;32m 33\u001b[0m \u001b[39m \u001b[39m\u001b[39m\"\"\"\u001b[39;00m\n\u001b[1;32m 34\u001b[0m \u001b[39m Parameters\u001b[39;00m\n\u001b[1;32m 35\u001b[0m \u001b[39m ----------\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 45\u001b[0m \u001b[39m DataValidationException\u001b[39;00m\n\u001b[1;32m 46\u001b[0m \u001b[39m \"\"\"\u001b[39;00m\n\u001b[0;32m---> 47\u001b[0m \u001b[39msuper\u001b[39;49m()\u001b[39m.\u001b[39;49m\u001b[39m__init__\u001b[39;49m(dataset, \u001b[39m*\u001b[39;49margs, func\u001b[39m=\u001b[39;49m\u001b[39mlambda\u001b[39;49;00m x: \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_validate(x, schema), \u001b[39m*\u001b[39;49m\u001b[39m*\u001b[39;49mkwargs)\n", + "File \u001b[0;32m~/work/cascade/cascade/cascade/meta/validator.py:63\u001b[0m, in \u001b[0;36mAggregateValidator.__init__\u001b[0;34m(self, dataset, func, **kwargs)\u001b[0m\n\u001b[1;32m 61\u001b[0m bad_results \u001b[39m=\u001b[39m []\n\u001b[1;32m 62\u001b[0m \u001b[39mfor\u001b[39;00m i, func \u001b[39min\u001b[39;00m \u001b[39menumerate\u001b[39m(\u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_func):\n\u001b[0;32m---> 63\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m func(\u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_dataset):\n\u001b[1;32m 64\u001b[0m bad_results\u001b[39m.\u001b[39mappend(i)\n\u001b[1;32m 66\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mlen\u001b[39m(bad_results):\n", + "File \u001b[0;32m~/work/cascade/cascade/cascade/utils/pa_schema_validator.py:47\u001b[0m, in \u001b[0;36mPaSchemaValidator.__init__..\u001b[0;34m(x)\u001b[0m\n\u001b[1;32m 32\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39m__init__\u001b[39m(\u001b[39mself\u001b[39m, dataset: TableDataset, schema, \u001b[39m*\u001b[39margs: Any, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs: Any) \u001b[39m-\u001b[39m\u001b[39m>\u001b[39m \u001b[39mNone\u001b[39;00m:\n\u001b[1;32m 33\u001b[0m \u001b[39m \u001b[39m\u001b[39m\"\"\"\u001b[39;00m\n\u001b[1;32m 34\u001b[0m \u001b[39m Parameters\u001b[39;00m\n\u001b[1;32m 35\u001b[0m \u001b[39m ----------\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 45\u001b[0m \u001b[39m DataValidationException\u001b[39;00m\n\u001b[1;32m 46\u001b[0m \u001b[39m \"\"\"\u001b[39;00m\n\u001b[0;32m---> 47\u001b[0m \u001b[39msuper\u001b[39m()\u001b[39m.\u001b[39m\u001b[39m__init__\u001b[39m(dataset, \u001b[39m*\u001b[39margs, func\u001b[39m=\u001b[39m\u001b[39mlambda\u001b[39;00m x: \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_validate(x, schema), \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs)\n", + "File \u001b[0;32m~/work/cascade/cascade/cascade/utils/pa_schema_validator.py:56\u001b[0m, in \u001b[0;36mPaSchemaValidator._validate\u001b[0;34m(ds, schema)\u001b[0m\n\u001b[1;32m 54\u001b[0m schema\u001b[39m.\u001b[39mvalidate(ds\u001b[39m.\u001b[39m_table)\n\u001b[1;32m 55\u001b[0m \u001b[39mexcept\u001b[39;00m SchemaError \u001b[39mas\u001b[39;00m e:\n\u001b[0;32m---> 56\u001b[0m \u001b[39mraise\u001b[39;00m DataValidationException(e)\n\u001b[1;32m 57\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[1;32m 58\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mTrue\u001b[39;00m\n", + "\u001b[0;31mDataValidationException\u001b[0m: failed element-wise validator 0:\n\nfailure cases:\n index failure_case\n0 0 -5.1\n1 1 -4.9\n2 2 -4.7\n3 3 -4.6\n4 4 -5.0\n.. ... ...\n145 145 -6.7\n146 146 -6.3\n147 147 -6.5\n148 148 -6.2\n149 149 -5.9\n\n[150 rows x 2 columns]" ] } ], @@ -930,7 +930,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.4" + "version": "3.10.6" }, "orig_nbformat": 4, "vscode": { diff --git a/cascade/docs/source/examples/dataset_zoo.ipynb b/cascade/docs/source/examples/dataset_zoo.ipynb index ee577b6c..5d7d860f 100644 --- a/cascade/docs/source/examples/dataset_zoo.ipynb +++ b/cascade/docs/source/examples/dataset_zoo.ipynb @@ -21,7 +21,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "0.10.0\n" + "0.11.0\n" ] } ], @@ -566,7 +566,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 10/10 [00:00<00:00, 169125.16it/s]" + "100%|██████████| 10/10 [00:00<00:00, 156503.88it/s]" ] }, { @@ -795,7 +795,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 4/4 [00:00<00:00, 131072.00it/s]" + "100%|██████████| 4/4 [00:00<00:00, 127100.12it/s]" ] }, { @@ -848,7 +848,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 4/4 [00:00<00:00, 52103.16it/s]" + "100%|██████████| 4/4 [00:00<00:00, 122461.43it/s]" ] }, { @@ -910,7 +910,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 4/4 [00:00<00:00, 101067.57it/s]" + "100%|██████████| 4/4 [00:00<00:00, 110376.42it/s]" ] }, { @@ -1367,7 +1367,7 @@ { "data": { "text/plain": [ - "[]" + "[]" ] }, "execution_count": 35, @@ -1717,7 +1717,7 @@ { "data": { "text/plain": [ - "cascade.utils.table_dataset.TableDataset\n", + "cascade.utils.tables.TableDataset\n", " 0 1\n", "0 2 0\n", "1 1 0\n", @@ -1752,7 +1752,7 @@ { "data": { "text/plain": [ - "[{'name': 'cascade.utils.table_dataset.TableDataset\\n 0 1\\n0 2 0\\n1 1 0\\n2 1 0',\n", + "[{'name': 'cascade.utils.tables.TableDataset\\n 0 1\\n0 2 0\\n1 1 0\\n2 1 0',\n", " 'type': 'dataset',\n", " 'columns': [0, 1],\n", " 'len': 3,\n", @@ -1817,7 +1817,7 @@ { "data": { "text/plain": [ - "[{'name': 'cascade.utils.table_dataset.TableFilter\\n 0 1\\n1 1 0\\n2 1 0',\n", + "[{'name': 'cascade.utils.tables.TableFilter\\n 0 1\\n1 1 0\\n2 1 0',\n", " 'type': 'dataset',\n", " 'len': 2,\n", " 'columns': [0, 1],\n", @@ -1837,7 +1837,7 @@ " '50%': 0.0,\n", " '75%': 0.0,\n", " 'max': 0.0}}},\n", - " {'name': 'cascade.utils.table_dataset.TableDataset\\n 0 1\\n0 2 0\\n1 1 0\\n2 1 0',\n", + " {'name': 'cascade.utils.tables.TableDataset\\n 0 1\\n0 2 0\\n1 1 0\\n2 1 0',\n", " 'type': 'dataset',\n", " 'columns': [0, 1],\n", " 'len': 3,\n", @@ -1893,7 +1893,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.4" + "version": "3.10.6" }, "orig_nbformat": 4, "vscode": { diff --git a/cascade/docs/source/examples/model_training.ipynb b/cascade/docs/source/examples/model_training.ipynb index a6a1762a..8adc22ca 100644 --- a/cascade/docs/source/examples/model_training.ipynb +++ b/cascade/docs/source/examples/model_training.ipynb @@ -48,7 +48,7 @@ { "data": { "text/plain": [ - "'0.10.0'" + "'0.11.0'" ] }, "execution_count": 3, @@ -250,30 +250,30 @@ "name": "stdout", "output_type": "stream", "text": [ - "Epochs [0/2], Step[0/6000], Loss: 2.3479\n", - "Epochs [0/2], Step[500/6000], Loss: 0.3280\n", - "Epochs [0/2], Step[1000/6000], Loss: 0.0672\n", - "Epochs [0/2], Step[1500/6000], Loss: 0.2628\n", - "Epochs [0/2], Step[2000/6000], Loss: 0.0326\n", - "Epochs [0/2], Step[2500/6000], Loss: 0.0659\n", - "Epochs [0/2], Step[3000/6000], Loss: 0.4636\n", - "Epochs [0/2], Step[3500/6000], Loss: 0.5428\n", - "Epochs [0/2], Step[4000/6000], Loss: 0.0201\n", - "Epochs [0/2], Step[4500/6000], Loss: 0.6801\n", - "Epochs [0/2], Step[5000/6000], Loss: 0.2029\n", - "Epochs [0/2], Step[5500/6000], Loss: 0.3559\n", - "Epochs [1/2], Step[0/6000], Loss: 0.0673\n", - "Epochs [1/2], Step[500/6000], Loss: 0.1033\n", - "Epochs [1/2], Step[1000/6000], Loss: 0.0543\n", - "Epochs [1/2], Step[1500/6000], Loss: 0.0273\n", - "Epochs [1/2], Step[2000/6000], Loss: 0.3100\n", - "Epochs [1/2], Step[2500/6000], Loss: 0.1334\n", - "Epochs [1/2], Step[3000/6000], Loss: 0.0302\n", - "Epochs [1/2], Step[3500/6000], Loss: 0.6858\n", - "Epochs [1/2], Step[4000/6000], Loss: 0.0373\n", - "Epochs [1/2], Step[4500/6000], Loss: 0.0214\n", - "Epochs [1/2], Step[5000/6000], Loss: 0.6246\n", - "Epochs [1/2], Step[5500/6000], Loss: 0.0711\n" + "Epochs [0/2], Step[0/6000], Loss: 2.2882\n", + "Epochs [0/2], Step[500/6000], Loss: 0.2035\n", + "Epochs [0/2], Step[1000/6000], Loss: 0.1861\n", + "Epochs [0/2], Step[1500/6000], Loss: 0.1017\n", + "Epochs [0/2], Step[2000/6000], Loss: 0.0299\n", + "Epochs [0/2], Step[2500/6000], Loss: 0.1679\n", + "Epochs [0/2], Step[3000/6000], Loss: 0.1145\n", + "Epochs [0/2], Step[3500/6000], Loss: 0.3394\n", + "Epochs [0/2], Step[4000/6000], Loss: 0.0469\n", + "Epochs [0/2], Step[4500/6000], Loss: 0.4207\n", + "Epochs [0/2], Step[5000/6000], Loss: 0.0567\n", + "Epochs [0/2], Step[5500/6000], Loss: 0.0588\n", + "Epochs [1/2], Step[0/6000], Loss: 0.0061\n", + "Epochs [1/2], Step[500/6000], Loss: 0.0771\n", + "Epochs [1/2], Step[1000/6000], Loss: 0.2818\n", + "Epochs [1/2], Step[1500/6000], Loss: 0.0103\n", + "Epochs [1/2], Step[2000/6000], Loss: 0.0192\n", + "Epochs [1/2], Step[2500/6000], Loss: 0.0581\n", + "Epochs [1/2], Step[3000/6000], Loss: 0.0099\n", + "Epochs [1/2], Step[3500/6000], Loss: 0.3593\n", + "Epochs [1/2], Step[4000/6000], Loss: 0.0243\n", + "Epochs [1/2], Step[4500/6000], Loss: 0.0457\n", + "Epochs [1/2], Step[5000/6000], Loss: 0.2853\n", + "Epochs [1/2], Step[5500/6000], Loss: 0.2131\n" ] } ], @@ -315,7 +315,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 1000/1000 [00:01<00:00, 915.46it/s]\n" + "100%|██████████| 1000/1000 [00:01<00:00, 947.19it/s]\n" ] } ], @@ -339,9 +339,9 @@ { "data": { "text/plain": [ - "[{'name': '<__main__.Classifier object at 0x7f8ea2b61b10>',\n", - " 'created_at': DateTime(2023, 3, 1, 21, 17, 42, 489049, tzinfo=Timezone('UTC')),\n", - " 'metrics': {'acc': 0.968},\n", + "[{'name': '<__main__.Classifier object at 0x7f2ed659f9d0>',\n", + " 'created_at': DateTime(2023, 3, 30, 7, 47, 30, 238184, tzinfo=Timezone('UTC')),\n", + " 'metrics': {'acc': 0.9618},\n", " 'params': {'input_size': 784,\n", " 'hidden_size': 100,\n", " 'num_classes': 10,\n", @@ -437,7 +437,7 @@ { "data": { "text/plain": [ - "[{'name': '<__main__.Classifier object at 0x7f8ea2b61b10>',\n", + "[{'name': '<__main__.Classifier object at 0x7f2ed659f9d0>',\n", " 'train_data': [{'name': '__main__.NoiseModifier',\n", " 'type': 'dataset',\n", " 'len': 60000},\n", @@ -446,8 +446,8 @@ " 'type': 'dataset',\n", " 'len': 60000,\n", " 'obj_type': \"\"}],\n", - " 'created_at': DateTime(2023, 3, 1, 21, 17, 42, 489049, tzinfo=Timezone('UTC')),\n", - " 'metrics': {'acc': 0.968},\n", + " 'created_at': DateTime(2023, 3, 30, 7, 47, 30, 238184, tzinfo=Timezone('UTC')),\n", + " 'metrics': {'acc': 0.9618},\n", " 'params': {'input_size': 784,\n", " 'hidden_size': 100,\n", " 'num_classes': 10,\n", @@ -546,9 +546,9 @@ " 0\n", " ./repo/linear_nn\n", " 0\n", - " 2023-03-01 21:17:42.489049+00:00\n", - " 21 seconds after\n", - " 0.968\n", + " 2023-03-30 07:47:30.238184+00:00\n", + " 20 seconds after\n", + " 0.9618\n", " 784\n", " 100\n", " 10\n", @@ -562,10 +562,10 @@ ], "text/plain": [ " line num created_at saved \\\n", - "0 ./repo/linear_nn 0 2023-03-01 21:17:42.489049+00:00 21 seconds after \n", + "0 ./repo/linear_nn 0 2023-03-30 07:47:30.238184+00:00 20 seconds after \n", "\n", - " acc input_size hidden_size num_classes num_epochs lr bs \n", - "0 0.968 784 100 10 2 0.001 10 " + " acc input_size hidden_size num_classes num_epochs lr bs \n", + "0 0.9618 784 100 10 2 0.001 10 " ] }, "execution_count": 16, @@ -622,111 +622,111 @@ "name": "stdout", "output_type": "stream", "text": [ - "Epochs [0/2], Step[0/6000], Loss: 2.4030\n", - "Epochs [0/2], Step[500/6000], Loss: 0.9184\n", - "Epochs [0/2], Step[1000/6000], Loss: 0.8407\n", - "Epochs [0/2], Step[1500/6000], Loss: 0.1700\n", - "Epochs [0/2], Step[2000/6000], Loss: 1.1738\n", - "Epochs [0/2], Step[2500/6000], Loss: 0.3082\n", - "Epochs [0/2], Step[3000/6000], Loss: 0.6153\n", - "Epochs [0/2], Step[3500/6000], Loss: 0.3778\n", - "Epochs [0/2], Step[4000/6000], Loss: 0.3321\n", - "Epochs [0/2], Step[4500/6000], Loss: 0.3514\n", - "Epochs [0/2], Step[5000/6000], Loss: 0.3847\n", - "Epochs [0/2], Step[5500/6000], Loss: 0.2998\n", - "Epochs [1/2], Step[0/6000], Loss: 0.3461\n", - "Epochs [1/2], Step[500/6000], Loss: 0.6578\n", - "Epochs [1/2], Step[1000/6000], Loss: 0.1339\n", - "Epochs [1/2], Step[1500/6000], Loss: 0.1148\n", - "Epochs [1/2], Step[2000/6000], Loss: 0.5948\n", - "Epochs [1/2], Step[2500/6000], Loss: 0.4984\n", - "Epochs [1/2], Step[3000/6000], Loss: 0.1020\n", - "Epochs [1/2], Step[3500/6000], Loss: 0.2406\n", - "Epochs [1/2], Step[4000/6000], Loss: 0.4933\n", - "Epochs [1/2], Step[4500/6000], Loss: 0.8582\n", - "Epochs [1/2], Step[5000/6000], Loss: 0.0959\n", - "Epochs [1/2], Step[5500/6000], Loss: 1.0599\n" + "Epochs [0/2], Step[0/6000], Loss: 2.2779\n", + "Epochs [0/2], Step[500/6000], Loss: 0.4861\n", + "Epochs [0/2], Step[1000/6000], Loss: 0.1039\n", + "Epochs [0/2], Step[1500/6000], Loss: 0.3183\n", + "Epochs [0/2], Step[2000/6000], Loss: 0.3517\n", + "Epochs [0/2], Step[2500/6000], Loss: 0.8670\n", + "Epochs [0/2], Step[3000/6000], Loss: 0.2248\n", + "Epochs [0/2], Step[3500/6000], Loss: 0.1513\n", + "Epochs [0/2], Step[4000/6000], Loss: 0.1644\n", + "Epochs [0/2], Step[4500/6000], Loss: 0.3453\n", + "Epochs [0/2], Step[5000/6000], Loss: 0.5418\n", + "Epochs [0/2], Step[5500/6000], Loss: 0.5290\n", + "Epochs [1/2], Step[0/6000], Loss: 0.6460\n", + "Epochs [1/2], Step[500/6000], Loss: 0.0469\n", + "Epochs [1/2], Step[1000/6000], Loss: 0.0185\n", + "Epochs [1/2], Step[1500/6000], Loss: 0.4995\n", + "Epochs [1/2], Step[2000/6000], Loss: 0.0406\n", + "Epochs [1/2], Step[2500/6000], Loss: 0.0519\n", + "Epochs [1/2], Step[3000/6000], Loss: 0.6407\n", + "Epochs [1/2], Step[3500/6000], Loss: 0.8942\n", + "Epochs [1/2], Step[4000/6000], Loss: 0.9299\n", + "Epochs [1/2], Step[4500/6000], Loss: 0.0436\n", + "Epochs [1/2], Step[5000/6000], Loss: 0.1844\n", + "Epochs [1/2], Step[5500/6000], Loss: 0.1046\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 1000/1000 [00:01<00:00, 934.60it/s]\n" + "100%|██████████| 1000/1000 [00:01<00:00, 958.62it/s]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Epochs [0/2], Step[0/6000], Loss: 2.3334\n", - "Epochs [0/2], Step[500/6000], Loss: 0.4136\n", - "Epochs [0/2], Step[1000/6000], Loss: 0.4991\n", - "Epochs [0/2], Step[1500/6000], Loss: 0.7323\n", - "Epochs [0/2], Step[2000/6000], Loss: 0.3884\n", - "Epochs [0/2], Step[2500/6000], Loss: 0.0964\n", - "Epochs [0/2], Step[3000/6000], Loss: 0.3577\n", - "Epochs [0/2], Step[3500/6000], Loss: 0.0276\n", - "Epochs [0/2], Step[4000/6000], Loss: 0.1680\n", - "Epochs [0/2], Step[4500/6000], Loss: 0.0507\n", - "Epochs [0/2], Step[5000/6000], Loss: 0.6252\n", - "Epochs [0/2], Step[5500/6000], Loss: 0.0607\n", - "Epochs [1/2], Step[0/6000], Loss: 0.1702\n", - "Epochs [1/2], Step[500/6000], Loss: 0.0736\n", - "Epochs [1/2], Step[1000/6000], Loss: 0.2258\n", - "Epochs [1/2], Step[1500/6000], Loss: 0.1754\n", - "Epochs [1/2], Step[2000/6000], Loss: 0.2483\n", - "Epochs [1/2], Step[2500/6000], Loss: 0.3203\n", - "Epochs [1/2], Step[3000/6000], Loss: 0.0468\n", - "Epochs [1/2], Step[3500/6000], Loss: 0.3267\n", - "Epochs [1/2], Step[4000/6000], Loss: 0.1223\n", - "Epochs [1/2], Step[4500/6000], Loss: 0.5855\n", - "Epochs [1/2], Step[5000/6000], Loss: 0.1427\n", - "Epochs [1/2], Step[5500/6000], Loss: 0.0212\n" + "Epochs [0/2], Step[0/6000], Loss: 2.3190\n", + "Epochs [0/2], Step[500/6000], Loss: 0.6820\n", + "Epochs [0/2], Step[1000/6000], Loss: 0.1696\n", + "Epochs [0/2], Step[1500/6000], Loss: 0.3839\n", + "Epochs [0/2], Step[2000/6000], Loss: 1.2308\n", + "Epochs [0/2], Step[2500/6000], Loss: 0.1496\n", + "Epochs [0/2], Step[3000/6000], Loss: 0.0472\n", + "Epochs [0/2], Step[3500/6000], Loss: 0.0918\n", + "Epochs [0/2], Step[4000/6000], Loss: 0.0721\n", + "Epochs [0/2], Step[4500/6000], Loss: 0.5453\n", + "Epochs [0/2], Step[5000/6000], Loss: 0.1536\n", + "Epochs [0/2], Step[5500/6000], Loss: 0.0545\n", + "Epochs [1/2], Step[0/6000], Loss: 1.2560\n", + "Epochs [1/2], Step[500/6000], Loss: 0.0099\n", + "Epochs [1/2], Step[1000/6000], Loss: 0.0444\n", + "Epochs [1/2], Step[1500/6000], Loss: 0.0457\n", + "Epochs [1/2], Step[2000/6000], Loss: 0.0634\n", + "Epochs [1/2], Step[2500/6000], Loss: 0.0071\n", + "Epochs [1/2], Step[3000/6000], Loss: 0.0785\n", + "Epochs [1/2], Step[3500/6000], Loss: 0.6115\n", + "Epochs [1/2], Step[4000/6000], Loss: 0.5950\n", + "Epochs [1/2], Step[4500/6000], Loss: 0.0018\n", + "Epochs [1/2], Step[5000/6000], Loss: 0.1131\n", + "Epochs [1/2], Step[5500/6000], Loss: 0.5479\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 1000/1000 [00:01<00:00, 915.94it/s]\n" + "100%|██████████| 1000/1000 [00:01<00:00, 945.12it/s]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Epochs [0/2], Step[0/6000], Loss: 2.2656\n", - "Epochs [0/2], Step[500/6000], Loss: 0.4871\n", - "Epochs [0/2], Step[1000/6000], Loss: 0.3666\n", - "Epochs [0/2], Step[1500/6000], Loss: 0.5389\n", - "Epochs [0/2], Step[2000/6000], Loss: 0.2955\n", - "Epochs [0/2], Step[2500/6000], Loss: 0.1862\n", - "Epochs [0/2], Step[3000/6000], Loss: 0.0579\n", - "Epochs [0/2], Step[3500/6000], Loss: 0.3820\n", - "Epochs [0/2], Step[4000/6000], Loss: 0.2179\n", - "Epochs [0/2], Step[4500/6000], Loss: 0.0945\n", - "Epochs [0/2], Step[5000/6000], Loss: 0.0139\n", - "Epochs [0/2], Step[5500/6000], Loss: 0.0529\n", - "Epochs [1/2], Step[0/6000], Loss: 0.0069\n", - "Epochs [1/2], Step[500/6000], Loss: 0.2136\n", - "Epochs [1/2], Step[1000/6000], Loss: 0.0488\n", - "Epochs [1/2], Step[1500/6000], Loss: 0.2331\n", - "Epochs [1/2], Step[2000/6000], Loss: 0.0735\n", - "Epochs [1/2], Step[2500/6000], Loss: 0.0037\n", - "Epochs [1/2], Step[3000/6000], Loss: 0.0182\n", - "Epochs [1/2], Step[3500/6000], Loss: 0.0023\n", - "Epochs [1/2], Step[4000/6000], Loss: 0.0255\n", - "Epochs [1/2], Step[4500/6000], Loss: 0.0008\n", - "Epochs [1/2], Step[5000/6000], Loss: 0.0103\n", - "Epochs [1/2], Step[5500/6000], Loss: 0.0469\n" + "Epochs [0/2], Step[0/6000], Loss: 2.2674\n", + "Epochs [0/2], Step[500/6000], Loss: 0.2170\n", + "Epochs [0/2], Step[1000/6000], Loss: 0.1006\n", + "Epochs [0/2], Step[1500/6000], Loss: 0.3419\n", + "Epochs [0/2], Step[2000/6000], Loss: 0.1457\n", + "Epochs [0/2], Step[2500/6000], Loss: 0.1445\n", + "Epochs [0/2], Step[3000/6000], Loss: 0.3745\n", + "Epochs [0/2], Step[3500/6000], Loss: 0.4711\n", + "Epochs [0/2], Step[4000/6000], Loss: 0.2007\n", + "Epochs [0/2], Step[4500/6000], Loss: 0.0455\n", + "Epochs [0/2], Step[5000/6000], Loss: 0.1431\n", + "Epochs [0/2], Step[5500/6000], Loss: 0.3326\n", + "Epochs [1/2], Step[0/6000], Loss: 0.0666\n", + "Epochs [1/2], Step[500/6000], Loss: 0.1139\n", + "Epochs [1/2], Step[1000/6000], Loss: 0.0031\n", + "Epochs [1/2], Step[1500/6000], Loss: 0.0450\n", + "Epochs [1/2], Step[2000/6000], Loss: 0.0068\n", + "Epochs [1/2], Step[2500/6000], Loss: 0.1992\n", + "Epochs [1/2], Step[3000/6000], Loss: 0.0964\n", + "Epochs [1/2], Step[3500/6000], Loss: 0.0062\n", + "Epochs [1/2], Step[4000/6000], Loss: 0.0903\n", + "Epochs [1/2], Step[4500/6000], Loss: 0.0150\n", + "Epochs [1/2], Step[5000/6000], Loss: 0.0507\n", + "Epochs [1/2], Step[5500/6000], Loss: 0.0841\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 1000/1000 [00:01<00:00, 885.51it/s]\n" + "100%|██████████| 1000/1000 [00:01<00:00, 927.32it/s]\n" ] } ], @@ -793,9 +793,9 @@ " 0\n", " ./repo/linear_nn\n", " 0\n", - " 2023-03-01 21:17:42.489049+00:00\n", - " 21 seconds after\n", - " 0.9680\n", + " 2023-03-30 07:47:30.238184+00:00\n", + " 20 seconds after\n", + " 0.9618\n", " 784\n", " 100\n", " 10\n", @@ -807,9 +807,9 @@ " 1\n", " ./repo/linear_nn\n", " 1\n", - " 2023-03-01 21:18:03.893347+00:00\n", - " 18 seconds after\n", - " 0.9062\n", + " 2023-03-30 07:47:50.545890+00:00\n", + " 17 seconds after\n", + " 0.9210\n", " 784\n", " 10\n", " 10\n", @@ -821,9 +821,9 @@ " 2\n", " ./repo/linear_nn\n", " 2\n", - " 2023-03-01 21:18:22.524721+00:00\n", - " 20 seconds after\n", - " 0.9546\n", + " 2023-03-30 07:48:08.332752+00:00\n", + " 19 seconds after\n", + " 0.9588\n", " 784\n", " 50\n", " 10\n", @@ -835,9 +835,9 @@ " 3\n", " ./repo/linear_nn\n", " 3\n", - " 2023-03-01 21:18:42.572824+00:00\n", + " 2023-03-30 07:48:27.519980+00:00\n", " 20 seconds after\n", - " 0.9688\n", + " 0.9663\n", " 784\n", " 100\n", " 10\n", @@ -851,16 +851,16 @@ ], "text/plain": [ " line num created_at saved \\\n", - "0 ./repo/linear_nn 0 2023-03-01 21:17:42.489049+00:00 21 seconds after \n", - "1 ./repo/linear_nn 1 2023-03-01 21:18:03.893347+00:00 18 seconds after \n", - "2 ./repo/linear_nn 2 2023-03-01 21:18:22.524721+00:00 20 seconds after \n", - "3 ./repo/linear_nn 3 2023-03-01 21:18:42.572824+00:00 20 seconds after \n", + "0 ./repo/linear_nn 0 2023-03-30 07:47:30.238184+00:00 20 seconds after \n", + "1 ./repo/linear_nn 1 2023-03-30 07:47:50.545890+00:00 17 seconds after \n", + "2 ./repo/linear_nn 2 2023-03-30 07:48:08.332752+00:00 19 seconds after \n", + "3 ./repo/linear_nn 3 2023-03-30 07:48:27.519980+00:00 20 seconds after \n", "\n", " acc input_size hidden_size num_classes num_epochs lr bs \n", - "0 0.9680 784 100 10 2 0.001 10 \n", - "1 0.9062 784 10 10 2 0.001 10 \n", - "2 0.9546 784 50 10 2 0.001 10 \n", - "3 0.9688 784 100 10 2 0.001 10 " + "0 0.9618 784 100 10 2 0.001 10 \n", + "1 0.9210 784 10 10 2 0.001 10 \n", + "2 0.9588 784 50 10 2 0.001 10 \n", + "3 0.9663 784 100 10 2 0.001 10 " ] }, "execution_count": 19, @@ -902,7 +902,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.4" + "version": "3.10.6" }, "orig_nbformat": 4, "vscode": { diff --git a/cascade/docs/source/examples/model_training_trainers.ipynb b/cascade/docs/source/examples/model_training_trainers.ipynb index 9a039acb..7dcbac5d 100644 --- a/cascade/docs/source/examples/model_training_trainers.ipynb +++ b/cascade/docs/source/examples/model_training_trainers.ipynb @@ -43,7 +43,7 @@ { "data": { "text/plain": [ - "'0.10.0'" + "'0.11.0'" ] }, "execution_count": 3, @@ -91,7 +91,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "1f776e6350e240d2bfc37fd9a0e688c2", + "model_id": "e9fd0ce67ae44a0990cd7591aa898316", "version_major": 2, "version_minor": 0 }, @@ -115,7 +115,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "73d8d9d9e7be4de7a617c4f8967ecacf", + "model_id": "8f9cce878ea643df870907734ce97287", "version_major": 2, "version_minor": 0 }, @@ -139,7 +139,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "0f7d43f57b36413ca49d6666871a3cae", + "model_id": "e7eed182323547178111d8b36db90a69", "version_major": 2, "version_minor": 0 }, @@ -163,7 +163,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "94ab98c099e442c185de2ce69b50d451", + "model_id": "3a725377fa4a4aa3a1a61dfafd1f8f81", "version_major": 2, "version_minor": 0 }, @@ -419,14 +419,14 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 500/500 [00:00<00:00, 873.68it/s]" + "100%|██████████| 500/500 [00:00<00:00, 836.31it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "INFO:cascade.models.trainer:Epoch 0: {'acc': 0.8768}\n" + "INFO:cascade.models.trainer:Epoch 0: {'acc': 0.874}\n" ] }, { @@ -434,29 +434,28 @@ "output_type": "stream", "text": [ "\n", - "100%|██████████| 500/500 [00:00<00:00, 873.66it/s]" + "100%|██████████| 500/500 [00:00<00:00, 827.84it/s]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "INFO:cascade.models.trainer:Epoch 1: {'acc': 0.9012}\n" + "INFO:cascade.models.trainer:Epoch 1: {'acc': 0.8978}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\n", - "100%|██████████| 500/500 [00:00<00:00, 877.38it/s]" + "100%|██████████| 500/500 [00:00<00:00, 845.85it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "INFO:cascade.models.trainer:Epoch 2: {'acc': 0.911}\n" + "INFO:cascade.models.trainer:Epoch 2: {'acc': 0.9092}\n" ] }, { @@ -464,14 +463,14 @@ "output_type": "stream", "text": [ "\n", - "100%|██████████| 500/500 [00:00<00:00, 901.63it/s]" + "100%|██████████| 500/500 [00:00<00:00, 866.87it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "INFO:cascade.models.trainer:Epoch 3: {'acc': 0.9162}\n" + "INFO:cascade.models.trainer:Epoch 3: {'acc': 0.9258}\n" ] }, { @@ -479,7 +478,7 @@ "output_type": "stream", "text": [ "\n", - "100%|██████████| 500/500 [00:00<00:00, 825.89it/s]" + "100%|██████████| 500/500 [00:00<00:00, 889.91it/s]" ] }, { @@ -494,14 +493,14 @@ "output_type": "stream", "text": [ "\n", - "100%|██████████| 500/500 [00:00<00:00, 853.20it/s]" + "100%|██████████| 500/500 [00:00<00:00, 802.18it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "INFO:cascade.models.trainer:Epoch 5: {'acc': 0.9256}\n" + "INFO:cascade.models.trainer:Epoch 5: {'acc': 0.9164}\n" ] }, { @@ -509,14 +508,14 @@ "output_type": "stream", "text": [ "\n", - "100%|██████████| 500/500 [00:00<00:00, 862.91it/s]" + "100%|██████████| 500/500 [00:00<00:00, 834.14it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "INFO:cascade.models.trainer:Epoch 6: {'acc': 0.9246}\n" + "INFO:cascade.models.trainer:Epoch 6: {'acc': 0.9268}\n" ] }, { @@ -524,14 +523,14 @@ "output_type": "stream", "text": [ "\n", - "100%|██████████| 500/500 [00:00<00:00, 860.80it/s]" + "100%|██████████| 500/500 [00:00<00:00, 865.22it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "INFO:cascade.models.trainer:Epoch 7: {'acc': 0.9168}\n" + "INFO:cascade.models.trainer:Epoch 7: {'acc': 0.9328}\n" ] }, { @@ -539,14 +538,14 @@ "output_type": "stream", "text": [ "\n", - "100%|██████████| 500/500 [00:00<00:00, 824.42it/s]" + "100%|██████████| 500/500 [00:00<00:00, 835.19it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "INFO:cascade.models.trainer:Epoch 8: {'acc': 0.9282}\n" + "INFO:cascade.models.trainer:Epoch 8: {'acc': 0.9294}\n" ] }, { @@ -554,14 +553,14 @@ "output_type": "stream", "text": [ "\n", - "100%|██████████| 500/500 [00:00<00:00, 849.35it/s]" + "100%|██████████| 500/500 [00:00<00:00, 871.34it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "INFO:cascade.models.trainer:Epoch 9: {'acc': 0.9336}\n", + "INFO:cascade.models.trainer:Epoch 9: {'acc': 0.9282}\n", "INFO:cascade.models.trainer:Training finished in 22 seconds\n" ] }, @@ -606,23 +605,23 @@ { "data": { "text/plain": [ - "[{'name': '',\n", - " 'train_start_at': DateTime(2023, 3, 2, 0, 16, 19, 817259, tzinfo=Timezone('Europe/Moscow')),\n", - " 'train_end_at': DateTime(2023, 3, 2, 0, 16, 42, 663507, tzinfo=Timezone('Europe/Moscow')),\n", - " 'metrics': [{'acc': 0.8768},\n", - " {'acc': 0.9012},\n", - " {'acc': 0.911},\n", - " {'acc': 0.9162},\n", + "[{'name': '',\n", + " 'train_start_at': DateTime(2023, 3, 30, 10, 44, 51, 579370, tzinfo=Timezone('Europe/Moscow')),\n", + " 'train_end_at': DateTime(2023, 3, 30, 10, 45, 14, 547613, tzinfo=Timezone('Europe/Moscow')),\n", + " 'metrics': [{'acc': 0.874},\n", + " {'acc': 0.8978},\n", + " {'acc': 0.9092},\n", + " {'acc': 0.9258},\n", " {'acc': 0.919},\n", - " {'acc': 0.9256},\n", - " {'acc': 0.9246},\n", - " {'acc': 0.9168},\n", - " {'acc': 0.9282},\n", - " {'acc': 0.9336}],\n", + " {'acc': 0.9164},\n", + " {'acc': 0.9268},\n", + " {'acc': 0.9328},\n", + " {'acc': 0.9294},\n", + " {'acc': 0.9282}],\n", " 'repo': [{'name': 'ModelRepo in trainer_repo of 1 lines',\n", " 'root': 'trainer_repo',\n", " 'len': 1,\n", - " 'updated_at': DateTime(2023, 3, 1, 21, 16, 42, 681273, tzinfo=Timezone('UTC')),\n", + " 'updated_at': DateTime(2023, 3, 30, 7, 45, 14, 570552, tzinfo=Timezone('UTC')),\n", " 'type': 'repo'}]}]" ] }, @@ -666,14 +665,14 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 500/500 [00:00<00:00, 838.05it/s]" + "100%|██████████| 500/500 [00:00<00:00, 851.19it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "INFO:cascade.models.trainer:Epoch 0: {'acc': 0.9328}\n" + "INFO:cascade.models.trainer:Epoch 0: {'acc': 0.9396}\n" ] }, { @@ -681,14 +680,14 @@ "output_type": "stream", "text": [ "\n", - "100%|██████████| 500/500 [00:00<00:00, 894.20it/s]" + "100%|██████████| 500/500 [00:00<00:00, 850.32it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "INFO:cascade.models.trainer:Epoch 1: {'acc': 0.9288}\n" + "INFO:cascade.models.trainer:Epoch 1: {'acc': 0.9384}\n" ] }, { @@ -696,14 +695,14 @@ "output_type": "stream", "text": [ "\n", - "100%|██████████| 500/500 [00:00<00:00, 893.29it/s]" + "100%|██████████| 500/500 [00:00<00:00, 881.03it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "INFO:cascade.models.trainer:Epoch 2: {'acc': 0.9306}\n" + "INFO:cascade.models.trainer:Epoch 2: {'acc': 0.9378}\n" ] }, { @@ -711,14 +710,14 @@ "output_type": "stream", "text": [ "\n", - "100%|██████████| 500/500 [00:00<00:00, 892.35it/s]" + "100%|██████████| 500/500 [00:00<00:00, 858.31it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "INFO:cascade.models.trainer:Epoch 3: {'acc': 0.9352}\n" + "INFO:cascade.models.trainer:Epoch 3: {'acc': 0.941}\n" ] }, { @@ -726,14 +725,14 @@ "output_type": "stream", "text": [ "\n", - "100%|██████████| 500/500 [00:00<00:00, 821.37it/s]" + "100%|██████████| 500/500 [00:00<00:00, 878.11it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "INFO:cascade.models.trainer:Epoch 4: {'acc': 0.9286}\n", + "INFO:cascade.models.trainer:Epoch 4: {'acc': 0.9162}\n", "INFO:cascade.models.trainer:Training finished in 11 seconds\n" ] }, @@ -767,21 +766,21 @@ { "data": { "text/plain": [ - "[{'acc': 0.8768},\n", - " {'acc': 0.9012},\n", - " {'acc': 0.911},\n", - " {'acc': 0.9162},\n", + "[{'acc': 0.874},\n", + " {'acc': 0.8978},\n", + " {'acc': 0.9092},\n", + " {'acc': 0.9258},\n", " {'acc': 0.919},\n", - " {'acc': 0.9256},\n", - " {'acc': 0.9246},\n", - " {'acc': 0.9168},\n", - " {'acc': 0.9282},\n", - " {'acc': 0.9336},\n", + " {'acc': 0.9164},\n", + " {'acc': 0.9268},\n", " {'acc': 0.9328},\n", - " {'acc': 0.9288},\n", - " {'acc': 0.9306},\n", - " {'acc': 0.9352},\n", - " {'acc': 0.9286}]" + " {'acc': 0.9294},\n", + " {'acc': 0.9282},\n", + " {'acc': 0.9396},\n", + " {'acc': 0.9384},\n", + " {'acc': 0.9378},\n", + " {'acc': 0.941},\n", + " {'acc': 0.9162}]" ] }, "execution_count": 15, @@ -821,7 +820,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.4" + "version": "3.10.6" }, "orig_nbformat": 4, "vscode": { diff --git a/cascade/docs/source/examples/pipeline_building.ipynb b/cascade/docs/source/examples/pipeline_building.ipynb index 10d8ee24..9996e9f4 100644 --- a/cascade/docs/source/examples/pipeline_building.ipynb +++ b/cascade/docs/source/examples/pipeline_building.ipynb @@ -39,7 +39,7 @@ { "data": { "text/plain": [ - "'0.10.0'" + "'0.11.0'" ] }, "execution_count": 3, @@ -63,7 +63,110 @@ "cell_type": "code", "execution_count": 4, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz\n", + "Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz to data/MNIST/raw/train-images-idx3-ubyte.gz\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "c7815f82b75540f184fceb59416f379a", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + " 0%| | 0/9912422 [00:00