dwave.cloud.solver.NLSolver.upload_nlm#

NLSolver.upload_nlm(model: dwave.optimization.Model | IOBase | bytes, **upload_params) Future[source]#

Upload the specified NL model to SAPI, returning a Problem ID that can be used to submit the NL model to this solver (i.e. call the sample_nlm() method).

Parameters:
  • model (Model/bytes-like/file-like) – A nonlinear model given either as an in-memory Model object, or as raw data (encoded serialized model) in either a file-like or a bytes-like object.

  • **upload_params – Model encoding and upload parameters, for example parameters passed down to :meth:~dwave.optimization.model.Model.to_file, like max_num_states.

Returns:

Problem ID in a Future. Problem ID can be used to submit problems by reference.

Return type:

concurrent.futures.Future[str]

Note

To use this method, dwave-optimization package has to be installed.