Skip to content

Commit 74cb120

Browse files
committed
fixed docstrings
Signed-off-by: yiliu30 <yi4.liu@intel.com>
1 parent 71571fb commit 74cb120

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

neural_compressor/utils/utility.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,14 @@ def _detect_cores():
262262

263263
@property
264264
def cores(self):
265+
"""Get the number of cores in platform."""
265266
if self._cores is None:
266267
self._cores = self._detect_cores()
267268
return self._cores
268269

269270
@cores.setter
270271
def cores(self, num_of_cores):
272+
"""Set the number of cores in platform."""
271273
self._cores = num_of_cores
272274

273275
@property
@@ -289,17 +291,17 @@ def cores_per_socket(self) -> int:
289291

290292
@property
291293
def sockets(self):
294+
"""Get the number of sockets in platform."""
292295
if self._sockets is None:
293296
self._sockets = self._get_number_of_sockets()
294297
return self._sockets
295298

296299
@sockets.setter
297300
def sockets(self, num_of_sockets):
301+
"""Set the number of sockets in platform."""
298302
self._sockets = num_of_sockets
299303

300304
def _get_number_of_sockets(self) -> int:
301-
"""Get number of sockets in platform."""
302-
303305
if "arch" in self._info and "ARM" in self._info["arch"]: # pragma: no cover
304306
return 1
305307

0 commit comments

Comments
 (0)