Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs/guides/03_runtime_primitives_with_quantum_serverless.ipynb fails #488

Closed
akihikokuroda opened this issue May 1, 2023 · 3 comments
Closed
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@akihikokuroda
Copy link
Collaborator

Steps to reproduce the problem

Run docker compose
Run Jupyter notebook
Run docs/guides/03_runtime_primitives_with_quantum_serverless.ipynb

What is the current behavior?

It fails with the following error.

RayTaskError(AccountNotFoundError)        Traceback (most recent call last)
Cell In [1], line 36
     32 function_references = [my_function(circ, obs_ref) for circ in circuits]
     34 # 5. to get results back from reference
     35 # we need to call `get` on function reference
---> 36 print("Single execution:", get(function_reference))
     37 print("N parallel executions:", get(function_references))

File /opt/conda/lib/python3.9/site-packages/ray/_private/client_mode_hook.py:105, in client_mode_hook.<locals>.wrapper(*args, **kwargs)
    103     if func.__name__ != "init" or is_client_mode_enabled_by_default:
    104         return getattr(ray, func.__name__)(*args, **kwargs)
--> 105 return func(*args, **kwargs)

File /opt/conda/lib/python3.9/site-packages/ray/_private/worker.py:2521, in get(object_refs, timeout)
   2519     worker.core_worker.dump_object_store_memory_usage()
   2520 if isinstance(value, RayTaskError):
-> 2521     raise value.as_instanceof_cause()
   2522 else:
   2523     raise value

RayTaskError(AccountNotFoundError): ray::my_function() (pid=7113, ip=10.4.1.79)
  File "/opt/conda/lib/python3.9/site-packages/quantum_serverless/core/decorators.py", line 202, in wraps
    return func(*args, **kwargs)
  File "/tmp/ipykernel_6556/2197171511.py", line 13, in my_function
  File "/opt/conda/lib/python3.9/site-packages/qiskit_ibm_runtime/estimator.py", line 205, in __init__
    self._session = get_default_session(service, backend)
  File "/opt/conda/lib/python3.9/site-packages/qiskit_ibm_runtime/session.py", line 285, in get_default_session
    else QiskitRuntimeService()
  File "/opt/conda/lib/python3.9/site-packages/qiskit_ibm_runtime/qiskit_runtime_service.py", line 190, in __init__
    self._account = self._discover_account(
  File "/opt/conda/lib/python3.9/site-packages/qiskit_ibm_runtime/qiskit_runtime_service.py", line 312, in _discover_account
    account = AccountManager.get(filename=filename)
  File "/opt/conda/lib/python3.9/site-packages/qiskit_ibm_runtime/accounts/management.py", line 184, in get
    raise AccountNotFoundError("Unable to find account.")
qiskit_ibm_runtime.accounts.exceptions.AccountNotFoundError: 'Unable to find account.'

What is the expected behavior?

Run without error.

@akihikokuroda akihikokuroda added the bug Something isn't working label May 1, 2023
@akihikokuroda
Copy link
Collaborator Author

I wonder if this should run. Do we need embed an account?

@IceKhan13
Copy link
Member

I will cover this under #479

Now we can pass runtime service object as argument. We will use that to handle account details

@IceKhan13 IceKhan13 self-assigned this May 2, 2023
@IceKhan13 IceKhan13 added this to the 0.1 milestone May 2, 2023
@Tansito Tansito added the documentation Improvements or additions to documentation label May 5, 2023
@IceKhan13
Copy link
Member

Gone in #481

akihikokuroda pushed a commit that referenced this issue Aug 22, 2024
Use new icr namespace for selector image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants