start new:
tmux
start new with session name:
tmux new -s myname
| def get_IV(df, feature, target): | |
| lst = [] | |
| # optional | |
| # df[feature] = df[feature].fillna("NULL") | |
| unique_values = df[feature].unique() | |
| for val in unique_values: | |
| lst.append([feature, # Feature name | |
| val, # Value of a feature (unique) |
| import torch | |
| from collections import OrderedDict | |
| def rename_state_dict_keys(source, key_transformation, target=None): | |
| """ | |
| source -> Path to the saved state dict. | |
| key_transformation -> Function that accepts the old key names of the state | |
| dict as the only argument and returns the new key name. | |
| target (optional) -> Path at which the new state dict should be saved |