### Bug description

I posted the [issue](https://discourse.pymc.io/t/slow-pymc-sampling-using-the-introductory-example/12122) at PyMC thinking it may have been related to PyMC's installation, it turned out to be an issue with running the code in a qmd document.

Basically, running PyMC sampling in qmd does not stop even if the number of draws is 1.

```
import pymc as pm
import numpy as np
import arviz as az

RANDOM_SEED = 8927
rng = np.random.default_rng(RANDOM_SEED)

alpha, sigma = 1, 1
beta = [1, 2.5]

size = 100

X1 = np.random.randn(size)
X2 = np.random.randn(size) * 0.2

Y = alpha + beta[0] * X1 + beta[1] * X2 + rng.normal(size=size) * sigma`

basic_model = pm.Model()

with basic_model:
    alpha = pm.Normal('alpha', mu=0, sigma=10)
    beta = pm.Normal('beta', mu=0, sigma=10, shape=2)
    sigma = pm.HalfNormal('sigma', sigma=1)

    mu = alpha + beta[0] * X1 + beta[1] * X2

    Y_obs = pm.Normal('Y_obs', mu=mu, sigma=sigma, observed=Y)

with basic_model:
    idata = pm.sample(draws=1)
```
Here you can see with sampling with 1 draw has been running for 48 minutes and more. And there is no progress bar after the sampling initialization message.

![image](https://github.com/quarto-dev/quarto-cli/assets/7637535/bae089da-e474-43c1-931b-f4524b87af23)

Running the same code in VS Code jupyter notebook took only 25.6 seconds (and with 4000 draws no less)

![image](https://github.com/quarto-dev/quarto-cli/assets/7637535/b25f9a0c-03a7-4555-8c52-89c98bd713a9)

I don't know how to troubleshoot the issue with quarto since I can only tell that python interpreter is busy but there are no warnings or error messages during the sampling.

My Quarto version is 1.3.283 and my OS is Windows 11.


### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [ ] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [X] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
2023-05-15T00:54:34Z
EKtheSage
bug needs-repro stale
open
VS Code Quarto not working with PyMC
https://github.com/quarto-dev/quarto-cli/issues/5540