From a074531f67b01b5f03e717a6a950dd38cc5d9e83 Mon Sep 17 00:00:00 2001 From: nabenabe0928 Date: Sun, 30 Jan 2022 10:26:18 +0900 Subject: [PATCH] [fix] Change int to np.int32 for the ndarray dtype specification --- .../setup/network_embedding/base_network_embedding.py | 2 +- autoPyTorch/pipeline/create_searchspace_util.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autoPyTorch/pipeline/components/setup/network_embedding/base_network_embedding.py b/autoPyTorch/pipeline/components/setup/network_embedding/base_network_embedding.py index 8652c347c..2f3c5fb3c 100644 --- a/autoPyTorch/pipeline/components/setup/network_embedding/base_network_embedding.py +++ b/autoPyTorch/pipeline/components/setup/network_embedding/base_network_embedding.py @@ -44,7 +44,7 @@ def _get_args(self, X: Dict[str, Any]) -> Tuple[int, np.ndarray]: num_numerical_columns = numerical_column_transformer.transform( X_train[:, X['dataset_properties']['numerical_columns']]).shape[1] num_input_features = np.zeros((num_numerical_columns + len(X['dataset_properties']['categorical_columns'])), - dtype=int) + dtype=np.int32) categories = X['dataset_properties']['categories'] for i, category in enumerate(categories): diff --git a/autoPyTorch/pipeline/create_searchspace_util.py b/autoPyTorch/pipeline/create_searchspace_util.py index f66371917..640a787e2 100644 --- a/autoPyTorch/pipeline/create_searchspace_util.py +++ b/autoPyTorch/pipeline/create_searchspace_util.py @@ -47,7 +47,7 @@ def get_match_array( matches_dimensions = [len(choices) for choices in node_i_choices] # Start by allowing every combination of nodes. Go through all # combinations/pipelines and erase the illegal ones - matches = np.ones(matches_dimensions, dtype=int) + matches = np.ones(matches_dimensions, dtype=np.int32) # TODO: Check if we need this, like are there combinations from the # pipeline we should dynamically avoid?