Skip to content

Commit

Permalink
Another pass for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-aderr committed Dec 16, 2024
1 parent 1cd236d commit d38c8f4
Show file tree
Hide file tree
Showing 34 changed files with 103 additions and 103 deletions.
2 changes: 1 addition & 1 deletion demo/scenarios/1_requirements.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In MLTE, we define requirements by constructing a specification (`Spec`). For each qa category, we define the validations to perform as well. Note that several new `Value` types (`MultipleAccuracy`, `RankSums`, `MultipleRanksums`) had to be created to define the validation methods that will validate each Condition."
"In MLTE, we define requirements by constructing a specification (`Spec`). For each QA category, we define the validations to perform as well. Note that several new `Value` types (`MultipleAccuracy`, `RankSums`, `MultipleRanksums`) had to be created to define the validation methods that will validate each Condition."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions demo/scenarios/properties/accuracy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

class Accuracy(QACategory):
"""
The Accuracy qa category reflects the overall functional accuracy of a model.
The Accuracy QA category reflects the overall functional accuracy of a model.
"""

def __init__(self, rationale: str):
"""Initialize a Accuracy instance."""
super().__init__(
instance=self,
description="""
The Accuracy qa category assesses the total predictive performance requirements of a
The Accuracy QA category assesses the total predictive performance requirements of a
model and system. These requirements are typically given as a single real valued number.
""",
rationale=rationale,
Expand Down
4 changes: 2 additions & 2 deletions demo/scenarios/properties/interoperability.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

class Interoperability(QACategory):
"""
The Interoperability qa category reflects contract requirements on model interfaces.
The Interoperability QA category reflects contract requirements on model interfaces.
"""

def __init__(self, rationale: str):
"""Initialize a Interoperability instance."""
super().__init__(
instance=self,
description="""
The Interoperability qa category evaluates the requirements on the
The Interoperability QA category evaluates the requirements on the
interfaces to a model and system. These requirements may be expressed in a variety of ways,
including requriements on line formats in log files, timestamps, and log content.
""",
Expand Down
4 changes: 2 additions & 2 deletions demo/scenarios/properties/monitorability.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

class Monitorability(QACategory):
"""
The Monitorability qa category reflects monitoring requirements.
The Monitorability QA category reflects monitoring requirements.
"""

def __init__(self, rationale: str):
"""Initialize a Monitorability instance."""
super().__init__(
instance=self,
description="""
The Monitorability qa category assesses the monitoring requirements of a
The Monitorability QA category assesses the monitoring requirements of a
model and system. These requirements may be expressed in a variety of ways,
including requriements on line formats in log files, timestamps, and log content.
""",
Expand Down
4 changes: 2 additions & 2 deletions demo/scenarios/properties/resilience.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

class Resilience(QACategory):
"""
The Resilience qa category reflects ...
The Resilience QA category reflects ...
"""

def __init__(self, rationale: str):
"""Initialize a Resilience instance."""
super().__init__(
instance=self,
description="""
The Resilience qa category assesses if a component is able to continue
The Resilience QA category assesses if a component is able to continue
to carry out its mission in the face of adversity (i.e., if it provides required
capabilities despite excessive stresses that can cause disruptions).
""",
Expand Down
2 changes: 1 addition & 1 deletion demo/simple/requirements.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"source": [
"#### Build a `Specification`\n",
"\n",
"In MLTE, we define requirements by constructing a specification (`Spec`). For each qa category, we define the validations to perform as well."
"In MLTE, we define requirements by constructing a specification (`Spec`). For each QA category, we define the validations to perform as well."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion mlte/catalog/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class CatalogEntry(Filtrable):
"""Tags for the problem for the entry."""

qa_category: Optional[str] = None
"""The qa category for the entry."""
"""The QA category for the entry."""

quality_attribute: Optional[str] = None
"""The quality attribute for the entry."""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$defs": {
"ConditionModel": {
"description": "A description of a condition for a qa category.",
"description": "A description of a condition for a QA category.",
"properties": {
"name": {
"title": "Name",
Expand Down Expand Up @@ -31,7 +31,7 @@
"type": "object"
},
"QACategoryModel": {
"description": "A description of a qa category.",
"description": "A description of a QA category.",
"properties": {
"name": {
"title": "Name",
Expand Down Expand Up @@ -98,7 +98,7 @@
"items": {
"$ref": "#/$defs/QACategoryModel"
},
"title": "Qa Categories",
"title": "QA Categories",
"type": "array"
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$defs": {
"ConditionModel": {
"description": "A description of a condition for a qa category.",
"description": "A description of a condition for a QA category.",
"properties": {
"name": {
"title": "Name",
Expand Down Expand Up @@ -75,7 +75,7 @@
"type": "object"
},
"QACategoryModel": {
"description": "A description of a qa category.",
"description": "A description of a QA category.",
"properties": {
"name": {
"title": "Name",
Expand Down Expand Up @@ -172,7 +172,7 @@
"items": {
"$ref": "#/$defs/QACategoryModel"
},
"title": "Qa Categories",
"title": "QA Categories",
"type": "array"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
}
],
"default": null,
"title": "Qa Category"
"title": "QA Category"
},
"quality_attribute": {
"anyOf": [
Expand Down
22 changes: 11 additions & 11 deletions mlte/qa_category/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
mlte/qa_category/base.py
The superclass for all model qa categories.
The superclass for all model QACategory.
"""

from __future__ import annotations
Expand All @@ -16,7 +16,7 @@


class QACategory(metaclass=abc.ABCMeta):
"""The QACategory type represents an abstract model qa category."""
"""The QACategory type represents an abstract model QA category."""

@classmethod
def __subclasshook__(cls, subclass):
Expand All @@ -33,26 +33,26 @@ def __init__(
Initialize a QACategory instance.
:param instance: The derived QACategory we are constructing from.
:param description: The description of the qa category
:param rationale: The rationale for using the qa category
:param description: The description of the QACategory
:param rationale: The rationale for using the QACategory
"""
self.name: str = instance.__class__.__name__
"""The name of the qa category."""
"""The name of the QACategory."""

self.description: str = cleantext(description)
"""The description of the qa category."""
"""The description of the QACategory."""

self.rationale: str = rationale
"""The rationale for using the qa category."""
"""The rationale for using the QACategory."""

self.module: str = instance.__module__
"""The name of the module the qa category is defined in."""
"""The name of the module the QACategory is defined in."""

def to_model(self) -> QACategoryModel:
"""
Return a QACategory as a model.
:return: The qa category as its model.
:return: The QACategory as its model.
"""
return QACategoryModel(
name=self.name,
Expand All @@ -68,7 +68,7 @@ def from_model(cls, model: QACategoryModel) -> QACategory:
:param model: The model with the QACategory info.
:return: The loaded qa category
:return: The loaded QACategory
"""
if model.name == "":
raise RuntimeError(
Expand All @@ -89,5 +89,5 @@ def from_model(cls, model: QACategoryModel) -> QACategory:
f"QACategory {model.name} in module {module_path} not found"
)

# Instantiate the qa category
# Instantiate the QACategory
return class_(model.rationale) # type: ignore
12 changes: 6 additions & 6 deletions mlte/qa_category/costs/predicting_compute_cost.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""
PredictingComputeCost qa category definition.
PredictingComputeCost QACategory definition.
"""

from mlte.qa_category.base import QACategory


class PredictingComputeCost(QACategory):
"""
The PredictingComputeCost qa category reflects the costs
The PredictingComputeCost QACategory reflects the costs
of model predicting associated with compute resources.
"""

Expand All @@ -18,12 +18,12 @@ def __init__(self, rationale: str):
super().__init__(
instance=self,
description="""
The PredictingComputeCost qa category assesses the
The PredictingComputeCost QACategory assesses the
computational requirements of model predicting.
This might be measured in terms of CPU utilization
for qa category processes that run locally,
or the cost of compute resources required for qa
category processes that run on on-demand cloud
for QACategory processes that run locally,
or the cost of compute resources required for QACategory
processes that run on on-demand cloud
infrastructure.
""",
rationale=rationale,
Expand Down
10 changes: 5 additions & 5 deletions mlte/qa_category/costs/predicting_memory_cost.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""
PredictingMemoryCost qa category definition.
PredictingMemoryCost QACategory definition.
"""

from mlte.qa_category.base import QACategory


class PredictingMemoryCost(QACategory):
"""
The PredictingMemoryCost qa category reflects the cost
The PredictingMemoryCost QACategory reflects the cost
of model predicting associated with memory resources.
"""

Expand All @@ -18,11 +18,11 @@ def __init__(self, rationale: str):
super().__init__(
instance=self,
description="""
The PredictingMemoryCost qa category assesses the
The PredictingMemoryCost QACategory assesses the
memory requirements of model predicting. This might
be measured by the memory requirements of qa category
be measured by the memory requirements of QACategory
processes that run locally, or the cost of memory
resources required for qa category processes that run
resources required for QACategory processes that run
on on-demand cloud infrastructure.
""",
rationale=rationale,
Expand Down
6 changes: 3 additions & 3 deletions mlte/qa_category/costs/storage_cost.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
"""
mlte/qa_category/costs/storage_cost.py
StorageCost qa category definition.
StorageCost QACategory definition.
"""

from mlte.qa_category.base import QACategory


class StorageCost(QACategory):
"""
The StorageCost qa category reflects the cost of model storage.
The StorageCost QACategory reflects the cost of model storage.
"""

def __init__(self, rationale: str):
"""Initialize a StorageCost instance."""
super().__init__(
instance=self,
description="""
The StorageCost qa category assesses the storage requirements of a
The StorageCost QACategory assesses the storage requirements of a
model. These requirements may be expressed in a variety of ways,
including the physical size of the model when it is persisted
to stable storage, or the number of parameters it contains.
Expand Down
6 changes: 3 additions & 3 deletions mlte/qa_category/costs/training_compute_cost.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"""
mlte/qa_category/costs/training_compute_cost.py
TrainingComputeCost qa category definition.
TrainingComputeCost QACategory definition.
"""

from mlte.qa_category.base import QACategory


class TrainingComputeCost(QACategory):
"""
The TrainingComputeCost qa category reflects the costs
The TrainingComputeCost QACategory reflects the costs
of model training associated with compute resources.
"""

Expand All @@ -20,7 +20,7 @@ def __init__(self, rationale: str):
super().__init__(
instance=self,
description="""
The TrainingComputeCost qa category assesses the
The TrainingComputeCost QACategory assesses the
computational requirements of model training.
This might be measured in terms of CPU utilization
for training processes that run locally, or the cost
Expand Down
6 changes: 3 additions & 3 deletions mlte/qa_category/costs/training_memory_cost.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"""
mlte/qa_category/costs/training_memory_cost.py
TrainingMemoryCost qa category definition.
TrainingMemoryCost QACategory definition.
"""

from mlte.qa_category.base import QACategory


class TrainingMemoryCost(QACategory):
"""
The TrainingMemoryCost qa category reflects the cost
The TrainingMemoryCost QACategory reflects the cost
of model training associated with memory resources.
"""

Expand All @@ -20,7 +20,7 @@ def __init__(self, rationale: str):
super().__init__(
instance=self,
description="""
The TrainingMemoryCost qa category assesses the
The TrainingMemoryCost QACategory assesses the
memory requirements of model training. This might
be measured by the memory requirements of training
processes that run locally, or the cost of memory
Expand Down
4 changes: 2 additions & 2 deletions mlte/qa_category/fairness/fairness.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""
Fairness qa category definition.
Fairness QACategory definition.
"""

from mlte.qa_category.base import QACategory


class Fairness(QACategory):
"""
Defintion of the Fairness qa category.
Defintion of the Fairness QACategory.
"""

def __init__(self, rationale: str):
Expand Down
Loading

0 comments on commit d38c8f4

Please sign in to comment.