Skip to content

Commit

Permalink
feat: Add progress bar on terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
aseyboldt committed Jun 11, 2024
1 parent 0767be5 commit 2598d56
Show file tree
Hide file tree
Showing 8 changed files with 272 additions and 88 deletions.
138 changes: 96 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,23 @@ name = "_lib"
crate-type = ["cdylib"]

[dependencies]
nuts-rs = "0.10.0"
nuts-rs = "0.11.0"
numpy = "0.21.0"
ndarray = "0.15.6"
rand = "0.8.5"
thiserror = "1.0.44"
rand_chacha = "0.3.1"
rayon = "1.9.0"
# Keep arrow in sync with nuts-rs requirements
arrow = { version = "51.0.0", default-features = false, features = ["ffi"] }
arrow = { version = "52.0.0", default-features = false, features = ["ffi"] }
anyhow = "1.0.72"
itertools = "0.13.0"
bridgestan = "2.4.1"
rand_distr = "0.4.3"
smallvec = "1.11.0"
upon = { version = "0.8.1", default-features = false, features = [] }
time-humanize = { version = "0.1.3", default-features = false }
indicatif = "0.17.8"

[dependencies.pyo3]
version = "0.21.0"
Expand Down
7 changes: 5 additions & 2 deletions python/nutpie/compile_pymc.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,13 @@ def with_data(self, **updates):
user_data=user_data,
)

def _make_sampler(self, settings, init_mean, cores, template, rate, callback=None):
def _make_sampler(self, settings, init_mean, cores, progress_type):
model = self._make_model(init_mean)
return _lib.PySampler.from_pymc(
settings, cores, model, template, rate, callback
settings,
cores,
model,
progress_type,
)

def _make_model(self, init_mean):
Expand Down
Loading

0 comments on commit 2598d56

Please sign in to comment.