In tutorial0 (or wherever Plugins is used) I encounter the following error:
A non-annotated attribute was detected: protected_cols = ['seq_id']. All model fields require a type annotation; if protected_cols is not meant to be a field, you may be able to resolve this error by annotating it as a ClassVar or updating model_config['ignored_types'].
protected_cols is defined in schema.py:
`class Schema(BaseModel):
"""
.. inheritance-diagram:: synthcity.plugins.core.schema.Schema
:parts: 1
Utility class for defining the schema of a Dataset.
Constructor Args:
domain: Dict
A dictionary of feature_name: Distribution.
sampling_strategy: str
Taking value of "marginal" (default) or "uniform" (for debugging).
protected_cols: List[str]
List of columns that are exempt from distributional constraints (e.g. ID column)
random_state: int
Random seed (default 0)
data: Any
(Optional) the data set
"""
sampling_strategy: str = "marginal" # uniform or marginal
protected_cols = ["seq_id"]
random_state: int = 0
data: Any = None
domain: Dict = {}`
How to Reproduce
Clone repository, install synthcity and run tutorial0 or import Plugins.
Description
In tutorial0 (or wherever Plugins is used) I encounter the following error: A non-annotated attribute was detected:
protected_cols = ['seq_id']
. All model fields require a type annotation; ifprotected_cols
is not meant to be a field, you may be able to resolve this error by annotating it as aClassVar
or updatingmodel_config['ignored_types']
.protected_cols is defined in schema.py: `class Schema(BaseModel): """ .. inheritance-diagram:: synthcity.plugins.core.schema.Schema :parts: 1
How to Reproduce
Clone repository, install synthcity and run tutorial0 or import Plugins.
Expected Behavior
-
Screenshots
-
System Information
Additional Context
Add any other context about the problem here.