Skip to content

Commit

Permalink
Update configurator.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Wicknight committed May 13, 2023
1 parent 767159d commit d038632
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions recbole_cdr/config/configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def __init__(self, model=None, config_file_list=None, config_dict=None):
config_file_list (list of str): the external config file, it allows multiple config files, default is None.
config_dict (dict): the external parameter dictionaries, default is None.
"""
self.compatibility_settings()
self._init_parameters_category()
self.parameters['Dataset'] += ['source_domain', 'target_domain']
self.yaml_loader = self._build_yaml_loader()
Expand Down Expand Up @@ -283,3 +284,14 @@ def update(self, other_config):
for key in other_config:
new_config_obj.final_config_dict[key] = other_config[key]
return new_config_obj

def compatibility_settings(self):
import numpy as np
np.bool = np.bool_
np.int = np.int_
np.float = np.float_
np.complex = np.complex_
np.object = np.object_
np.str = np.str_
np.long = np.int_
np.unicode = np.unicode_

0 comments on commit d038632

Please sign in to comment.