amazon-braket / amazon-braket/amazon-braket-examples

Jupyter / Braket SDK event loop conflict

Aberta
#857 5 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
589
Forks
262
Merge médio
13h 38min
PRs com merge (30d)
7

Descrição

# Scope
`examples/getting_started/0_Getting_started/0_Getting_started.ipynb`
It seems the issue may reside with the Braket SDK.

# Problem
I found that when working through the getting started guide, I encountered a runtime error due to a conflict with Jupyter's event loop conflicting with the Braket SDK's async internals.

Image

Note the output `Counter({'00': 7, '11': 3})` still printed — the task actually completed, but the exception fires in the callback cleanup.

# Work around
Apply `nest_asyncio` before the Braket SDK import
```
import nest_asyncio
nest_asyncio.apply()
```

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.