@ -25,10 +25,10 @@ class GPUDevice:
|
||||
name = self.name
|
||||
peak_memory_bandwidth = self.peak_memory_bandwidth
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if id is not UNSET:
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if id is not UNSET:
|
||||
field_dict['id'] = id
|
||||
if memory_bus_width is not UNSET:
|
||||
field_dict['memory_bus_width'] = memory_bus_width
|
||||
@ -44,31 +44,29 @@ class GPUDevice:
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
id = d.pop("id", UNSET)
|
||||
id = d.pop("id", UNSET)
|
||||
|
||||
memory_bus_width = d.pop("memory_bus_width", UNSET)
|
||||
memory_bus_width = d.pop("memory_bus_width", UNSET)
|
||||
|
||||
memory_clock_rate = d.pop("memory_clock_rate", UNSET)
|
||||
memory_clock_rate = d.pop("memory_clock_rate", UNSET)
|
||||
|
||||
name = d.pop("name", UNSET)
|
||||
name = d.pop("name", UNSET)
|
||||
|
||||
peak_memory_bandwidth = d.pop("peak_memory_bandwidth", UNSET)
|
||||
peak_memory_bandwidth = d.pop("peak_memory_bandwidth", UNSET)
|
||||
|
||||
gpu_device = cls(
|
||||
id=id,
|
||||
memory_bus_width=memory_bus_width,
|
||||
memory_clock_rate=memory_clock_rate,
|
||||
name=name,
|
||||
peak_memory_bandwidth=peak_memory_bandwidth,
|
||||
)
|
||||
gpu_device = cls(
|
||||
id=id,
|
||||
memory_bus_width=memory_bus_width,
|
||||
memory_clock_rate=memory_clock_rate,
|
||||
name=name,
|
||||
peak_memory_bandwidth=peak_memory_bandwidth,
|
||||
)
|
||||
|
||||
gpu_device.additional_properties = d
|
||||
gpu_device.additional_properties = d
|
||||
return gpu_device
|
||||
|
||||
|
||||
return gpu_device
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
|
Reference in New Issue
Block a user