strangeworks_optimization package

Submodules

strangeworks_optimization.optimizer module

class StrangeworksOptimizer(model: Any | None = None, solver: Any | None = None, options: AquilaParameterModel | DwaveLeapParameterModel | DwaveSamplerParameterModel | FujitsuParameterModel | GurobiParameterModel | HitachiParameterModel | JijLeapHybridCQMParameterModel | JijSAParameterModel | JijSQAParameterModel | NECParameterModel | NEC2ParameterModel | NEC3ParameterModel | QuantagoniaParameterModel | ToshibaParameterModel | None = None, solution: Any | None = None, resource_slug: str | None = None, tags: List[str] | None = None)

Bases: object

Strangeworks optimization controller.

backends() Backend | None

List of optimization backends.

check_parameter_model_compatibility(provider: str, solver: str, parameter_model: Any) bool
download_input_file(sw_job_slug) StrangeworksOptimizationJob
download_input_model(sw_job_slug, download_remote=False)
download_input_model_from_url(file_url)
get_options(provider: str, solver: str, solver_options: dict[str, Any]) AquilaParameterModel | DwaveLeapParameterModel | DwaveSamplerParameterModel | FujitsuParameterModel | GurobiParameterModel | HitachiParameterModel | JijLeapHybridCQMParameterModel | JijSAParameterModel | JijSQAParameterModel | NEC2ParameterModel | NEC3ParameterModel | QuantagoniaParameterModel | ToshibaParameterModel
job: Job | None = None
jobs_by_tag(tags: List[str], andor: str = 'AND')

Return all of the jobs with the given tags

Parameters:
tags: List[str]

List of tags to filter the jobs by.

andor: str

The logical operator to use for the tags. Can be either “AND” or “OR”.

model: StrangeworksModel | None = None
print_deprecated_version_message = True
property resource_slug

!! processed by numpydoc !!

results(sw_job_slug)
run() Job | None
run_batch(batch_file: str) dict[str, Job]
solution: StrangeworksSolution | None = None
solver: StrangeworksSolver | None = None
status(sw_job_slug) Status
tags: List[str] | None = None
upload_model(model, filename: str | None = None, description: str | None = None) RemoteFile

Uploads the model to Strangeworks and returns the slug of the uploaded file.

Parameters:
model: Any

The model to be uploaded. This will be parsed into a StrangeworksOptimizationModel. To ensure that we support the type, and to make it easy to work with the model on the service side.

To-Do:
filename: str (optional)

The filename to use for the uploaded file. If not provided, a random filename will be used. This will make it easier for users to understand what their workspace files are.

description: str (optional)

A description of the file to be uploaded. This will be used to help users understand what the file is for, and to help them understand what the file is for.

Module contents