aspuru-guzik-group / olympus

Olympus: a benchmarking framework for noisy optimization and experiment planning
https://aspuru-guzik-group.github.io/olympus/
MIT License
81 stars 22 forks source link

Dataset Import in Windows OS #12

Open mwleklin opened 3 years ago

mwleklin commented 3 years ago

For windows users of python library I found that the datasets did not import correctly.

image

It appears the problem is related to the usage of splitting functions in the file path Within the init.py for the datsets sections the following code is executed. How the data is being split is dependent on the OS being used and this creates the issues for me. datasets_list = [] for dirname in glob.glob(f"{home}/dataset*"): dir_name = dir_name.split("/")[-1][8:] datasets_list.append(dir_name)

I changed the code to use only os

datasets_list = [] for dirname in os.scandir(home): if 'dataset' in os.path.split(dir_name)[-1][:8]: dir_name = os.path.split(dir_name)[-1][8:] datasets_list.append(dir_name)

I think this problem could occur in other locations and I'll update the bug as I see it

choudharynirmal commented 3 years ago

Hi, I also faced the same problem. Change the line number 66 in init file of surface as surface_name = dir_name.split('\')[-1][8:]

Do the same in planner, model init files.

rileyhickman commented 2 years ago

Hello both,

Thank you for correcting this bug for Windows users. Would you be willing to let me know a comprehensive list of instances within Olympus where this bug seems to occur? I can correct them in the next version of the code.