IBM / federated-learning-lib

A library for federated learning (a distributed machine learning process) in an enterprise environment.
Other
500 stars 137 forks source link

Error when generating config files with "-f id3_dt" option #67

Closed joserafael-buendiar closed 3 years ago

joserafael-buendiar commented 3 years ago

I notice an error when generating config files with -f id3_dt option, it works fine with other options like '-f iter_avg'

python examples/generate_configs.py -f id3_dt -m sklearn -n 2 -d mnist -p examples/data/mnist/random

Using TensorFlow backend. Traceback (most recent call last): File "examples/generate_configs.py", line 344, in dataset, party_data_path, folder_configs, task_name) File "examples/generate_configs.py", line 250, in generate_agg_config model_config = generate_model_config(module, model, folder_configs, dataset, True) File "examples/generate_configs.py", line 217, in generate_model_config model = get_model_config(folder_configs, dataset, is_agg, party_id, model=model) File "/home/ubuntu/federated-learning-lib/examples/id3_dt/generate_configs.py", line 58, in get_model_config spec['list_of_features'] = list(range(loaded_data.shape[1] - 1)) UnboundLocalError: local variable 'loaded_data' referenced before assignment

joserafael-buendiar commented 3 years ago

I just fix it, the 'id3_dt' option could only be used for generating config files with adult and nursery datasets.