tabensemb.utils.utils#
All utilities used in the project.
Functions
|
If the input path exists, add a postfix |
|
Calculate metrics using |
A utility of |
|
|
Convert probabilities of classes to the class of each sample. |
|
Convert the class of each sample to class indicator. |
Return True if the debugger is currently active |
|
|
Calculate the |
|
Calculate the gini index of a feature. |
Check whether the current environment is a notebook. |
|
|
Calculate metrics using |
|
Represent a dictionary, a list, or a tuple by a string. |
|
Re-import the module. |
|
Make a previously not existing directory safely resolving conflicts. |
|
For the argument |
|
Set random seeds of pytorch (including cuda and dataloaders), numpy, and random. |
|
Set the random seed of pytorch, CUDA, and |
|
Convert a .csv type of string to a dataframe. |
|
Classes
A context manager that temporarily hide all |
|
|
A context manager that can temporarily hide all |
|
Capture all outputs to a log file while still printing it. |
|
Capture all outputs to a log file while still printing it. |
|
Turn a generator (not pickle-able) into a pickle-able object by extracting all items in the generator to a list. |
|
A context manager that can temporarily redirect all |
A controller of |
|
|
A context manager that temporarily changes the global setting |
A context manager that enabled gradient calculation. |