@@ -828,13 +828,16 @@ See the benchmarks described in more detail in
828828The ` light_curve.embed ` submodule provides pretrained neural network models that map raw photometric
829829time series to dense vector embeddings suitable for downstream machine learning tasks such as
830830classification, anomaly detection, and similarity search.
831- Models are loaded directly from HuggingFace (weights are cached locally after the first download)
832- and require ` onnxruntime ` and ` huggingface-hub ` :
831+ The examples below use ` from_hf() ` to download model weights from HuggingFace Hub
832+ (cached locally after the first download), which requires ` onnxruntime ` and ` huggingface-hub ` :
833833
834834```
835- pip install onnxruntime huggingface_hub
835+ pip install light-curve onnxruntime huggingface_hub
836836```
837837
838+ Models can also be loaded directly from a local ONNX file via ` from_onnx_file() ` ,
839+ without ` huggingface-hub ` .
840+
838841See the [ onnxruntime install guide] ( https://onnxruntime.ai/docs/install/ ) for GPU and platform-specific
839842packages (` onnxruntime-gpu ` , ` onnxruntime-directml ` , etc.).
840843Hardware-specific options such as execution providers can be passed via ` ort_session_kwargs `
@@ -921,11 +924,14 @@ for ELAsTiCC / SNANA FITS data or `mag_zp=8.9` for Jy.
921924The following example reads a ZTF DR23 [ HATS] ( https://hats.readthedocs.io ) pixel directly from the public S3
922925bucket using
923926[ ` nested-pandas ` ] ( https://nested-pandas.readthedocs.io ) and ` s3fs `
924- (install both with ` pip install nested-pandas s3fs ` ), embeds all well-observed light curves with
925- Astromer2, and finds the closest neighbour to a given object by cosine distance.
927+ (install all dependencies for this example with
928+ ` pip install huggingface_hub light-curve nested-pandas onnxruntime s3fs scipy ` ), embeds all well-observed
929+ light curves with Astromer2, and finds the closest neighbour to a given object by cosine distance.
926930This particular pixel contains ~ 50k objects passing the quality cuts; embedding takes roughly
92793112 minutes on M2 Pro (~ 15 ms per object).
928932
933+ <!-- name: test_ztf_dr23_nn_example; mark: skip(reason="requires S3 access and ~12 minutes to run") -->
934+
929935``` python
930936import numpy as np
931937import nested_pandas as npd
0 commit comments