Skip to content

Commit 6613ded

Browse files
committed
fixed some tpos
1 parent a9b3ed3 commit 6613ded

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

nodescraper/plugins/inband/amdsmi/amdsmidata.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,16 @@ class AmdSmiBaseModel(BaseModel):
6262
extra="forbid", # Forbid extra fields not defined in the model
6363
)
6464

65-
# During building if a field contains a ValueUnit in its tuple, convert input into a ValueUnit
6665
def __init__(self, **data):
67-
# Convert all fields that are supposed to be ValueUnit to ValueUnit if they are int | str | float
66+
# Convert int | str | float -> ValueUnit
6867
for field_name, field_type in self.model_fields.items():
6968
annotation = field_type.annotation
7069
target_type, container = find_annotation_in_container(annotation, ValueUnit)
7170
if target_type is None:
7271
continue
7372

7473
if field_name in data and isinstance(data[field_name], (int, str, float)):
75-
# If the field is a primitive type, convert it to ValueUnit dict and let validtor handle it
74+
# If the field is a primitive type, convert it to ValueUnit dict for validator
7675
data[field_name] = {
7776
"value": data[field_name],
7877
"unit": "",
@@ -104,7 +103,6 @@ def na(x) -> bool:
104103
if na(v):
105104
return None
106105

107-
# Dict form: normalize value and possibly extract unit
108106
if isinstance(v, dict):
109107
val = v.get("value")
110108
unit = v.get("unit", "")
@@ -218,7 +216,7 @@ def _stringify(cls, v):
218216

219217

220218
class PartitionAccelerator(BaseModel):
221-
"""Contains the tition data for the GPUs"""
219+
"""Accelerator partition data"""
222220

223221
gpu_id: int
224222
memory: str | None = None
@@ -392,6 +390,8 @@ class StaticClockData(BaseModel):
392390

393391

394392
class AmdSmiStatic(BaseModel):
393+
"""Contains all static data"""
394+
395395
gpu: int
396396
asic: StaticAsic
397397
bus: StaticBus

nodescraper/plugins/inband/amdsmi/analyzer_args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
class AmdSmiAnalyzerArgs(AnalyzerArgs):
3232

33-
check_static_data: bool = True
33+
check_static_data: bool = False
3434
expected_gpu_processes: Optional[int] = None
3535
expected_max_power: Optional[int] = None
3636
expected_driver_version: Optional[str] = None

0 commit comments

Comments
 (0)