Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
lint:
name: Lint & format (pre-commit)
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ truth that drives publishing).

### Added
- METL 1D protein embeddings via optional `metl-pretrained` backend: install with
`pip install pepe-cli[metl]` and use model identifiers such as `metl-g-20m-1d`
`pip install git+https://github.com/gitter-lab/metl-pretrained.git` and use model identifiers such as `metl-g-20m-1d`
(and other `metl-*-1d` names). Dispatch lives in `model_selecter.py`; embedding
is handled by `METLEmbedder` with `METLDataset` tokenization.
- `[metl]` and `[esm]` optional dependency extras in `pyproject.toml` and
- `[esm]` optional dependency extra in `pyproject.toml` and
`setup.py`.
- Typed errors `METLPackageRequiredError` and `METL3DNotSupportedError` when
METL is requested without the extra or when a 3D METL model id is used.
Expand Down
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,7 @@ PEPE (Pipeline for Easy Protein Embedding) is a tool for extracting embeddings a
pip install git+https://github.com/Biohub/transformers.git@main
```

3. *(Optional)* For METL 1D embedding models (e.g. `metl-g-20m-1d`), install the optional backend:

```sh
pip install pepe-cli[metl]
```

The underlying `metl-pretrained` package is not on PyPI. PEPE's `[metl]` extra installs it from GitHub; you can also install it directly:
3. *(Optional)* For METL 1D embedding models (e.g. `metl-g-20m-1d`), install the backend directly from GitHub (it is not on PyPI):

```sh
pip install git+https://github.com/gitter-lab/metl-pretrained.git
Expand Down Expand Up @@ -233,7 +227,7 @@ results = pepe.embed(
- biohub/ESMC-300M
- biohub/ESMC-600M
- biohub/ESMC-6B
- METL 1D models (requires `[metl]` extra; see Quick start)
- METL 1D models (requires `metl-pretrained` from GitHub; see Quick start)
- `metl-g-20m-1d` and other `metl-*-1d` identifiers supported by [metl-pretrained](https://github.com/gitter-lab/metl-pretrained)
- Custom Hugging Face models
- Any compatible model from Hugging Face Hub: `username/model-name`
Expand All @@ -250,7 +244,7 @@ results = pepe.embed(
- **`--model_name`** (str): Name of model or link to model. Choose from [List of supported models](../README.md#list-of-supported-models) or use custom models:
- ESM models: `esm2_t33_650M_UR50D`
- ESMC models: `biohub/ESMC-300M` (requires Biohub transformers fork; see Quick start)
- METL 1D models: `metl-g-20m-1d` (requires `[metl]` extra; see Quick start)
- METL 1D models: `metl-g-20m-1d` (requires `metl-pretrained` from GitHub; see Quick start)
- Hugging Face models: `username/model-name`
- Custom PyTorch models: `/path/to/model.pt` or `/path/to/model_directory/`
- Local HF models: `/path/to/local_hf_directory/`
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ dependencies = [
]

[project.optional-dependencies]
metl = ["metl-pretrained @ git+https://github.com/gitter-lab/metl-pretrained.git@52358614c4b412e81e19e300485e8b85123bd903"]
esm = ["fair-esm"]
# Developer toolchain: `pip install -e .[dev]` bootstraps everything needed to
# run the hooks and the local test suite.
Expand Down
3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ def read_readme():
"rjieba",
],
extras_require={
"metl": [
"metl-pretrained @ git+https://github.com/gitter-lab/metl-pretrained.git@52358614c4b412e81e19e300485e8b85123bd903"
],
"esm": ["fair-esm"],
},
entry_points={
Expand Down
1 change: 0 additions & 1 deletion src/pepe/embedders/metl_embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def _import_metl():
except ImportError as e:
raise METLPackageRequiredError(
"METL models require metl-pretrained. Install with: "
"pip install 'pepe-cli[metl]' or "
"pip install git+https://github.com/gitter-lab/metl-pretrained.git"
) from e

Expand Down
Loading