otx.core.utils.utils#
Utility functions.
Functions
|
Measure appropriate num_workers value and return it. |
|
Compute class statistics. |
|
Get object from import format string. |
|
Check the checkpoint will be used to finetune. |
|
Check the checkpoint where it comes from. |
|
Remove prefix from state_dict keys. |
- otx.core.utils.utils.get_adaptive_num_workers(num_dataloader: int = 1) int | None [source]#
Measure appropriate num_workers value and return it.
- otx.core.utils.utils.get_idx_list_per_classes(dm_dataset: DmDataset, use_string_label: bool = False) dict[int | str, list[int]] [source]#
Compute class statistics.
- otx.core.utils.utils.import_object_from_module(obj_path: str) Any [source]#
Get object from import format string.
- otx.core.utils.utils.is_ckpt_for_finetuning(ckpt: dict) bool [source]#
Check the checkpoint will be used to finetune.