Use LanceDB for all dataset card examples

#3
Files changed (1) hide show
  1. README.md +2 -26
README.md CHANGED
@@ -77,25 +77,9 @@ The conversion embeds source descriptions sorted by SCP code, stripped of surrou
77
  - Vector search can be combined with split, fold, or code filters.
78
  - Version tags pin the schema, rows, and indices used in an experiment.
79
 
80
- ## Load with `datasets.load_dataset`
81
-
82
- The Lance reader in `datasets` 5.2.0 expects a saved Hugging Face token. Run `hf auth login` before using this loader. The Lance and LanceDB examples below support anonymous access.
83
-
84
- ```python
85
- from datasets import load_dataset
86
-
87
- rows = load_dataset(
88
- "lance-format/ptb-xl-lance",
89
- split="test",
90
- streaming=True,
91
- columns=["ecg_id", "scp_code_ids"],
92
- )
93
- print(next(iter(rows)))
94
- ```
95
-
96
  ## Load with LanceDB
97
 
98
- LanceDB is the embedded retrieval library built on the Lance format. The examples below open a table directly on the Hub. [LanceDB documentation](https://lancedb.com/docs)
99
 
100
  ```python
101
  import lancedb
@@ -103,15 +87,7 @@ import lancedb
103
  db = lancedb.connect("hf://datasets/lance-format/ptb-xl-lance/data")
104
  tbl = db.open_table("test")
105
  print(tbl.count_rows())
106
- ```
107
-
108
- ## Load with Lance
109
-
110
- ```python
111
- import lance
112
-
113
- ds = lance.dataset("hf://datasets/lance-format/ptb-xl-lance/data/test.lance")
114
- print(ds.count_rows(), ds.list_indices())
115
  ```
116
 
117
  For repeated training or heavy random access, download the dataset once and open `./ptb-xl-lance/data` locally.
 
77
  - Vector search can be combined with split, fold, or code filters.
78
  - Version tags pin the schema, rows, and indices used in an experiment.
79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  ## Load with LanceDB
81
 
82
+ Open the public test split directly on Hugging Face to inspect its row count and indices. [LanceDB documentation](https://lancedb.com/docs)
83
 
84
  ```python
85
  import lancedb
 
87
  db = lancedb.connect("hf://datasets/lance-format/ptb-xl-lance/data")
88
  tbl = db.open_table("test")
89
  print(tbl.count_rows())
90
+ print(tbl.list_indices())
 
 
 
 
 
 
 
 
91
  ```
92
 
93
  For repeated training or heavy random access, download the dataset once and open `./ptb-xl-lance/data` locally.