Skip to content

Commit a4d1275

Browse files
committed
pixi install instructions
1 parent 4026021 commit a4d1275

7 files changed

Lines changed: 1702 additions & 35 deletions

File tree

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SCM syntax highlighting & preventing 3-way merges
2+
pixi.lock merge=binary linguist-language=YAML linguist-generated=true -diff

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ wheels/
66
*.egg-info
77
.venv
88
*.jsonl
9+
.pixi/*
10+
!.pixi/config.toml

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,15 @@ This package is available on PyPI:
1212
pip install speech-map
1313
```
1414

15-
It is much more efficient to use the Faiss backend for the k-NN, instead of the naive PyTorch backend.
16-
Since Faiss is not available on PyPI, you can install this package in a conda environment with your conda variant:
17-
18-
- CPU version:
19-
```bash
20-
micromamba create -f environment-cpu.yaml
21-
```
22-
- GPU version:
23-
```bash
24-
CONDA_OVERRIDE_CUDA=12.6 micromamba create -f environment-gpu.yaml
25-
```
15+
The naive PyTorch backend for the k-NN is enough to compute the MAP over words quickly.
16+
17+
You might want to use the Faiss backend if you compute the MAP over n-grams or if have a large number of
18+
embeddings. In this case, since Faiss is not available on PyPI, you can install this package in a pixi or conda
19+
environment. We recommand using pixi on Linux: clone this repository and run `pixi shell -e faiss-cpu` or
20+
`pixi shell -e faiss-gpu`.
21+
22+
With conda, first install Faiss in your conda environment (be careful about your PyTorch and Faiss versions,
23+
and from which channel they come from), and then install `speech-map` using pip.
2624

2725
## Usage
2826

environment-cpu.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

environment-gpu.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

pixi.lock

Lines changed: 1667 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pixi.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[workspace]
2+
name = "speech-map"
3+
channels = ["pytorch", "conda-forge"]
4+
platforms = ["osx-arm64", "linux-64"]
5+
6+
[pypi-dependencies]
7+
speech-map = { path = ".", editable = true }
8+
9+
[environments]
10+
faiss-cpu = ["faiss-cpu"]
11+
faiss-gpu = ["faiss-gpu"]
12+
13+
[feature.faiss-cpu]
14+
dependencies = { faiss-cpu = ">=1.13.2" }
15+
platforms = ["linux-64"]
16+
17+
[feature.faiss-gpu]
18+
dependencies = { faiss-gpu = ">=1.13.2" }
19+
platforms = ["linux-64"]
20+
21+
[dependencies]
22+
python = ">=3.12.12,<3.15"

0 commit comments

Comments
 (0)