Skip to content

Error with minto #39

@ksk-jij

Description

@ksk-jij

Description

The following error is arised if you install ommx-quantum-benchmarks by uv add ommx-quantum-benchmarks:

from ommx_quantum_benchmarks.qoblib import Marketsplit
dataset = Marketsplit()
dataset("binary_linear", "ms_03_050_002")
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[3], [line 3](vscode-notebook-cell:?execution_count=3&line=3)
      1 from ommx_quantum_benchmarks.qoblib import Marketsplit
      2 dataset = Marketsplit()
----> [3](vscode-notebook-cell:?execution_count=3&line=3) dataset("binary_linear", "ms_03_050_002")

File ~/.venv/lib/python3.12/site-packages/ommx_quantum_benchmarks/qoblib/qoblib.py:111, in BaseDataset.__call__(self, model_name, instance_name)
    107 experiment = self.get_experiment(
    108     model_name=model_name, instance_name=instance_name
    109 )
    110 # Load the only instance in the experiment.
--> [111](https://file+.vscode-resource.vscode-cdn.net/.venv/lib/python3.12/site-packages/ommx_quantum_benchmarks/qoblib/qoblib.py:111) instances = experiment.get_current_datastore().instances
    112 # The uploaded instance should be only one. Thus, if this error is raised, it is a bug of the uploader.
    113 assert (
    114     len(instances) == 1
    115 ), f"[FOR DEVELOPER] Number of instances obtained by model_name={model_name} and instance_name={instance_name} is not one: {len(instances)}."

AttributeError: 'Experiment' object has no attribute 'get_current_datastore'

How to fix

  • Temporal way for users: uv add minto==1.3.0
  • For developers: Fix BaseDataset class (main/ommx_quantum_benchmarks/qoblib/qoblib.py).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions