Skip to content

Commit 740e251

Browse files
committed
Update README
1 parent 16f4a39 commit 740e251

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

light-curve/README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -828,13 +828,16 @@ See the benchmarks described in more detail in
828828
The `light_curve.embed` submodule provides pretrained neural network models that map raw photometric
829829
time series to dense vector embeddings suitable for downstream machine learning tasks such as
830830
classification, 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+
838841
See the [onnxruntime install guide](https://onnxruntime.ai/docs/install/) for GPU and platform-specific
839842
packages (`onnxruntime-gpu`, `onnxruntime-directml`, etc.).
840843
Hardware-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.
921924
The following example reads a ZTF DR23 [HATS](https://hats.readthedocs.io) pixel directly from the public S3
922925
bucket 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.
926930
This particular pixel contains ~50k objects passing the quality cuts; embedding takes roughly
927931
12 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
930936
import numpy as np
931937
import nested_pandas as npd

light-curve/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ full = [
4646
# no linting tools, compatible with free-threading
4747
test-base = [
4848
"pytest",
49-
"markdown-pytest",
49+
"markdown-pytest>=0.6",
5050
"pytest-benchmark",
5151
"pytest-subtests>=0.10",
5252
"arro3-core",
@@ -60,7 +60,7 @@ test-base = [
6060
# Full testing environment (adds packages that don't support free-threading yet:
6161
# cesium, iminuit, nanoarrow, polars)
6262
test = [
63-
{include-group = "test-base"},
63+
{ include-group = "test-base" },
6464
"numpy",
6565
"pyarrow",
6666
"pandas",
@@ -72,7 +72,7 @@ test = [
7272
]
7373
# Development environment for free-threaded Python builds
7474
dev-free-threading = [
75-
{include-group = "test-base"},
75+
{ include-group = "test-base" },
7676
"numpy",
7777
"pyarrow",
7878
"pandas",
@@ -81,7 +81,7 @@ dev-free-threading = [
8181
]
8282
# Full development environment
8383
dev = [
84-
{include-group = "dev-free-threading"},
84+
{ include-group = "dev-free-threading" },
8585
"iminuit>=2.21,<3",
8686
"nanoarrow",
8787
"polars",

0 commit comments

Comments
 (0)