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

Revert "Cmdstanpy test 20240215 (#853)" #855

Closed
wants to merge 2 commits into from

Conversation

edwinnglabs
Copy link
Collaborator

Reverts #854

swotai and others added 2 commits March 11, 2024 20:07
* fix typo and add step to remove the linux wheel

* hotfix -- fix a bug of missing run in github action

* specify manylinux version for now to get rid of conversion issue for auditwheel

* change the platform to manylinux2014

* testing using new gh action (v1.4.2) for pypi-publish

using ``` pypa/[email protected]``` in github action

* testing direct twine upload

* Update black.yaml

* test reading as .stan

* revert to .bin

* pypi test

* Update pypi-deploy.yaml

* test pypi workflow

* Update pypi-deploy-test.yaml

* Update pypi-deploy-test.yaml

* Update setup.py

* Toolchain fix attempt
Following prophet, add install_cmdstan_toolchain to install R tools (instead of using complier=True flag in the installation)

* Reorder functions, add copytree of the cmdstan_dir for windows, use fstrings

* Refactor code to align with what works in other modules

Fix.

Fix model name

* Update requirements

Sort requirements, add statsmodel to project dependencies, add wheel to test requirements

* Reorder imports

* Move CMDSTAN_VERSION into config.json

Moving the global variable to config and create utils to read and set path based on var.

* Add step to set cmdstan path

In the base estimator.py, which appears to be the root of most models, add step to set the cmdstan path, so that all the subsequent fit/sample steps will know where to find the right binary.

Make sure version json is in manifest

* Change to fstrings.

* Fix cmdstanpy install issue with pip (#850)

A base build to solve cmdstanpy installation problem

* Move set cmdstan path to stan estimator (pyro don't need it)

* Skip building models

* calling compile in the first time running stan

* remove prophet style ga workflow

* Simplify install steps

Install in default path
Build model in place and rename to bin
do not prune stan installation

* Fix typo, move authors

* roll back to compiling stan files on the fly

* Update setup.py

* Update pyproject.toml

* Remove duplicates

* Remove executable renaming

* fixing python build bug

* Update setup.py

* Update stan.py

* Update setup.py

* Update .gitignore

* Update setup.py to compile stan file in place

Remove redundant step of stan_compiled. All included stan file and their compiled versions will live in orbit_package/stan folder to simplify overall flow.

* Simplify get_compiled_stan_model

Simplify util/stan.py by consolidating 4 functions into 1.
get_compiled_stan_model will do two things:
1) Read and load included stan file and the precompiled exe during setup
2) Read and compile user provided stan file in place

* typo

* Temp fix cmdstanpy removing executable

* Add function to remove prior cmdstan versions

Clean up unused packages
Add function to remove prior cmdstan versions below the one specified in CMDSTAN_VERSION in config.
Rename config.json
Udpate contributing notes to remove the step to build ext (no longer exist)
Misc Linting

* version

* Fix path, bring back check version

Bring back previous behavior of checking compiled file is newer than stan file

Path setting:
For Windows, set proper paths to mingw32-make
For all platforms, set proper paths to tbb
This behavior aligns with environmental variable right after cmdstanpy_install

* Limit path fix to windows only.

Mac/Linux won't work with os.environ['path']

* Update __version__.py

* Disable model autobuild in Linux

* Update __version__.py

* Update __version__.py

* Update manifest to exclude executables

* Update __version__.py

* Remove exclude exe from orbit/stan

This would also exclude the executable after build step during setup.

* utils update

* revert mainifest.in

* Update __version__.py

* stan and exe file loading refinement

* Update set_cmdstan_path.py

* Update __version__.py

* Always force compile model during setup

This negates the need to manually delete files after development before packaging

---------

Co-authored-by: Edwin Ng <[email protected]>
Co-authored-by: szmark001 <[email protected]>
@edwinnglabs edwinnglabs deleted the revert-854-cmdstanpy-fix-20240311 branch March 12, 2024 04:41
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

Successfully merging this pull request may close these issues.

2 participants