From dcab7aa96d155188752114d7a08cc8e373a828d5 Mon Sep 17 00:00:00 2001 From: Alex Derr Date: Tue, 10 Dec 2024 14:30:04 -0500 Subject: [PATCH 01/22] Backend, property > quality attribute category --- demo/scenarios/1_requirements.ipynb | 39 +++++++++++++++++-- demo/scenarios/properties/interoperability.py | 2 + demo/scenarios/properties/monitorability.py | 2 + demo/simple/2_requirements.ipynb | 6 +++ mlte/catalog/model.py | 2 + .../schema/artifact/spec/v0.0.1/schema.json | 2 + .../artifact/validated/v0.0.1/schema.json | 2 + .../catalog/catalog_entry/v0.0.1/schema.json | 3 ++ 8 files changed, 54 insertions(+), 4 deletions(-) diff --git a/demo/scenarios/1_requirements.ipynb b/demo/scenarios/1_requirements.ipynb index 0eecf594e..5757cc1b8 100644 --- a/demo/scenarios/1_requirements.ipynb +++ b/demo/scenarios/1_requirements.ipynb @@ -69,9 +69,20 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "", + "evalue": "", + "output_type": "error", + "traceback": [ + "\u001b[1;31mRunning cells with 'mlte-python-3NUZF8_b-py3.9 (Python 3.9.20)' requires the ipykernel package.\n", + "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n", + "\u001b[1;31mCommand: '/Users/aderr/Library/Caches/pypoetry/virtualenvs/mlte-python-3NUZF8_b-py3.9/bin/python -m pip install ipykernel -U --force-reinstall'" + ] + } + ], "source": [ "import os\n", "from mlte.session import set_context, set_store\n", @@ -96,7 +107,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -125,7 +136,20 @@ "cell_type": "code", "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "ModuleNotFoundError", + "evalue": "No module named 'numpy'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[1], line 19\u001b[0m\n\u001b[1;32m 17\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mdemo\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mscenarios\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mvalues\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mmultiple_accuracy\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m MultipleAccuracy\n\u001b[1;32m 18\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mdemo\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mscenarios\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mvalues\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mranksums\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m RankSums\n\u001b[0;32m---> 19\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mdemo\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mscenarios\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mvalues\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mmultiple_ranksums\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m MultipleRanksums\n\u001b[1;32m 20\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mdemo\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mscenarios\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mproperties\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mmonitorability\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Monitorability\n\u001b[1;32m 21\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mdemo\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mscenarios\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mproperties\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01minteroperability\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Interoperability\n", + "File \u001b[0;32m~/repos/mlte/mlte-514/demo/scenarios/values/multiple_ranksums.py:8\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m__future__\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m annotations\n\u001b[1;32m 6\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mtyping\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Any, Dict\n\u001b[0;32m----> 8\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[1;32m 10\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mmlte\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mevidence\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mmetadata\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m EvidenceMetadata\n\u001b[1;32m 11\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mmlte\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mspec\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcondition\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Condition\n", + "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'numpy'" + ] + } + ], "source": [ "from mlte.spec.spec import Spec\n", "\n", @@ -228,6 +252,13 @@ ")\n", "spec.save(parents=True, force=True)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/demo/scenarios/properties/interoperability.py b/demo/scenarios/properties/interoperability.py index 7a07c5c35..7ccb9f639 100644 --- a/demo/scenarios/properties/interoperability.py +++ b/demo/scenarios/properties/interoperability.py @@ -1,6 +1,8 @@ from mlte.qa_category.base import QACategory +from mlte.qa_category.base import QACategory +class Interoperability(QACategory): class Interoperability(QACategory): """ The Interoperability QA category reflects contract requirements on model interfaces. diff --git a/demo/scenarios/properties/monitorability.py b/demo/scenarios/properties/monitorability.py index d4ffa9c46..1d13e9181 100644 --- a/demo/scenarios/properties/monitorability.py +++ b/demo/scenarios/properties/monitorability.py @@ -1,6 +1,8 @@ from mlte.qa_category.base import QACategory +from mlte.qa_category.base import QACategory +class Monitorability(QACategory): class Monitorability(QACategory): """ The Monitorability QA category reflects monitoring requirements. diff --git a/demo/simple/2_requirements.ipynb b/demo/simple/2_requirements.ipynb index a0c131582..038efccca 100644 --- a/demo/simple/2_requirements.ipynb +++ b/demo/simple/2_requirements.ipynb @@ -51,6 +51,7 @@ { "cell_type": "code", "execution_count": null, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -60,6 +61,10 @@ "from mlte.qa_category.costs.training_memory_cost import TrainingMemoryCost\n", "from mlte.qa_category.costs.training_compute_cost import TrainingComputeCost\n", "from mlte.qa_category.functionality.task_efficacy import TaskEfficacy\n", + "from mlte.qa_category.costs.storage_cost import StorageCost\n", + "from mlte.qa_category.costs.training_memory_cost import TrainingMemoryCost\n", + "from mlte.qa_category.costs.training_compute_cost import TrainingComputeCost\n", + "from mlte.qa_category.functionality.task_efficacy import TaskEfficacy\n", "\n", "\n", "from mlte.measurement.storage import LocalObjectSize\n", @@ -71,6 +76,7 @@ "\n", "spec = Spec(\n", " qa_categories={\n", + " qa_categories={\n", " TaskEfficacy(\n", " \"Important to understand if the model is useful for this case\"\n", " ): {\n", diff --git a/mlte/catalog/model.py b/mlte/catalog/model.py index 5a93162dd..1dc13d36a 100644 --- a/mlte/catalog/model.py +++ b/mlte/catalog/model.py @@ -56,6 +56,8 @@ class CatalogEntry(Filtrable): qa_category: Optional[str] = None """The QA category for the entry.""" + quality_attribute: Optional[str] = None + """The quality attribute for the entry.""" quality_attribute: Optional[str] = None """The quality attribute for the entry.""" diff --git a/mlte/frontend/nuxt-app/assets/schema/artifact/spec/v0.0.1/schema.json b/mlte/frontend/nuxt-app/assets/schema/artifact/spec/v0.0.1/schema.json index f8008ffdd..b394a3180 100644 --- a/mlte/frontend/nuxt-app/assets/schema/artifact/spec/v0.0.1/schema.json +++ b/mlte/frontend/nuxt-app/assets/schema/artifact/spec/v0.0.1/schema.json @@ -79,6 +79,7 @@ "module" ], "title": "QACategoryModel", + "title": "QACategoryModel", "type": "object" } }, @@ -97,6 +98,7 @@ "default": [], "items": { "$ref": "#/$defs/QACategoryModel" + "$ref": "#/$defs/QACategoryModel" }, "title": "Qa Categories", "type": "array" diff --git a/mlte/frontend/nuxt-app/assets/schema/artifact/validated/v0.0.1/schema.json b/mlte/frontend/nuxt-app/assets/schema/artifact/validated/v0.0.1/schema.json index cb3b642f0..7b316a079 100644 --- a/mlte/frontend/nuxt-app/assets/schema/artifact/validated/v0.0.1/schema.json +++ b/mlte/frontend/nuxt-app/assets/schema/artifact/validated/v0.0.1/schema.json @@ -123,6 +123,7 @@ "module" ], "title": "QACategoryModel", + "title": "QACategoryModel", "type": "object" }, "ResultModel": { @@ -171,6 +172,7 @@ "default": [], "items": { "$ref": "#/$defs/QACategoryModel" + "$ref": "#/$defs/QACategoryModel" }, "title": "Qa Categories", "type": "array" diff --git a/mlte/frontend/nuxt-app/assets/schema/catalog/catalog_entry/v0.0.1/schema.json b/mlte/frontend/nuxt-app/assets/schema/catalog/catalog_entry/v0.0.1/schema.json index d486edb1a..aaa952ec0 100644 --- a/mlte/frontend/nuxt-app/assets/schema/catalog/catalog_entry/v0.0.1/schema.json +++ b/mlte/frontend/nuxt-app/assets/schema/catalog/catalog_entry/v0.0.1/schema.json @@ -97,6 +97,7 @@ "title": "Tags", "type": "array" }, + "qa_category": { "qa_category": { "anyOf": [ { @@ -109,6 +110,7 @@ "default": null, "title": "Qa Category" }, + "quality_attribute": { "quality_attribute": { "anyOf": [ { @@ -120,6 +122,7 @@ ], "default": null, "title": "Quality Attribute" + "title": "Quality Attribute" }, "code_type": { "$ref": "#/$defs/CatalogEntryType" From e0e9b5000b9306ea9ba8f8ae0baa3ed80bdafc59 Mon Sep 17 00:00:00 2001 From: Alex Derr Date: Tue, 10 Dec 2024 16:21:12 -0500 Subject: [PATCH 02/22] Remove output from demo --- demo/scenarios/1_requirements.ipynb | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/demo/scenarios/1_requirements.ipynb b/demo/scenarios/1_requirements.ipynb index 5757cc1b8..0e0f69269 100644 --- a/demo/scenarios/1_requirements.ipynb +++ b/demo/scenarios/1_requirements.ipynb @@ -71,18 +71,7 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "ename": "", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[1;31mRunning cells with 'mlte-python-3NUZF8_b-py3.9 (Python 3.9.20)' requires the ipykernel package.\n", - "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n", - "\u001b[1;31mCommand: '/Users/aderr/Library/Caches/pypoetry/virtualenvs/mlte-python-3NUZF8_b-py3.9/bin/python -m pip install ipykernel -U --force-reinstall'" - ] - } - ], + "outputs": [], "source": [ "import os\n", "from mlte.session import set_context, set_store\n", @@ -136,20 +125,7 @@ "cell_type": "code", "execution_count": 3, "metadata": {}, - "outputs": [ - { - "ename": "ModuleNotFoundError", - "evalue": "No module named 'numpy'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[1], line 19\u001b[0m\n\u001b[1;32m 17\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mdemo\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mscenarios\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mvalues\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mmultiple_accuracy\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m MultipleAccuracy\n\u001b[1;32m 18\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mdemo\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mscenarios\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mvalues\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mranksums\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m RankSums\n\u001b[0;32m---> 19\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mdemo\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mscenarios\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mvalues\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mmultiple_ranksums\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m MultipleRanksums\n\u001b[1;32m 20\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mdemo\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mscenarios\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mproperties\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mmonitorability\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Monitorability\n\u001b[1;32m 21\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mdemo\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mscenarios\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mproperties\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01minteroperability\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Interoperability\n", - "File \u001b[0;32m~/repos/mlte/mlte-514/demo/scenarios/values/multiple_ranksums.py:8\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m__future__\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m annotations\n\u001b[1;32m 6\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mtyping\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Any, Dict\n\u001b[0;32m----> 8\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[1;32m 10\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mmlte\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mevidence\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mmetadata\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m EvidenceMetadata\n\u001b[1;32m 11\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mmlte\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mspec\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcondition\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Condition\n", - "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'numpy'" - ] - } - ], + "outputs": [], "source": [ "from mlte.spec.spec import Spec\n", "\n", From 827ce6d10b80e68799061279bf4ddd0d83ced6f0 Mon Sep 17 00:00:00 2001 From: Alex Derr Date: Tue, 10 Dec 2024 16:23:58 -0500 Subject: [PATCH 03/22] Reverting changes to ipynb --- demo/scenarios/1_requirements.ipynb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/demo/scenarios/1_requirements.ipynb b/demo/scenarios/1_requirements.ipynb index 0e0f69269..0eecf594e 100644 --- a/demo/scenarios/1_requirements.ipynb +++ b/demo/scenarios/1_requirements.ipynb @@ -69,7 +69,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -96,7 +96,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -228,13 +228,6 @@ ")\n", "spec.save(parents=True, force=True)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { From 19c05111138c1c14d4e2d3fc63cfd90100bbbb1c Mon Sep 17 00:00:00 2001 From: Alex Derr Date: Mon, 16 Dec 2024 16:25:02 -0500 Subject: [PATCH 04/22] Another pass for consistency --- .../nuxt-app/assets/schema/artifact/spec/v0.0.1/schema.json | 2 +- .../assets/schema/artifact/validated/v0.0.1/schema.json | 2 +- .../assets/schema/catalog/catalog_entry/v0.0.1/schema.json | 2 +- mlte/schema/artifact/spec/v0.0.1/schema.json | 2 +- mlte/schema/artifact/validated/v0.0.1/schema.json | 2 +- mlte/schema/catalog/catalog_entry/v0.0.1/schema.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mlte/frontend/nuxt-app/assets/schema/artifact/spec/v0.0.1/schema.json b/mlte/frontend/nuxt-app/assets/schema/artifact/spec/v0.0.1/schema.json index b394a3180..82a9d3dcd 100644 --- a/mlte/frontend/nuxt-app/assets/schema/artifact/spec/v0.0.1/schema.json +++ b/mlte/frontend/nuxt-app/assets/schema/artifact/spec/v0.0.1/schema.json @@ -100,7 +100,7 @@ "$ref": "#/$defs/QACategoryModel" "$ref": "#/$defs/QACategoryModel" }, - "title": "Qa Categories", + "title": "QA Categories", "type": "array" } }, diff --git a/mlte/frontend/nuxt-app/assets/schema/artifact/validated/v0.0.1/schema.json b/mlte/frontend/nuxt-app/assets/schema/artifact/validated/v0.0.1/schema.json index 7b316a079..7078d9824 100644 --- a/mlte/frontend/nuxt-app/assets/schema/artifact/validated/v0.0.1/schema.json +++ b/mlte/frontend/nuxt-app/assets/schema/artifact/validated/v0.0.1/schema.json @@ -174,7 +174,7 @@ "$ref": "#/$defs/QACategoryModel" "$ref": "#/$defs/QACategoryModel" }, - "title": "Qa Categories", + "title": "QA Categories", "type": "array" } }, diff --git a/mlte/frontend/nuxt-app/assets/schema/catalog/catalog_entry/v0.0.1/schema.json b/mlte/frontend/nuxt-app/assets/schema/catalog/catalog_entry/v0.0.1/schema.json index aaa952ec0..86213c9cb 100644 --- a/mlte/frontend/nuxt-app/assets/schema/catalog/catalog_entry/v0.0.1/schema.json +++ b/mlte/frontend/nuxt-app/assets/schema/catalog/catalog_entry/v0.0.1/schema.json @@ -108,7 +108,7 @@ } ], "default": null, - "title": "Qa Category" + "title": "QA Category" }, "quality_attribute": { "quality_attribute": { diff --git a/mlte/schema/artifact/spec/v0.0.1/schema.json b/mlte/schema/artifact/spec/v0.0.1/schema.json index f8008ffdd..776cc22ad 100644 --- a/mlte/schema/artifact/spec/v0.0.1/schema.json +++ b/mlte/schema/artifact/spec/v0.0.1/schema.json @@ -98,7 +98,7 @@ "items": { "$ref": "#/$defs/QACategoryModel" }, - "title": "Qa Categories", + "title": "QA Categories", "type": "array" } }, diff --git a/mlte/schema/artifact/validated/v0.0.1/schema.json b/mlte/schema/artifact/validated/v0.0.1/schema.json index cb3b642f0..04761ed9c 100644 --- a/mlte/schema/artifact/validated/v0.0.1/schema.json +++ b/mlte/schema/artifact/validated/v0.0.1/schema.json @@ -172,7 +172,7 @@ "items": { "$ref": "#/$defs/QACategoryModel" }, - "title": "Qa Categories", + "title": "QA Categories", "type": "array" } }, diff --git a/mlte/schema/catalog/catalog_entry/v0.0.1/schema.json b/mlte/schema/catalog/catalog_entry/v0.0.1/schema.json index d486edb1a..807f95961 100644 --- a/mlte/schema/catalog/catalog_entry/v0.0.1/schema.json +++ b/mlte/schema/catalog/catalog_entry/v0.0.1/schema.json @@ -107,7 +107,7 @@ } ], "default": null, - "title": "Qa Category" + "title": "QA Category" }, "quality_attribute": { "anyOf": [ From 624b0b715bc78df527f6972f02f938cca4d40d7a Mon Sep 17 00:00:00 2001 From: Alex Derr Date: Fri, 20 Dec 2024 14:18:28 -0500 Subject: [PATCH 05/22] Initial working Custom List Store + typos --- mlte/backend/core/state.py | 10 +- mlte/backend/main.py | 5 + mlte/custom_list/__init__.py | 0 mlte/custom_list/model.py | 29 +++++ mlte/store/catalog/underlying/fs.py | 6 +- mlte/store/custom_list/__init__.py | 0 mlte/store/custom_list/factory.py | 29 +++++ mlte/store/custom_list/store.py | 31 ++++++ mlte/store/custom_list/store_session.py | 63 +++++++++++ mlte/store/custom_list/underlying/__init__.py | 0 mlte/store/custom_list/underlying/fs.py | 103 ++++++++++++++++++ mlte/store/user/store.py | 2 +- mlte/store/user/store_session.py | 2 +- mlte/store/user/underlying/fs.py | 4 +- 14 files changed, 276 insertions(+), 8 deletions(-) create mode 100644 mlte/custom_list/__init__.py create mode 100644 mlte/custom_list/model.py create mode 100644 mlte/store/custom_list/__init__.py create mode 100644 mlte/store/custom_list/factory.py create mode 100644 mlte/store/custom_list/store.py create mode 100644 mlte/store/custom_list/store_session.py create mode 100644 mlte/store/custom_list/underlying/__init__.py create mode 100644 mlte/store/custom_list/underlying/fs.py diff --git a/mlte/backend/core/state.py b/mlte/backend/core/state.py index 41c592cea..fa2fadf1b 100644 --- a/mlte/backend/core/state.py +++ b/mlte/backend/core/state.py @@ -11,6 +11,7 @@ from mlte.store.catalog.catalog_group import CatalogStoreGroup from mlte.store.catalog.store import CatalogStore from mlte.store.user.store import UserStore +from mlte.store.custom_list.store import CustomListStore class State: @@ -30,6 +31,9 @@ def reset(self): self._catalog_stores: CatalogStoreGroup = CatalogStoreGroup() """The list of catalog store instances maintained by the state object.""" + self._custom_list_store: Optional[CustomListStore] = None + """The custom list store instance maintained by the state object.""" + self._jwt_secret_key: str = "" """Secret key used to sign authentication tokens.""" @@ -38,7 +42,7 @@ def set_artifact_store(self, store: ArtifactStore): self._artifact_store = store def set_user_store(self, store: UserStore): - """Set the globally-configured backend artifact store.""" + """Set the globally-configured backend user store.""" self._user_store = store def add_catalog_store( @@ -53,6 +57,10 @@ def add_catalog_store_from_uri( """Adds to the the globally-configured backend list of catalog stores.""" self._catalog_stores.add_catalog_from_uri(id, store_uri, overwite) + def set_custom_list_store(self, store: CustomListStore): + """Set the globally-configured backend custom list store.""" + self._custom_list_store = store + def set_token_key(self, token_key: str): """Sets the globally used token secret key.""" self._jwt_secret_key = token_key diff --git a/mlte/backend/main.py b/mlte/backend/main.py index 8d6a77060..5b1a9f578 100644 --- a/mlte/backend/main.py +++ b/mlte/backend/main.py @@ -19,6 +19,7 @@ from mlte.store.base import StoreType, StoreURI from mlte.store.catalog.sample_catalog import SampleCatalog from mlte.store.user import factory as user_store_factory +from mlte.store.custom_list import factory as custom_list_store_factory # Application exit codes EXIT_SUCCESS = 0 @@ -96,6 +97,10 @@ def run( f"Adding catalog with id '{id}' and URI of type: {StoreURI.from_string(uri).type}" ) state.add_catalog_store_from_uri(uri, id) + + # Initialize the backing custom list store instance. Assume same store as artifact one for now. + custom_list_store = custom_list_store_factory.create_custom_list_store(store_uri) + state.set_custom_list_store(custom_list_store) # Set the token signing key. state.set_token_key(jwt_secret) diff --git a/mlte/custom_list/__init__.py b/mlte/custom_list/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/mlte/custom_list/model.py b/mlte/custom_list/model.py new file mode 100644 index 000000000..d1c4d22e9 --- /dev/null +++ b/mlte/custom_list/model.py @@ -0,0 +1,29 @@ +""" +mlte/custom_list/model.py + +Model implementation for a custom list. +""" +from __future__ import annotations + +from typing import List + +from mlte.model import BaseModel + +class CustomList(BaseModel): + """A model class representing a custom list.""" + + name: str + """An name to uniquely identify the list.""" + + entries: List[CustomListEntry] = [] + """A list of entries in the list.""" + + +class CustomListEntry(BaseModel): + """A model class representing a custom list entry.""" + + namme: str + """A name to uniquely identify the entry.""" + + description: str + """A description of the the entry.""" diff --git a/mlte/store/catalog/underlying/fs.py b/mlte/store/catalog/underlying/fs.py index 811aad5ef..3d733df36 100644 --- a/mlte/store/catalog/underlying/fs.py +++ b/mlte/store/catalog/underlying/fs.py @@ -19,7 +19,7 @@ from mlte.store.common.fs_storage import FileSystemStorage # ----------------------------------------------------------------------------- -# LocalFileSystemStore +# FileSystemCatalogStore # ----------------------------------------------------------------------------- @@ -27,7 +27,7 @@ class FileSystemCatalogStore(CatalogStore): """A local file system implementation of the MLTE catalog store.""" BASE_CATALOGS_FOLDER = "catalogs" - """Base fodler to store catalog entries in.""" + """Base folder to store catalog entries in.""" DEFAULT_CATALOG_FOLDER = "catalog" """A default name for a catalog folder.""" @@ -56,7 +56,7 @@ def session(self) -> FileSystemCatalogStoreSession: # ----------------------------------------------------------------------------- -# LocalFileSystemStoreSession +# FileSystemCatalogStoreSession # ----------------------------------------------------------------------------- diff --git a/mlte/store/custom_list/__init__.py b/mlte/store/custom_list/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/mlte/store/custom_list/factory.py b/mlte/store/custom_list/factory.py new file mode 100644 index 000000000..6e89b1dd1 --- /dev/null +++ b/mlte/store/custom_list/factory.py @@ -0,0 +1,29 @@ +""" +mlte/store/custom_list/factory.py + +Top-level functions for custom list store creation. +""" + +from mlte.store.base import StoreType, StoreURI +from mlte.store.custom_list.store import CustomListStore +from mlte.store.custom_list.underlying.fs import FileSystemCustomListStore +# from mlte.store.custom_list.underlying.memory import InMemoryCustomListStore +# from mlte.store.custom_list.underlying.rdbs.store import RelationalDBCustomListStore + +def create_custom_list_store(uri: str) -> CustomListStore: + """ + Create a MLTE custom list store instance. + :param uri: The URI for the store instance + :return: The store instance + """ + parsed_uri = StoreURI.from_string(uri) + if parsed_uri.type == StoreType.LOCAL_MEMORY: + return InMemoryCustomListStore(parsed_uri) + if parsed_uri.type == StoreType.RELATIONAL_DB: + return RelationalDBCustomListStore(parsed_uri) + if parsed_uri.type == StoreType.LOCAL_FILESYSTEM: + return FileSystemCustomListStore(parsed_uri) + else: + raise Exception( + f"Store can't be created, unknown or unsupported URI prefix received for uri {parsed_uri}" + ) \ No newline at end of file diff --git a/mlte/store/custom_list/store.py b/mlte/store/custom_list/store.py new file mode 100644 index 000000000..10a62f542 --- /dev/null +++ b/mlte/store/custom_list/store.py @@ -0,0 +1,31 @@ +""" +mlte/store/custom_list/store.py + +MLTE custom list store implementation +""" + +from __future__ import annotations + +from mlte.store.base import Store, StoreSession + +# ----------------------------------------------------------------------------- +# CustomListStore +# ----------------------------------------------------------------------------- + + +class CustomListStore(Store): + """ + An abstract custom list store + """ + + def __init__(self, uri: StoreURI): + """Base constructor""" + super().__init__(uri=uri) + """Store uri.""" + + def session(self) -> CustomListStoreSession: + """ + Return a session handle for the store instance. + :return: The session handle + """ + raise NotImplementedError("Cannot get handle to abstract Store.") diff --git a/mlte/store/custom_list/store_session.py b/mlte/store/custom_list/store_session.py new file mode 100644 index 000000000..bc17c7b86 --- /dev/null +++ b/mlte/store/custom_list/store_session.py @@ -0,0 +1,63 @@ +""" +mlte/store/custom_list/store_session.py + +MLTE custom list store interface implementation +""" +from __future__ import annotations + +from typing import List + +from mlte.store.base import ResourceMapper, StoreSession +from mlte.custom_list.model import CustomList, CustomListEntry + +# ----------------------------------------------------------------------------- +# CustomListStoreSession +# ----------------------------------------------------------------------------- + + +class CustomListStoreSession(StoreSession): + """The base class for all implementations of the MLTE custom list store session.""" + + custom_list_mapper: CustomListMapper + """Mapper for the custom list resource.""" + + custom_list_entry_mapper: CustomListEntryMapper + """Mapper for the custom list entry resource.""" + + +class CustomListMapper(ResourceMapper): + """An interface for mapping CRUD actions to custom lists.""" + + def create(self, new_custom_list: CustomList) -> CustomList: + raise NotImplementedError(self.NOT_IMPLEMENTED_ERROR_MSG) + + def edit(self, updated_custom_list: CustomList) -> CustomList: + raise NotImplementedError(self.NOT_IMPLEMENTED_ERROR_MSG) + + def read(self, custom_list_name: str) -> CustomList: + raise NotImplementedError(self.NOT_IMPLEMENTED_ERROR_MSG) + + def list(self) -> List[str]: + raise NotImplementedError(self.NOT_IMPLEMENTED_ERROR_MSG) + + def delete(self, custom_list_name: str) -> CustomList: + raise NotImplementedError(self.NOT_IMPLEMENTED_ERROR_MSG) + + +class CustomListEntryMapper(ResourceMapper): + """An interface for mapping CRUD actions to custom list entries.""" + + def create(self, new_custom_list_entry: CustomListEntry) -> CustomListEntry: + raise NotImplementedError(self.NOT_IMPLEMENTED_ERROR_MSG) + + def edit(self, updated_custom_list_entry: CustomListEntry) -> CustomListEntry: + raise NotImplementedError(self.NOT_IMPLEMENTED_ERROR_MSG) + + def read(self, custom_list_entry_name: str) -> CustomListEntry: + raise NotImplementedError(self.NOT_IMPLEMENTED_ERROR_MSG) + + def list(self) -> List[str]: + raise NotImplementedError(self.NOT_IMPLEMENTED_ERROR_MSG) + + def delete(self, custom_list_entry_name: str) -> CustomListEntry: + raise NotImplementedError(self.NOT_IMPLEMENTED_ERROR_MSG) \ No newline at end of file diff --git a/mlte/store/custom_list/underlying/__init__.py b/mlte/store/custom_list/underlying/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/mlte/store/custom_list/underlying/fs.py b/mlte/store/custom_list/underlying/fs.py new file mode 100644 index 000000000..50b51afa3 --- /dev/null +++ b/mlte/store/custom_list/underlying/fs.py @@ -0,0 +1,103 @@ +""" +mlte/store/custom_list/underlying/fs.py + +Implementation of local file system custom list store. +""" +from __future__ import annotations + +from pathlib import Path + +from mlte.custom_list.model import CustomList, CustomListEntry +from mlte.store.base import StoreURI +from mlte.store.custom_list.store import CustomListStore +from mlte.store.custom_list.store_session import CustomListStoreSession, CustomListMapper, CustomListEntryMapper +from mlte.store.common.fs_storage import FileSystemStorage + +# ----------------------------------------------------------------------------- +# FileSystemCustomListStore +# ----------------------------------------------------------------------------- + + +class FileSystemCustomListStore(CustomListStore): + """A local file system implementation of the MLTE custom list store.""" + + BASE_CUSTOM_LIST_FOLDER = "custom_lists" + """Base folder to store custom lists in.""" + + def __init__(self, uri: StoreURI) -> None: + self.storage = FileSystemStorage( + uri=uri, sub_folder=self.BASE_CUSTOM_LIST_FOLDER + ) + """Underlying storage.""" + + # Initialize defaults. + super().__init__(uri=uri) + + def session(self) -> FileSystemCustomListStoreSession: + """ + Return a session handle for the store instance. + :return: The session handle + """ + return FileSystemCustomListStoreSession(storage=self.storage) + + +# ----------------------------------------------------------------------------- +# FileSystemCustomLilstStoreSession +# ----------------------------------------------------------------------------- + + +class FileSystemCustomListStoreSession(CustomListStoreSession): + """A local file-system implementation of the MLTE custom list store.""" + + def __init__(self, storage: FileSystemStorage) -> None: + self.custom_list_mapper = FileSystemCustomListMapper(storage) + """The mapper to custom list CRUD.""" + + self.custom_list_entry_mapper = FileSystemCustomListEntryMapper(storage) + """The mapper to custom list entry CRUD.""" + + def close(self) -> None: + """Close the session.""" + # Closing a local FS session is a no-op. + pass + + +# ----------------------------------------------------------------------------- +# FileSystemCustomListMappper +# ----------------------------------------------------------------------------- + + +class FileSystemCustomListMapper(CustomListMapper): + """FS mapper for the custom list resource.""" + + CUSTOM_LIST_FOLDER = "custom_lists" + """Subfolder for custom lists.""" + + def __init__( + self, storage: FileSystemStorage + ) -> None: + self.storage = storage.clone() + """A reference to underlying storage.""" + + self.storage.set_base_path( + Path(FileSystemCustomListStore.BASE_CUSTOM_LIST_FOLDER, self.CUSTOM_LIST_FOLDER) + ) + """Set the subfodler for this resource.""" + + def create(self, custom_list: CustomList) -> CustomList: + self.storage.ensure_resource_does_not_exist(custom_list.name) + return self._write_entry(custom_list) + + def _write_entry(self, custom_list: CustomList) -> CustomList: + """Writes a entry to storage.""" + self.storage.write_resource(custom_list.name, custom_list.model_dump()) + return self._read_entry(custom_list.name) + + +# ----------------------------------------------------------------------------- +# FileSystemCustomListEntryMappper +# ----------------------------------------------------------------------------- + + +class FileSystemCustomListEntryMapper(CustomListEntryMapper): + pass \ No newline at end of file diff --git a/mlte/store/user/store.py b/mlte/store/user/store.py index 3983a2034..9d7eb92ba 100644 --- a/mlte/store/user/store.py +++ b/mlte/store/user/store.py @@ -37,7 +37,7 @@ class UserStore(Store): def __init__(self, uri: StoreURI, add_default_data: bool = True): """Base constructor.""" super().__init__(uri=uri) - "Store uri." + """Store uri.""" # Sets up default user and permissions. if add_default_data: diff --git a/mlte/store/user/store_session.py b/mlte/store/user/store_session.py index 9a0936726..67d84f3d9 100644 --- a/mlte/store/user/store_session.py +++ b/mlte/store/user/store_session.py @@ -37,7 +37,7 @@ def __enter__(self) -> UserStoreSession: class UserMapper(ResourceMapper): - """A interface for mapping CRUD actions to store users.""" + """An interface for mapping CRUD actions to store users.""" def create(self, new_user: UserWithPassword) -> User: raise NotImplementedError(self.NOT_IMPLEMENTED_ERROR_MSG) diff --git a/mlte/store/user/underlying/fs.py b/mlte/store/user/underlying/fs.py index 8e710bf53..68b0bd09e 100644 --- a/mlte/store/user/underlying/fs.py +++ b/mlte/store/user/underlying/fs.py @@ -96,12 +96,12 @@ def __init__( """A reference to underlying storage.""" self.group_mapper = group_mapper - """Refernce to group mapper, to get updated groups when needed.""" + """Reference to group mapper, to get updated groups when needed.""" self.storage.set_base_path( Path(FileSystemUserStore.BASE_USERS_FOLDER, self.USERS_FOLDER) ) - """Set the subfodler for this resrouce.""" + """Set the subfodler for this resource.""" def create(self, user: UserWithPassword) -> User: self.storage.ensure_resource_does_not_exist(user.username) From c9d969be8d900314a033f1a972d0ebcb9230bd0d Mon Sep 17 00:00:00 2001 From: Alex Derr Date: Wed, 8 Jan 2025 16:22:18 -0500 Subject: [PATCH 06/22] Initial QA Category list and __init__ files --- mlte/store/custom_list/qa_categories/__init__.py | 0 mlte/store/custom_list/qa_categories/explainability.json | 4 ++++ mlte/store/custom_list/qa_categories/fairness.json | 4 ++++ .../custom_list/qa_categories/functional-correctness.json | 4 ++++ mlte/store/custom_list/qa_categories/interoperability.json | 4 ++++ mlte/store/custom_list/qa_categories/interpretability.json | 4 ++++ mlte/store/custom_list/qa_categories/maintainability.json | 4 ++++ mlte/store/custom_list/qa_categories/monitorability.json | 4 ++++ mlte/store/custom_list/qa_categories/privacy.json | 4 ++++ .../store/custom_list/qa_categories/resource-consumption.json | 4 ++++ mlte/store/custom_list/qa_categories/robustness.json | 4 ++++ mlte/store/custom_list/qa_categories/safety.json | 4 ++++ mlte/store/custom_list/qa_categories/scalability.json | 4 ++++ mlte/store/custom_list/qa_categories/security.json | 4 ++++ mlte/store/custom_list/qa_categories/testability.json | 4 ++++ mlte/store/custom_list/qa_categories/trust.json | 4 ++++ mlte/store/custom_list/quality_attributes/__init__.py | 0 mlte/store/custom_list/quality_attributes/resilience.json | 4 ++++ 18 files changed, 64 insertions(+) create mode 100644 mlte/store/custom_list/qa_categories/__init__.py create mode 100644 mlte/store/custom_list/qa_categories/explainability.json create mode 100644 mlte/store/custom_list/qa_categories/fairness.json create mode 100644 mlte/store/custom_list/qa_categories/functional-correctness.json create mode 100644 mlte/store/custom_list/qa_categories/interoperability.json create mode 100644 mlte/store/custom_list/qa_categories/interpretability.json create mode 100644 mlte/store/custom_list/qa_categories/maintainability.json create mode 100644 mlte/store/custom_list/qa_categories/monitorability.json create mode 100644 mlte/store/custom_list/qa_categories/privacy.json create mode 100644 mlte/store/custom_list/qa_categories/resource-consumption.json create mode 100644 mlte/store/custom_list/qa_categories/robustness.json create mode 100644 mlte/store/custom_list/qa_categories/safety.json create mode 100644 mlte/store/custom_list/qa_categories/scalability.json create mode 100644 mlte/store/custom_list/qa_categories/security.json create mode 100644 mlte/store/custom_list/qa_categories/testability.json create mode 100644 mlte/store/custom_list/qa_categories/trust.json create mode 100644 mlte/store/custom_list/quality_attributes/__init__.py create mode 100644 mlte/store/custom_list/quality_attributes/resilience.json diff --git a/mlte/store/custom_list/qa_categories/__init__.py b/mlte/store/custom_list/qa_categories/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/mlte/store/custom_list/qa_categories/explainability.json b/mlte/store/custom_list/qa_categories/explainability.json new file mode 100644 index 000000000..f6fa76159 --- /dev/null +++ b/mlte/store/custom_list/qa_categories/explainability.json @@ -0,0 +1,4 @@ +{ + "name": "Explainability", + "description": "Explainability" +} \ No newline at end of file diff --git a/mlte/store/custom_list/qa_categories/fairness.json b/mlte/store/custom_list/qa_categories/fairness.json new file mode 100644 index 000000000..25db96b48 --- /dev/null +++ b/mlte/store/custom_list/qa_categories/fairness.json @@ -0,0 +1,4 @@ +{ + "name": "Fairness", + "description": "Fairness" +} \ No newline at end of file diff --git a/mlte/store/custom_list/qa_categories/functional-correctness.json b/mlte/store/custom_list/qa_categories/functional-correctness.json new file mode 100644 index 000000000..1c3da8a75 --- /dev/null +++ b/mlte/store/custom_list/qa_categories/functional-correctness.json @@ -0,0 +1,4 @@ +{ + "name": "Functional Correctness", + "description": "Functional Correctness" +} \ No newline at end of file diff --git a/mlte/store/custom_list/qa_categories/interoperability.json b/mlte/store/custom_list/qa_categories/interoperability.json new file mode 100644 index 000000000..d655ca19a --- /dev/null +++ b/mlte/store/custom_list/qa_categories/interoperability.json @@ -0,0 +1,4 @@ +{ + "name": "Interoperability", + "description": "Interoperability" +} \ No newline at end of file diff --git a/mlte/store/custom_list/qa_categories/interpretability.json b/mlte/store/custom_list/qa_categories/interpretability.json new file mode 100644 index 000000000..a05a34b46 --- /dev/null +++ b/mlte/store/custom_list/qa_categories/interpretability.json @@ -0,0 +1,4 @@ +{ + "name": "Interpretability", + "description": "Interpretability" +} \ No newline at end of file diff --git a/mlte/store/custom_list/qa_categories/maintainability.json b/mlte/store/custom_list/qa_categories/maintainability.json new file mode 100644 index 000000000..dc9ab1c5c --- /dev/null +++ b/mlte/store/custom_list/qa_categories/maintainability.json @@ -0,0 +1,4 @@ +{ + "name": "Maintainability", + "description": "Maintainability" +} \ No newline at end of file diff --git a/mlte/store/custom_list/qa_categories/monitorability.json b/mlte/store/custom_list/qa_categories/monitorability.json new file mode 100644 index 000000000..2c911fd53 --- /dev/null +++ b/mlte/store/custom_list/qa_categories/monitorability.json @@ -0,0 +1,4 @@ +{ + "name": "Monitorability", + "description": "Monitorability" +} \ No newline at end of file diff --git a/mlte/store/custom_list/qa_categories/privacy.json b/mlte/store/custom_list/qa_categories/privacy.json new file mode 100644 index 000000000..13053f786 --- /dev/null +++ b/mlte/store/custom_list/qa_categories/privacy.json @@ -0,0 +1,4 @@ +{ + "name": "Privacy", + "description": "Privacy" +} \ No newline at end of file diff --git a/mlte/store/custom_list/qa_categories/resource-consumption.json b/mlte/store/custom_list/qa_categories/resource-consumption.json new file mode 100644 index 000000000..5030caf6e --- /dev/null +++ b/mlte/store/custom_list/qa_categories/resource-consumption.json @@ -0,0 +1,4 @@ +{ + "name": "Resource Consumption", + "description": "Resource Consumption" +} \ No newline at end of file diff --git a/mlte/store/custom_list/qa_categories/robustness.json b/mlte/store/custom_list/qa_categories/robustness.json new file mode 100644 index 000000000..7bcd57579 --- /dev/null +++ b/mlte/store/custom_list/qa_categories/robustness.json @@ -0,0 +1,4 @@ +{ + "name": "Robustness", + "description": "Robustness" +} \ No newline at end of file diff --git a/mlte/store/custom_list/qa_categories/safety.json b/mlte/store/custom_list/qa_categories/safety.json new file mode 100644 index 000000000..5f31c7d9d --- /dev/null +++ b/mlte/store/custom_list/qa_categories/safety.json @@ -0,0 +1,4 @@ +{ + "name": "Safety", + "description": "Safety" +} \ No newline at end of file diff --git a/mlte/store/custom_list/qa_categories/scalability.json b/mlte/store/custom_list/qa_categories/scalability.json new file mode 100644 index 000000000..ec2d83321 --- /dev/null +++ b/mlte/store/custom_list/qa_categories/scalability.json @@ -0,0 +1,4 @@ +{ + "name": "Scalability", + "description": "Scalability" +} \ No newline at end of file diff --git a/mlte/store/custom_list/qa_categories/security.json b/mlte/store/custom_list/qa_categories/security.json new file mode 100644 index 000000000..492ba62af --- /dev/null +++ b/mlte/store/custom_list/qa_categories/security.json @@ -0,0 +1,4 @@ +{ + "name": "Security", + "description": "Security" +} \ No newline at end of file diff --git a/mlte/store/custom_list/qa_categories/testability.json b/mlte/store/custom_list/qa_categories/testability.json new file mode 100644 index 000000000..36f984ae9 --- /dev/null +++ b/mlte/store/custom_list/qa_categories/testability.json @@ -0,0 +1,4 @@ +{ + "name": "Testability", + "description": "Testability" +} \ No newline at end of file diff --git a/mlte/store/custom_list/qa_categories/trust.json b/mlte/store/custom_list/qa_categories/trust.json new file mode 100644 index 000000000..95b2f742b --- /dev/null +++ b/mlte/store/custom_list/qa_categories/trust.json @@ -0,0 +1,4 @@ +{ + "name": "Trust", + "description": "Trust" +} \ No newline at end of file diff --git a/mlte/store/custom_list/quality_attributes/__init__.py b/mlte/store/custom_list/quality_attributes/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/mlte/store/custom_list/quality_attributes/resilience.json b/mlte/store/custom_list/quality_attributes/resilience.json new file mode 100644 index 000000000..565234fce --- /dev/null +++ b/mlte/store/custom_list/quality_attributes/resilience.json @@ -0,0 +1,4 @@ +{ + "name": "Resilience", + "description": "Resilience" +} \ No newline at end of file From 8bb3aadf10ed4883c7099ac1841ff36f9606576d Mon Sep 17 00:00:00 2001 From: Alex Derr Date: Wed, 8 Jan 2025 16:23:14 -0500 Subject: [PATCH 07/22] Typos and dynamic date in footer --- mlte/artifact/model.py | 4 ++-- mlte/catalog/model.py | 4 ++-- .../frontend/nuxt-app/layouts/base-layout.vue | 4 +++- mlte/store/artifact/underlying/fs.py | 2 +- mlte/store/catalog/underlying/fs.py | 4 ++-- mlte/store/query.py | 22 +++++++++---------- mlte/store/user/underlying/fs.py | 8 +++---- 7 files changed, 25 insertions(+), 23 deletions(-) diff --git a/mlte/artifact/model.py b/mlte/artifact/model.py index de0742049..7874f9f31 100644 --- a/mlte/artifact/model.py +++ b/mlte/artifact/model.py @@ -13,7 +13,7 @@ from mlte.negotiation.model import NegotiationCardModel from mlte.report.model import ReportModel from mlte.spec.model import SpecModel -from mlte.store.query import Filtrable +from mlte.store.query import Filterable from mlte.validation.model import ValidatedSpecModel from mlte.value.model import ValueModel @@ -36,7 +36,7 @@ class ArtifactHeaderModel(BaseModel): model_config = ConfigDict(use_enum_values=True) -class ArtifactModel(Filtrable): +class ArtifactModel(Filterable): """The base model for all MLTE artifacts.""" header: ArtifactHeaderModel diff --git a/mlte/catalog/model.py b/mlte/catalog/model.py index 1dc13d36a..15f98e027 100644 --- a/mlte/catalog/model.py +++ b/mlte/catalog/model.py @@ -9,7 +9,7 @@ from strenum import StrEnum from mlte.model import BaseModel -from mlte.store.query import Filtrable +from mlte.store.query import Filterable class CatalogEntryType(StrEnum): @@ -44,7 +44,7 @@ class CatalogEntryHeader(BaseModel): """The id of the catalog this entry came from.""" -class CatalogEntry(Filtrable): +class CatalogEntry(Filterable): """The base model for MLTE catalog entries.""" header: CatalogEntryHeader diff --git a/mlte/frontend/nuxt-app/layouts/base-layout.vue b/mlte/frontend/nuxt-app/layouts/base-layout.vue index 4c687f944..eb43d7efb 100644 --- a/mlte/frontend/nuxt-app/layouts/base-layout.vue +++ b/mlte/frontend/nuxt-app/layouts/base-layout.vue @@ -114,7 +114,7 @@