Instructions to use Zipeng365/WISP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use Zipeng365/WISP with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("Zipeng365/WISP", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
Download setup.py from Zipeng365/WISP: direct link, hf CLI and curl.
- Browser
- Download file 1.5 kB
-
https://huggingface.co/Zipeng365/WISP/resolve/main/setup.py
- Command line
-
hf download hf://Zipeng365/WISP/setup.py
-
curl -L -o setup.py https://huggingface.co/Zipeng365/WISP/resolve/main/setup.py
1.5 kB
| """Optional C kernels of the accelerated engine (pure-Python fallbacks are used when a build fails).""" | |
| import os | |
| from setuptools import Extension, setup | |
| FLAGS = ["/O2", "/fp:strict"] if os.name == "nt" else ["-O3", "-ffp-contract=off"] | |
| SRC = "src/wisp_fast/" | |
| def ext(name, sources, depends=()): | |
| return Extension(f"wisp_fast.{name}", [SRC + s for s in sources], depends=[SRC + d for d in depends], | |
| extra_compile_args=FLAGS, optional=True) | |
| def funnel_ext(name, sources, depends=()): | |
| """C kernels of the WISP-Funnel engine (``wisp_fast.funnel``), a separate subpackage.""" | |
| base = SRC + "funnel/" | |
| return Extension(f"wisp_fast.funnel.{name}", [base + s for s in sources], depends=[base + d for d in depends], | |
| extra_compile_args=FLAGS, optional=True) | |
| setup(ext_modules=[ | |
| ext("_kernels", ["features_kernels.c", "viterbi.c", "forest_kernels.c"]), | |
| ext("_family_kernels", ["family_kernels.c"], ["autocorr_lanes.h", "shapelet_tiles.h", "moments_tiles.h"]), | |
| ext("_cis_intervals", ["cis_intervals.c"], ["interval_levels.h"]), | |
| ext("_cis_conv", ["cis_conv.c"]), | |
| funnel_ext("_kernels", ["features_kernels.c", "viterbi.c", "forest_kernels.c", "score_panels.c"]), | |
| funnel_ext("_family_kernels", ["family_kernels.c"], ["autocorr_lanes.h", "shapelet_tiles.h", "moments_tiles.h"]), | |
| funnel_ext("_cis_intervals", ["cis_intervals.c"], ["interval_levels.h"]), | |
| funnel_ext("_cis_lite", ["cis_lite_kernels.c"], ["lite_windows.h"]), | |
| ]) | |