Skip to content

Commit

Permalink
Disable CI sampling progress logging (#2176)
Browse files Browse the repository at this point in the history
* disable AMCMC logging

* hide repeated message

* apply suggestions

* update comments

* format

* change `verbose` to `silent`

* remove `Turing.PROGRESS`

* bump `AbstractMCMC` version

* no bump minor version

* remove `using Logging`

* remove extra code

* add back `PROGRESS`

* Update src/Turing.jl

Co-authored-by: David Widmann <devmotion@users.noreply.github.com>

---------

Co-authored-by: Hong Ge <3279477+yebai@users.noreply.github.com>
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 26, 2024
1 parent 616a07f commit 4b5e4d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Project.toml
@@ -1,6 +1,6 @@
name = "Turing"
uuid = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"
version = "0.30.5"
version = "0.30.6"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down Expand Up @@ -46,7 +46,7 @@ TuringOptimExt = "Optim"

[compat]
ADTypes = "0.2"
AbstractMCMC = "5"
AbstractMCMC = "5.2"
AdvancedHMC = "0.3.0, 0.4.0, 0.5.2, 0.6"
AdvancedMH = "0.8"
AdvancedPS = "0.5.4"
Expand Down
3 changes: 3 additions & 0 deletions src/Turing.jl
Expand Up @@ -20,6 +20,7 @@ import Random

const PROGRESS = Ref(true)

# TODO: remove `PROGRESS` and this function in favour of `AbstractMCMC.PROGRESS`
"""
setprogress!(progress::Bool)
Expand All @@ -28,6 +29,8 @@ Enable progress logging in Turing if `progress` is `true`, and disable it otherw
function setprogress!(progress::Bool)
@info "[Turing]: progress logging is $(progress ? "enabled" : "disabled") globally"
PROGRESS[] = progress
AbstractMCMC.setprogress!(progress; silent=true)
# TODO: `AdvancedVI.turnprogress` is removed in AdvancedVI v0.3
AdvancedVI.turnprogress(progress)
return progress
end
Expand Down

0 comments on commit 4b5e4d7

Please sign in to comment.