Skip to content

Commit 8da3f35

Browse files
authored
Merge branch 'master' into gaugup/AddScheduledBuilds
2 parents ee9b4e3 + 00dd40a commit 8da3f35

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

dice_ml/counterfactual_explanations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def to_json(self):
166166
combined_test_instance_list.append(serialized_cf_examples[
167167
_DiverseCFV2SchemaConstants.TEST_INSTANCE_LIST])
168168
combined_final_cfs_list.append(serialized_cf_examples[
169-
_DiverseCFV2SchemaConstants.FIANL_CFS_LIST])
169+
_DiverseCFV2SchemaConstants.FINAL_CFS_LIST])
170170
data_interface = serialized_cf_examples[
171171
_DiverseCFV2SchemaConstants.DATA_INTERFACE]
172172
feature_names = serialized_cf_examples[
@@ -252,7 +252,7 @@ def from_json(json_str):
252252
# counterfactual example.
253253
cf_examples_str = json.dumps(
254254
{
255-
_DiverseCFV2SchemaConstants.FIANL_CFS_LIST: json_dict[
255+
_DiverseCFV2SchemaConstants.FINAL_CFS_LIST: json_dict[
256256
_CounterfactualExpV2SchemaConstants.CFS_LIST][index],
257257
_DiverseCFV2SchemaConstants.TEST_INSTANCE_LIST: json_dict[
258258
_CounterfactualExpV2SchemaConstants.TEST_DATA][index],

dice_ml/diverse_counterfactuals.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class _DiverseCFV2SchemaConstants:
2424
FEATURE_NAMES_INCLUDING_TARGET = 'feature_names_including_target'
2525
FEATURE_NAMES = 'feature_names'
2626
TEST_INSTANCE_LIST = 'test_instance_list'
27-
FIANL_CFS_LIST = 'final_cfs_list'
27+
FINAL_CFS_LIST = 'final_cfs_list'
2828

2929

3030
def json_converter(obj):
@@ -199,7 +199,7 @@ def to_json(self, serialization_version):
199199

200200
alternate_obj = {
201201
_DiverseCFV2SchemaConstants.TEST_INSTANCE_LIST: test_instance_df_as_list,
202-
_DiverseCFV2SchemaConstants.FIANL_CFS_LIST: final_cfs_df_as_as_list,
202+
_DiverseCFV2SchemaConstants.FINAL_CFS_LIST: final_cfs_df_as_as_list,
203203
_DiverseCFV2SchemaConstants.DATA_INTERFACE: dummy_data_interface_dict,
204204
_DiverseCFV2SchemaConstants.FEATURE_NAMES: feature_names,
205205
_DiverseCFV2SchemaConstants.FEATURE_NAMES_INCLUDING_TARGET: feature_names_including_target,
@@ -231,7 +231,7 @@ def from_json(cf_example_json_str):
231231
desired_range=cf_example_dict[_DiverseCFV1SchemaConstants.DESIRED_RANGE],
232232
model_type=cf_example_dict[_DiverseCFV1SchemaConstants.MODEL_TYPE])
233233
else:
234-
final_cfs_list = cf_example_dict[_DiverseCFV2SchemaConstants.FIANL_CFS_LIST]
234+
final_cfs_list = cf_example_dict[_DiverseCFV2SchemaConstants.FINAL_CFS_LIST]
235235
test_instance_list = cf_example_dict[_DiverseCFV2SchemaConstants.TEST_INSTANCE_LIST]
236236
feature_names_including_target = cf_example_dict[_DiverseCFV2SchemaConstants.FEATURE_NAMES_INCLUDING_TARGET]
237237

requirements-test.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ pytest
55
pytest-cov
66
twine
77
pytest-mock
8+
9+
# Pin scikit-learn
10+
scikit-learn<1.1.2

0 commit comments

Comments
 (0)