Skip to content

Commit

Permalink
hot fix as v1.1.4.4alpha
Browse files Browse the repository at this point in the history
- fix on lint github action
- fix on .bin file corruption in cmdstanpy
  • Loading branch information
edwinnglabs committed Feb 16, 2024
1 parent 3f465b9 commit 12dc4c5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/black.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Currently only checking instead of auto formatting
- uses: jpetrucciani/black-check@master
# - uses: psf/black@stable
- uses: actions/checkout@v3
- uses: psf/black@stable
# Currently only checking instead of auto formatting
# - uses: jpetrucciani/black-check@master
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion orbit/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.1.4.3"
__version__ = "1.1.4.4alpha"
14 changes: 12 additions & 2 deletions orbit/utils/stan.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,23 @@ def get_compiled_stan_model(stan_model_name):
# with open(compiled_model, "rb") as f:
# return pickle.load(f)

# TODO: need to fix this .exe_file approach later
# model_file = (
# importlib_resources.files("orbit")
# / "stan_compiled"
# / "{}.bin".format(stan_model_name)
# )

# return CmdStanModel(exe_file=str(model_file))

# New approach
model_file = (
importlib_resources.files("orbit")
/ "stan_compiled"
/ "{}.bin".format(stan_model_name)
/ "{}.stan".format(stan_model_name)
)
return CmdStanModel(exe_file=str(model_file))

return CmdStanModel(stan_file=str(model_file))


def compile_stan_model_simplified(path):
Expand Down

0 comments on commit 12dc4c5

Please sign in to comment.