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
File size: 1,504 Bytes
ac7f7cb 93a9282 ac7f7cb 93a9282 ac7f7cb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | """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"]),
])
|