bessagroup / f3dasm

Framework for Data-Driven Design & Analysis of Structures & Materials (F3DASM)
https://f3dasm.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
111 stars 29 forks source link

experimentdata can not read from csv file #221

Closed JiaxiangYi96 closed 10 months ago

JiaxiangYi96 commented 10 months ago

when I am using f3dsm to get my experimentdata from file, it does't work. So the issue is
"" file_path = Path('/home/jiaxiangyi/Documents/rvesimulator/examples/cddm/f3dasm_integration/design_of_experiments.csv') data = f3dasm.ExperimentData.from_file(filename=file_path) "" If I ran the above code, I will receive en error that "file is not found" and if I delete the ".csv" at the very end, it also showed the same error. The "design_of_experiments.csv" file is in the path. I can use pandas.read_csv to retrive it, but with f3dasm it does't work.

mpvanderschelling commented 10 months ago

Hey Yaga,

I'll update the documentation about the from_file method (#222). The from_file method is for loading the ExperimentData when you have already created the ExperimentData object before and stored it to disk. It requires you to have <name>_input.csv, <name>_output.csv, <name>_domain.pkl and <name>_jobs.pkl files already.

If you want to load the input data and/or output data from a csv file, you can do that by constructing the object and giving the name of the .csv file:

experimentdata = Experimentdata(input_data='path/to/inputdata.csv', output_data='path/to/outputdata.csv')
JiaxiangYi96 commented 10 months ago

thanks, I will try it out