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

Build hanging on Turing sample call #1514

Closed
rikhuijzer opened this issue Jan 28, 2021 · 3 comments
Closed

Build hanging on Turing sample call #1514

rikhuijzer opened this issue Jan 28, 2021 · 3 comments

Comments

@rikhuijzer
Copy link
Contributor

Yesterday evening, I noticed that a Documenter workflow didn't complete after 5 (five!) hours. I now made a minimal working example in a GitHub repository. In this case, the build hangs when calling sample from Turing.jl. It occurs when running Documeter locally too, but not when running the same model in the REPL. Very similar code doesn't hang when built via CI with Franklin.

In the repository, the following code does work

 ```@example tutorial
  using Turing

  @model function binom(n, k)
       θ ~ Beta(1, 1)
       k ~ Binomial(n, θ)
       return k, θ
  end
  nothing # hide
```

However, adding sample should increase the running time with at most a few minutes and is, at the time of writing, running for 25 minutes (I'll cancel it soon because there is no point in keeping it running):

  ```@example tutorial
  using Turing

  @model function binom(n, k)
       θ ~ Beta(1, 1)
       k ~ Binomial(n, θ)
       return k, θ
  end
  chains = sample(binom(9, 6), NUTS(0.65), 1000)
  nothing # hide
  ```

See rikhuijzer/documenter-hang-example@35eb19e for the commit which passes and rikhuijzer/documenter-hang-example@0e71813 for the commit which seems to hang.

This issue might be related to #1414.

@rikhuijzer
Copy link
Contributor Author

I'm currently working around this by calling the build from another file (https://github.com/rikhuijzer/TuringPlots.jl/blob/main/docs/src/index.md). I have no clue why this works.

@arzwa
Copy link

arzwa commented Feb 4, 2021

I had the same issue, using progress=false in the sample call fixed the hang, so it seems something about the default progress bar in Turing isn't playing nicely with Documenter (it used to in the past).

@mortenpi
Copy link
Member

On Documenter's end, this was probably fixed by JuliaDocs/IOCapture.jl#9 via #1549 (currently untagged though).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants