You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was playing around with the estimator for SIS and noticed crashes for certain parameters (see below for examples) in the cost_zeta method of SISLattice when searching for beta.
If baseline_cost["beta"] + 1 is smaller than 40, we get a ValueError because we try to search in an empty range.
If baseline_cost["beta"] + 1 is equal to 41, we get a TypeError: Because precision is set to 2, the start and stop parameters of local_minimum are divided by two, resulting in an empty range [20,20) due to rounding and no neighborhood can be computed.
Maybe the SIS parameters in the examples below are obviously stupid for a lattice expert, but it would be nicer to have a helpful error message that explains what went wrong and maybe indicates how to change the parameters to obtain useful results.
Traceback (most recent call last):
File "/home/lennart/dev/lattice-estimator/test.sage.py", line 11, in <module>
est = SIS.lattice(params)
^^^^^^^^^^^^^^^^^^^
File "/home/lennart/dev/lattice-estimator/estimator/sis_lattice.py", line 329, in __call__
f(
File "/home/lennart/dev/lattice-estimator/estimator/sis_lattice.py", line 232, in cost_zeta
with local_minimum(
^^^^^^^^^^^^^^
File "/home/lennart/dev/lattice-estimator/estimator/util.py", line 256, in __init__
local_minimum_base.__init__(self, start, stop, smallerf, suppress_bounds_warning, log_level)
File "/home/lennart/dev/lattice-estimator/estimator/util.py", line 97, in __init__
raise ValueError(f"Incorrect bounds {start} > {stop}.")
ValueError: Incorrect bounds 20 > 10.
fromestimatorimport*# results in `TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'`params=SIS.Parameters(n=1, q=2^10000, length_bound=2^100, norm=oo)
est=SIS.lattice(params)
Traceback (most recent call last):
File "/home/lennart/dev/lattice-estimator/test.sage.py", line 15, in <module>
est = SIS.lattice(params)
^^^^^^^^^^^^^^^^^^^
File "/home/lennart/dev/lattice-estimator/estimator/sis_lattice.py", line 329, in __call__
f(
File "/home/lennart/dev/lattice-estimator/estimator/sis_lattice.py", line 237, in cost_zeta
for beta in it.neighborhood:
^^^^^^^^^^^^^^^
File "/home/lennart/dev/lattice-estimator/estimator/util.py", line 273, in neighborhood
start = max(start_bound, self.x - self._precision)
^^^^^^
File "/home/lennart/dev/lattice-estimator/estimator/util.py", line 264, in x
return self._best.low * self._precision
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
The text was updated successfully, but these errors were encountered:
I was playing around with the estimator for SIS and noticed crashes for certain parameters (see below for examples) in the
cost_zeta
method ofSISLattice
when searching for beta.lattice-estimator/estimator/sis_lattice.py
Lines 231 to 239 in dfbc622
baseline_cost["beta"] + 1
is smaller than 40, we get a ValueError because we try to search in an empty range.baseline_cost["beta"] + 1
is equal to 41, we get a TypeError: Becauseprecision
is set to2
, thestart
andstop
parameters oflocal_minimum
are divided by two, resulting in an empty range[20,20)
due to rounding and no neighborhood can be computed.Maybe the SIS parameters in the examples below are obviously stupid for a lattice expert, but it would be nicer to have a helpful error message that explains what went wrong and maybe indicates how to change the parameters to obtain useful results.
Examples Code and Stack Traces
The text was updated successfully, but these errors were encountered: