From 33e72601fc6a28edcd0af6708ee00362224ef60e Mon Sep 17 00:00:00 2001 From: Igor Sugak Date: Tue, 12 Sep 2023 16:51:03 -0700 Subject: [PATCH] s,np.bool\b,bool, Summary: X-link: https://github.com/facebookresearch/Generic-Grouping/pull/16 X-link: https://github.com/facebookresearch/Detectron/pull/1047 X-link: https://github.com/facebookincubator/zstrong/pull/582 `np.bool` and `bool` are identical, but the former is removed from Numpy-1.24.X. Differential Revision: D49196618 --- mm_action_prediction/loaders/loader_base.py | 2 +- mm_action_prediction/loaders/loader_simmc.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm_action_prediction/loaders/loader_base.py b/mm_action_prediction/loaders/loader_base.py index d587cbd..df501ec 100644 --- a/mm_action_prediction/loaders/loader_base.py +++ b/mm_action_prediction/loaders/loader_base.py @@ -104,7 +104,7 @@ def _ship_helper(self, numpy_array): # int32 get mapped to int64 and float to double if numpy_array.dtype == np.int32 or numpy_array.dtype == np.int64: new_type = torch.int64 - elif numpy_array.dtype == np.bool: + elif numpy_array.dtype == bool: new_type = torch.bool else: new_type = torch.float diff --git a/mm_action_prediction/loaders/loader_simmc.py b/mm_action_prediction/loaders/loader_simmc.py index 6dae79f..1433a8b 100644 --- a/mm_action_prediction/loaders/loader_simmc.py +++ b/mm_action_prediction/loaders/loader_simmc.py @@ -461,7 +461,7 @@ def interactive_batch(self, input_str, round_id): { "user_utt": enc_in, "user_utt_len": enc_len, - "dialog_mask": np.ones((1, 1), dtype=np.bool), + "dialog_mask": np.ones((1, 1), dtype=bool), "round_id": np.array([round_id], dtype="int32"), } )