Card: query with portraits.query (the build code now lives in one data-portraits repo)
Browse files
README.md
CHANGED
|
@@ -31,10 +31,10 @@ Each partition is a separate revision of this repo (tag `<stage>-p<i>of<k>`, bra
|
|
| 31 |
| phase3 | [`phase3-p0of1`](https://huggingface.co/aalkaswan/crystalcoder-portrait/tree/phase3-p0of1) | 581 | 7 GiB |
|
| 32 |
|
| 33 |
`partitions.json` lists the exact files (pinned dataset revision) in each partition. Query with
|
| 34 |
-
`
|
| 35 |
|
| 36 |
```python
|
| 37 |
-
from
|
| 38 |
portrait = SequentialPortrait("aalkaswan/crystalcoder-portrait", ["phase1-p0of1", "phase2-p0of2", "phase2-p1of2", "phase3-p0of1"])
|
| 39 |
report = portrait.contains_from_text([text], sort_chains_by_length=True)[0]
|
| 40 |
```
|
|
|
|
| 31 |
| phase3 | [`phase3-p0of1`](https://huggingface.co/aalkaswan/crystalcoder-portrait/tree/phase3-p0of1) | 581 | 7 GiB |
|
| 32 |
|
| 33 |
`partitions.json` lists the exact files (pinned dataset revision) in each partition. Query with
|
| 34 |
+
`portraits.query`:
|
| 35 |
|
| 36 |
```python
|
| 37 |
+
from portraits.query import SequentialPortrait
|
| 38 |
portrait = SequentialPortrait("aalkaswan/crystalcoder-portrait", ["phase1-p0of1", "phase2-p0of2", "phase2-p1of2", "phase3-p0of1"])
|
| 39 |
report = portrait.contains_from_text([text], sort_chains_by_length=True)[0]
|
| 40 |
```
|