tyMadara / ILS-CSL

Supplementary materials and codes for the paper "Causal Structure Learning Supervised by Large Language Model"
10 stars 3 forks source link

Hi,error when running the quick start commend #1

Open javafish opened 11 months ago

javafish commented 11 months ago

Hi, I got below error when running the quick start commend:

javafish commented 11 months ago

❌ Wrong LLM answers in the history: 5 / 17 / 44 πŸ“ Write json file to out/gpt_history/gpt-4/asia_wrong.json. Traceback (most recent call last): File "/home/jia/δΈ‹θ½½/IJCAI 2024/Casual Structure learning/ILS-CSL-main/main.py", line 542, in icsl.iter_causal_structure_learning() File "/home/jia/δΈ‹θ½½/IJCAI 2024/Casual Structure learning/ILS-CSL-main/main.py", line 247, in iter_causal_structure_learning write_json(self.prior_iter, self.prior_iter_path) File "/home/jia/δΈ‹θ½½/IJCAI 2024/Casual Structure learning/ILS-CSL-main/utils.py", line 567, in write_json with open(json_path, "w", encoding=encoding) as f: FileNotFoundError: [Errno 2] No such file or directory: 'out/prior-iter/asia-250-1-CaMML-mml.json'

Can you please help?

tyMadara commented 11 months ago

you may make a dir out/prior-iter/ and try again

javafish commented 10 months ago

hi, i did try again and got this error: can you pls help?

πŸ“– Read txt file from prompt/start.txt. πŸ“– Read txt file from prompt/background.txt. πŸ“– Read txt file from prompt/question.txt. πŸ“– Read json file from prompt/domain.json. πŸ“– Read json file from prompt/description/asia.json. πŸ” Iteration: 1 Existing edges: [] Forbidden edges: [] Metrics: {'extra': 0, 'missing': 1, 'reverse': 2, 'fdr': 0.2857, 'tpr': 0.625, 'fpr': 0.1, 'shd': 3, 'nnz': 7, 'precision': 0.7143, 'recall': 0.625, 'F1': 0.6667, 'gscore': 0.375, 'iter_num': 1, 'time': 1.3387, 'exist_mode': 'edge'} Candidate edges: 7 πŸ“– Read json file from out/gpt_history/gpt-4/asia_history.json. πŸ” Already queried: tuberculosis->either_turb_or_lung_cancer (Ans: A / A) πŸ” Already queried: lung_cancer->smoking (Ans: B / B) πŸ” Already queried: lung_cancer->either_turb_or_lung_cancer (Ans: A / A) πŸ” Already queried: bronchitis->smoking (Ans: B / B) πŸ” Already queried: bronchitis->dyspnoea (Ans: A / A) πŸ” Already queried: either_turb_or_lung_cancer->positive_xray (Ans: A / A) πŸ” Already queried: either_turb_or_lung_cancer->dyspnoea (Ans: A / A) πŸ“ Write json file to out/summary/gpt-4/asia_summary.json. Traceback (most recent call last): File "/home/jia/δΈ‹θ½½/IJCAI 2024/Casual Structure learning/ILS-CSL-main/main.py", line 542, in icsl.iter_causal_structure_learning() File "/home/jia/δΈ‹θ½½/IJCAI 2024/Casual Structure learning/ILS-CSL-main/main.py", line 234, in iter_causal_structure_learning self.result_data = self.result_data.append( File "/home/jia/miniconda3/envs/edu2/lib/python3.9/site-packages/pandas/core/generic.py", line 5989, in getattr return object.getattribute(self, name) AttributeError: 'DataFrame' object has no attribute 'append'

tyMadara commented 10 months ago

you may check if the proper version of pandas is correctly installed

buhuiCS commented 1 month ago

❌ Wrong LLM answers in the history: 5 / 17 / 44 πŸ“ Write json file to out/gpt_history/gpt-4/asia_wrong.json. Traceback (most recent call last): File "/home/jia/δΈ‹θ½½/IJCAI 2024/Casual Structure learning/ILS-CSL-main/main.py", line 542, in icsl.iter_causal_structure_learning() File "/home/jia/δΈ‹θ½½/IJCAI 2024/Casual Structure learning/ILS-CSL-main/main.py", line 247, in iter_causal_structure_learning write_json(self.prior_iter, self.prior_iter_path) File "/home/jia/δΈ‹θ½½/IJCAI 2024/Casual Structure learning/ILS-CSL-main/utils.py", line 567, in write_json with open(json_path, "w", encoding=encoding) as f: FileNotFoundError: [Errno 2] No such file or directory: 'out/prior-iter/asia-250-1-CaMML-mml.json'

Can you please help?

hi,did you solve this question