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

IndexError #344

Open
MA-Kochen opened this issue Jul 15, 2023 · 0 comments
Open

IndexError #344

MA-Kochen opened this issue Jul 15, 2023 · 0 comments

Comments

@MA-Kochen
Copy link

MA-Kochen commented Jul 15, 2023

Hi,

I get the following error when using Metropolis-Hastings:

/home/---/anaconda3/envs/refmodel/lib/python3.10/site-packages/pybnf/algorithms.py:1991: UserWarning: genfromtxt: Empty input file: "/home/---/PycharmProjects/EGFR_reference_models/src//Results/samples.txt"
dat_array = np.genfromtxt(self.samples_file, delimiter='\t', dtype=float,
Sorry, an unknown error occurred: IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

The conf file is the following:


model = EGFR_module.xml : egfrpSD.exp

output_dir=/home/---/PycharmProjects/EGFR_reference_models/src/

fit_type = mh
objfunc = chi_sq
population_size=1
max_iterations=100

loguniform_var = k1 0.001 1
loguniform_var = k_1 0.001 1
loguniform_var = kt 0.001 1
loguniform_var = ke 0.001 1
loguniform_var = Vr 0.001 1
loguniform_var = kx 0.001 1
loguniform_var = kh 0.001 1
loguniform_var = k3 0.001 1
loguniform_var = k_3 0.001 1

verbosity=1

time_course = model:EGFR_module, time:100, suffix:egfrpSD


And here is the tail of the log file:

2023-07-14 21:25:59,712 pybnf.pybnf ERROR MainProcess Internal error
Traceback (most recent call last):
File "/home/---/anaconda3/envs/refmodel/lib/python3.10/site-packages/pybnf/pybnf.py", line 229, in main
alg.run(cluster.client, resume=pending, debug=debug)
File "/home/---/anaconda3/envs/refmodel/lib/python3.10/site-packages/pybnf/algorithms.py", line 927, in run
response = self.got_result(res)
File "/home/---/anaconda3/envs/refmodel/lib/python3.10/site-packages/pybnf/algorithms.py", line 2306, in got_result
self.update_histograms('_final')
File "/home/---/anaconda3/envs/refmodel/lib/python3.10/site-packages/pybnf/algorithms.py", line 2006, in update_histograms
histdata = np.log10(dat_array[:, i])
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
2023-07-14 21:25:59,713 pybnf.cluster INFO MainProcess Closing client
2023-07-14 21:26:00,056 pybnf.pybnf INFO MainProcess Fitting unsuccessful. Attempting cleanup
2023-07-14 21:26:00,056 pybnf.algorithms INFO MainProcess Outputting results to file /home/---/PycharmProjects/EGFR_reference_models/src//Results/sorted_params_end.txt
2023-07-14 21:26:00,059 pybnf.pybnf ERROR MainProcess During cleanup, another exception occurred
Traceback (most recent call last):
File "/home/---/anaconda3/envs/refmodel/lib/python3.10/site-packages/pybnf/pybnf.py", line 394, in main
alg.cleanup()
File "/home/---/anaconda3/envs/refmodel/lib/python3.10/site-packages/pybnf/algorithms.py", line 2479, in cleanup
super().cleanup()
File "/home/---/anaconda3/envs/refmodel/lib/python3.10/site-packages/pybnf/algorithms.py", line 2030, in cleanup
self.update_histograms('_end')
File "/home/---/anaconda3/envs/refmodel/lib/python3.10/site-packages/pybnf/algorithms.py", line 2006, in update_histograms
histdata = np.log10(dat_array[:, i])
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
2023-07-14 21:26:00,059 pybnf.pybnf INFO MainProcess Total fitting time: 0:00:12


It appears to run normally until it tries to construct the histogram at the end. Suggestions?

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

1 participant