Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2022-02-27 21:34:21 -08:00
parent 0b9c32e6bf
commit 9c18ba2350
13 changed files with 205 additions and 183 deletions

View File

@ -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: