Spaces:
Sleeping
Sleeping
KrisKeshav commited on
small changes
Browse filesRemove redundant comments in coerce_attack_params method.
- src/models.py +1 -3
src/models.py
CHANGED
|
@@ -53,9 +53,7 @@ class State(BaseModel):
|
|
| 53 |
@classmethod
|
| 54 |
def coerce_attack_params(cls, values: Dict[str, Any]) -> Dict[str, Any]:
|
| 55 |
"""
|
| 56 |
-
|
| 57 |
-
sample_*_params() casts with float()/int() but a future contributor
|
| 58 |
-
may forget. This validator ensures JSON serialization never fails due
|
| 59 |
to np.float32 / np.int64 / np.bool_ leaking into the params dict.
|
| 60 |
"""
|
| 61 |
params = values.get("attack_params", {})
|
|
|
|
| 53 |
@classmethod
|
| 54 |
def coerce_attack_params(cls, values: Dict[str, Any]) -> Dict[str, Any]:
|
| 55 |
"""
|
| 56 |
+
This validator ensures JSON serialization never fails due
|
|
|
|
|
|
|
| 57 |
to np.float32 / np.int64 / np.bool_ leaking into the params dict.
|
| 58 |
"""
|
| 59 |
params = values.get("attack_params", {})
|