math.log2(trial['write']) / 1000
when the "write" value is negative.
pyenv local 3.8.12
python3 -m venv quimb_env
. ./quimb_env/bin/activate
pip3 install opt-einsum jax jaxlib numba autoray kahypar mypy optax psutil tqdm optuna cytoolz matplotlib
mkdir src
cd src
git clone https://github.com/jcmgray/quimb.git
cd quimb/
git checkout 5b30302
cd ..
git clone https://github.com/jcmgray/cotengra.git
cd cotengra/
git checkout c3d7d34
cd ../..
export PYTHONPATH="./src/quimb:./src/cotengra"
unzip bug_report_code.zip
python3 bug_report.py
Please note: the issue is intermittent, so you may need to run the script several times before the error occurs.
> python3 bug_report.py
log2[SIZE]: 7.00 log10[FLOPs]: 6.17: 80%|████████████████████████████████████████████████████████████████████████████████████████████████████▊ | 8/10 [00:02<00:00, 3.21it/s]
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/home_dir/.pyenv/versions/3.8.12/lib/python3.8/concurrent/futures/process.py", line 239, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/test_area/src/cotengra/cotengra/hyper.py", line 269, in __call__
trial['score'] = self.score_fn(trial)**self.score_compression
File "/test_area/src/cotengra/cotengra/core.py", line 2635, in score_flops
math.log2(trial['write']) / 1000 +
ValueError: math domain error
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "bug_report.py", line 42, in <module>
ev_term = circuit.local_expectation(obs_ops, [0, 1], **options)
File "/test_area/src/quimb/quimb/tensor/circuit.py", line 1734, in local_expectation
info = rhoG.contract(
File "/test_area/src/quimb/quimb/tensor/tensor_core.py", line 6458, in contract
return tensor_contract(*self, **opts)
File "/test_area/src/quimb/quimb/tensor/tensor_core.py", line 218, in tensor_contract
pathinfo = get_contractor(eq, *shapes, get='info', **contract_opts)
File "/test_area/src/quimb/quimb/tensor/contraction.py", line 269, in get_contractor
path = path_fn(eq, *shapes, optimize=optimize, **kwargs)
File "/test_area/src/quimb/quimb/tensor/contraction.py", line 103, in _get_contract_path
path = optimize(inputs, output, size_dict, **kwargs)
File "/test_area/src/cotengra/cotengra/hyper.py", line 648, in __call__
self._search(inputs, output, size_dict,)
File "/test_area/src/cotengra/cotengra/hyper.py", line 603, in _search
for trial in trials:
File "/test_area/quimb_env/lib/python3.8/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/test_area/src/cotengra/cotengra/hyper.py", line 551, in _gen_results_parallel
yield self._get_and_report_next_future()
File "/test_area/src/cotengra/cotengra/hyper.py", line 529, in _get_and_report_next_future
trial = future.result()
File "/home_dir/.pyenv/versions/3.8.12/lib/python3.8/concurrent/futures/_base.py", line 437, in result
return self.__get_result()
File "/home_dir/.pyenv/versions/3.8.12/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
ValueError: math domain error