base
mlte/qa_category/base.py
The superclass for all model QACategory.
QACategory
The QACategory type represents an abstract model QA category.
Source code in mlte/qa_category/base.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
description = cleantext(description)
instance-attribute
The description of the QACategory.
module = instance.__module__
instance-attribute
The name of the module the QACategory is defined in.
name = instance.__class__.__name__
instance-attribute
The name of the QACategory.
rationale = rationale
instance-attribute
The rationale for using the QACategory.
__init__(instance, description, rationale)
Initialize a QACategory instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instance
|
QACategory
|
The derived QACategory we are constructing from. |
required |
description
|
str
|
The description of the QACategory |
required |
rationale
|
str
|
The rationale for using the QACategory |
required |
Source code in mlte/qa_category/base.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
__subclasshook__(subclass)
classmethod
Define the interface for all concrete quality attribute categories.
Source code in mlte/qa_category/base.py
21 22 23 24 |
|
from_model(model)
classmethod
Load a QACategory instance from a model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model
|
QACategoryModel
|
The model with the QACategory info. |
required |
Returns:
Type | Description |
---|---|
QACategory
|
The loaded QACategory |
Source code in mlte/qa_category/base.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
to_model()
Return a QACategory as a model.
Returns:
Type | Description |
---|---|
QACategoryModel
|
The QACategory as its model. |
Source code in mlte/qa_category/base.py
51 52 53 54 55 56 57 58 59 60 61 62 |
|