MCPcopy Create free account
hub / github.com/Kitware/COAT / create_small_table

Function create_small_table

utils/utils.py:383–403  ·  view source on GitHub ↗

Create a small table using the keys of small_dict as headers. This is only suitable for small dictionaries. Args: small_dict (dict): a result dictionary of only a few items. Returns: str: the table as a string.

(small_dict)

Source from the content-addressed store, hash-verified

381# Misc #
382# -------------------------------------------------------- #
383def create_small_table(small_dict):
384 """
385 Create a small table using the keys of small_dict as headers. This is only
386 suitable for small dictionaries.
387
388 Args:
389 small_dict (dict): a result dictionary of only a few items.
390
391 Returns:
392 str: the table as a string.
393 """
394 keys, values = tuple(zip(*small_dict.items()))
395 table = tabulate(
396 [values],
397 headers=keys,
398 tablefmt="pipe",
399 floatfmt=".3f",
400 stralign="center",
401 numalign="center",
402 )
403 return table
404
405
406def warmup_lr_scheduler(optimizer, warmup_iters, warmup_factor):

Callers 1

print_statisticsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected