Skip to content

Commit

Permalink
🐛 regression: merging branches lead to name mismatch
Browse files Browse the repository at this point in the history
- in case of no categorical variables, the error surfaced: input_config has to be used!
  • Loading branch information
Henry committed May 16, 2024
1 parent a7e6275 commit 6184235
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/move/tasks/encode_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def encode_data(config: DataConfig):

mappings = {}
for dataset_name in config.categorical_names:
# ! the string representation seems to be the variable value (here a string)
logger.info(f"Encoding '{dataset_name}'")
filepath = raw_data_path / f"{dataset_name}.tsv"
names, values = io.read_tsv(filepath, sample_names)
Expand All @@ -45,8 +46,9 @@ def encode_data(config: DataConfig):
for input_config in config.continuous_inputs:
scale = not hasattr(input_config, "scale") or input_config.scale
action_name = "Encoding" if scale else "Reading"
logger.info(f"{action_name} '{input_config.name}'")
filepath = raw_data_path / f"{input_config.name}.tsv"
dataset_name = input_config.name
logger.info(f"{action_name} '{dataset_name}'")
filepath = raw_data_path / f"{dataset_name}.tsv"
names, values = io.read_tsv(filepath, sample_names)

# Plotting the value distribution for all continuous datasets before preprocessing:
Expand Down

0 comments on commit 6184235

Please sign in to comment.