crooked-lifeguard-46802
10/05/2023, 1:10 PMclass ExperimentType(Enum):
FRAUD: "fraud"
SIMILARITY: "similarity"
@task
def preprocess(data_path: str, experiment_type: ExperimentType):
# common preprocessing
data_path = common_preprocessing(data_path)
# experiment specific preprocessing
if experiment_type == ExperimentType.FRAUD:
preprocessed_path = fraud_preprocessing(data_path)
elif experiment_type == ExperimentType.SIMILARITY:
preprocessed_path = similarity_preprocessing(data_path)
# another step of processing
return final_preprocessing(preprocessed_path)
The hard thing right now is to maintain the enums and threading those through the entire pipeline + if-else ladders. If we can pass a function to the preprocess task, that would make the code quite a lot simpler.freezing-airport-6809
freezing-airport-6809
crooked-lifeguard-46802
10/05/2023, 2:30 PMfreezing-airport-6809
crooked-lifeguard-46802
10/05/2023, 2:34 PMfreezing-airport-6809
freezing-airport-6809
crooked-lifeguard-46802
10/05/2023, 7:11 PMable to use pickle alreadySay more? You mean use the PickleTransformer?
tall-lock-23197