Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: results_gen_sym.dat not found. #63

Open
mbennun opened this issue May 20, 2022 · 4 comments
Open

OSError: results_gen_sym.dat not found. #63

mbennun opened this issue May 20, 2022 · 4 comments

Comments

@mbennun
Copy link

mbennun commented May 20, 2022

I am trying the example using:
aifeynman.run_aifeynman("./example_data/", "example1.txt", 60, "14ops.txt", polyfit_deg=3, NN_epochs=500)

It runs and then fails with this error:

Checking for generalized symmetry...
identify_decompositions ./example_data/ example1.txt_train
Trying (0, 1)
(1.2643647381029814, (0, 1))
Trying (0, 2)
(3.397227321254669, (0, 2))
Trying (1, 2)
(3.3632891097948683, (1, 2))
mask [ True False True]
Trying to solve mysteries with brute force...
Trying to solve results/gradients_gen_sym_example1.txt_train
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.9/site-packages/aifeynman/S_run_aifeynman.py", line 274, in run_aifeynman
PA = run_AI_all(pathdir,filename+"_train",BF_try_time,BF_ops_file_type, polyfit_deg, NN_epochs, PA=PA)
File "/usr/local/lib/python3.9/site-packages/aifeynman/S_run_aifeynman.py", line 156, in run_AI_all
bf_all_output = np.loadtxt("results_gen_sym.dat", dtype="str")
File "/usr/local/lib/python3.9/site-packages/numpy/lib/npyio.py", line 1067, in loadtxt
fh = np.lib._datasource.open(fname, 'rt', encoding=encoding)
File "/usr/local/lib/python3.9/site-packages/numpy/lib/_datasource.py", line 193, in open
return ds.open(path, mode, encoding=encoding, newline=newline)
File "/usr/local/lib/python3.9/site-packages/numpy/lib/_datasource.py", line 533, in open
raise IOError("%s not found." % path)
OSError: results_gen_sym.dat not found.

@kvyaswanth
Copy link

results_gen_sym.dat was to be generated by this file "feynman_sr_mdl5"

I suggest checking if the file is executable, or try using print statement here to check if the above mentioned code is running

@toontran
Copy link

Apparently if you want to use AI Feynman 2.0, it's better to use a historical version of this repo, according to this article

@Rafail-Karkanis
Copy link

I am getting the same error.
@kvyaswanth This returns a [Errno 2] No such file or directory: 'feynman_sr_mdl5'
@toontran I tried to use dcshapiro's fork, but it returns another error upon executing the example.py
Is there any commit hash that actually works?

@alen-1998
Copy link

alen-1998 commented Oct 28, 2024

安装不正确导致这个命令出错'feynman_sr_mdl5 = aifeynman._symbolic_regress_mdl5:go'。
conda环境可以试下这个方法,需要修改setup.py部分内容

conda create -n feynman python=3.7 #(numpy 1.16.0 would require python >=3.7,<3.8.0a0 )
conda activate feyn
conda install numpy==1.16
#The symbol `PyDataType_SET_ELSIZE` has been removed in newer versions of NumPy.
# If the NumPy version is higher than 1.16, it is recommended to downgrade to 
# version 1.16 to ensure compatibility.
conda install scikit-learn
conda install pytorch==1.1.0 torchvision==0.3.0 -c pytorch
conda insatll matplotlib scipy pandas sortedcontainers
sudo apt install gfortran
git clone https://github.com/SJ001/AI-Feynman.git
pip install .  

测试一下brute_force是否正常

from aifeynman.S_brute_force import brute_force
brute_force("./AI-feynman/example_data/","example1.txt",30,"14ops.txt")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants