Memory and Bias Limit Issues with Large Fully Connected TSP on LeapHybridSampler

Hello, I'm currently treating TSP problem with LeapHybridSampler.


When I conducted the below code:

tsp_order = dnx.traveling_salesperson(
    G, LeapHybridSampler(), start=0
)

My job terminated with the errcor like below:

dwave.cloud.exceptions.SolverFailureError: The number of biases must not exceed 200000000.

Consequenctly, job did not passed to D:wave when I checked the personal dashboard (the problem status and the usage details did not show the record for this job.)

Why does this error occur and what options can be corrected?


The G instance is fully connected graph constructed by networkx package with 691*691 distance matrix.
The matrix is not sparse matrix but the diagonal elements are zero.

When I have same process with the several sample matrices (dimension with 4, 10, 50, 70, 100,and 120), Job passed and completed successfully, confirmed on the personal dashboard in D:wave Leap.
Graphs made from matrices with dimensions exceeding 120 were not performed due to insufficient available time.


Additionally, I caught the dramatic increasing of RAM memory usage for 691*691 distance matrix and the total memory usage is about 180GB.

Is this issue occurring because I'm using the LeapHybridSampler? Are there any options available that could help reduce the memory usage?

0

Comments

3 comments
  • Hi,

    It appears the job submitted is exceeding the limits for the BQM solver.

    While the number of variables, 691*691, is within the limits for the BQM solver (1 million), fully connecting the graph creates biases exceeding the maximum allowed by the BQM solver (200 million).

    Within the Leap dashboard, clicking on a solver name will display the solver's properties. For the BQM solver it will show:

    maximum_number_of_biases = 200000000 
    maximum_number_of_variables = 1000000
    maximum_time_limit_hrs = 24

    The NL (non linear) solver is recommended for TSP problems.

    0
    Comment actions Permalink
  • Thanks, Mohammad.

     

    With your recommend, I carried out the NL  solver for my TSP problems.

    However, when we run the code below:

    import dwave_networkx.algorithms.tsp as dnx
    from dwave.system import LeapHybridNLSampler

    tsp_order = dnx.traveling_salesperson(G, LeapHybridNLSampler(), start=0)

     

    It gave the error on selecting the sampler. Like below:

    /anaconda3/envs/dwave38/lib/python3.8/site-packages/dwave_networkx/utils/decorators.py", line 69,
    in func raise TypeError("expected sampler to have a 'sample_qubo' method")

     

    When I checked the location of 'sample_qubo', it is in "dwave.system.samplers.DWaveSampler.sample_qubo",

    but we used LeapHybridNLSampler in "dwave.system.samplers.LeapHybridNLSampler.sample".

     

    How could I fix the code to solve the TSP problems? Could I get the help for this?

     

    0
    Comment actions Permalink
  • Hello,

    It looks like the traveling_salesperson function is expecting a solver that accepts QUBOs.
    If you take a look at the function, you can see that the sampler parameter states:
    A binary quadratic model sampler.
    The LeapHybridNLSampler solver does not have a sample_qubo function because it's not a BQM sampler.

    You can try using the LeapHybridSampler instead.

    I hope this was helpful. Please let us know if you have any more questions.

    1
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post