Skip to content

Commit

Permalink
Merge pull request #304 from ZJUEarthData/dev/Mengqi_1
Browse files Browse the repository at this point in the history
perf: improve the selection of inference data for transform pipeline.
  • Loading branch information
SanyHe authored Feb 27, 2024
2 parents f329ae8 + f2bd6d1 commit 2872da2
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions geochemistrypi/data_mining/cli_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,22 +201,21 @@ def cli_pipeline(training_data_path: str, application_data_path: Optional[str] =
# <--- Built-in Application Data Loading --->
logger.debug("Built-in Application Data Loading")
# If the user doesn't provide training data path and inference data path, then use the built-in inference data.
if is_built_in_inference_data:
print("-*-*- Built-in Application Data Option-*-*-")
num2option(TEST_DATA_OPTION)
built_in_inference_data_num = limit_num_input(TEST_DATA_OPTION, SECTION[0], num_input)
if built_in_inference_data_num == 1:
application_data_path = "InferenceData_Regression.xlsx"
elif built_in_inference_data_num == 2:
application_data_path = "InferenceData_Classification.xlsx"
elif built_in_inference_data_num == 3:
application_data_path = "InferenceData_Clustering.xlsx"
elif built_in_inference_data_num == 4:
application_data_path = "InferenceData_Decomposition.xlsx"
if is_built_in_inference_data and built_in_training_data_num == 1:
application_data_path = "InferenceData_Regression.xlsx"
inference_data = read_data(file_path=application_data_path)
print(f"Successfully loading the built-in inference data set '{application_data_path}'.")
show_data_columns(inference_data.columns)
clear_output()
elif is_built_in_inference_data and built_in_training_data_num == 2:
application_data_path = "InferenceData_Classification.xlsx"
inference_data = read_data(file_path=application_data_path)
print(f"Successfully loading the built-in inference data set '{application_data_path}'.")
show_data_columns(inference_data.columns)
elif is_built_in_inference_data and built_in_training_data_num == 3:
inference_data = None
elif is_built_in_inference_data and built_in_training_data_num == 4:
inference_data = None
clear_output()

# <--- World Map Projection --->
logger.debug("World Map Projection")
Expand Down

0 comments on commit 2872da2

Please sign in to comment.