uber / orbit

A Python package for Bayesian forecasting with object-oriented design and probabilistic models under the hood.
https://orbit-ml.readthedocs.io/en/stable/
Other
1.85k stars 132 forks source link

Cmdstanpy test 20240215 (#853) #854

Closed swotai closed 5 months ago

swotai commented 5 months ago

using pypa/gh-action-pypi-publish@v1.4.2 in github action

Fix.

Fix model name

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

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

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

A base build to solve cmdstanpy installation problem

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

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 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

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

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

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

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

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


Description

Please include a summary of the change and which issue is fixed.

Fixes cmdstan installation issue and package installation issue for various platforms for python 3.10-3.11

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests.