pepe-cli 1.0.4__tar.gz → 1.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pepe_cli-1.0.4/src/pepe_cli.egg-info → pepe_cli-1.0.5}/PKG-INFO +1 -1
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/__init__.py +1 -1
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/embedders/custom_embedder.py +4 -2
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/embedders/esm_embedder.py +1 -1
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/embedders/huggingface_embedder.py +2 -2
- {pepe_cli-1.0.4 → pepe_cli-1.0.5/src/pepe_cli.egg-info}/PKG-INFO +1 -1
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/tests/test_run.py +3 -5
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/LICENSE +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/MANIFEST.in +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/README.md +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/create_example_custom_model.py +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_protein_model/config.json +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_protein_model/pytorch_model.pt +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_protein_model/special_tokens_map.json +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_protein_model/tokenizer_config.json +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_protein_model/vocab.json +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_protein_model/vocab.txt +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_sequences.fasta +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_substring.csv +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/embedding_options.md +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/model_selection.md +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/pyproject.toml +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/requirements.txt +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/setup.cfg +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/setup.py +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/__main__.py +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/embedders/__init__.py +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/embedders/base_embedder.py +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/model_selecter.py +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/parse_arguments.py +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/utils.py +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe_cli.egg-info/SOURCES.txt +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe_cli.egg-info/dependency_links.txt +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe_cli.egg-info/entry_points.txt +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe_cli.egg-info/requires.txt +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe_cli.egg-info/top_level.txt +0 -0
- {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/tests/__init__.py +0 -0
|
@@ -55,7 +55,9 @@ class CustomEmbedder(BaseEmbedder):
|
|
|
55
55
|
self.valid_tokens = self._get_valid_tokens()
|
|
56
56
|
self.bracket_type = pepe.utils.get_bracket_type(self.tokenizer)
|
|
57
57
|
pepe.utils.check_input_tokens(
|
|
58
|
-
self.valid_tokens,
|
|
58
|
+
self.valid_tokens,
|
|
59
|
+
self.sequences,
|
|
60
|
+
self.model_name,
|
|
59
61
|
)
|
|
60
62
|
|
|
61
63
|
# Set up special tokens
|
|
@@ -157,7 +159,7 @@ class CustomEmbedder(BaseEmbedder):
|
|
|
157
159
|
model.eval()
|
|
158
160
|
|
|
159
161
|
# Move model to appropriate device
|
|
160
|
-
if torch.cuda.is_available() and self.device.type == "cuda":
|
|
162
|
+
if torch.cuda.is_available() and self.device.type == torch.device("cuda"):
|
|
161
163
|
model = model.cuda()
|
|
162
164
|
logger.info("Transferred custom model to GPU")
|
|
163
165
|
else:
|
|
@@ -73,7 +73,7 @@ class ESMEmbedder(BaseEmbedder):
|
|
|
73
73
|
)
|
|
74
74
|
|
|
75
75
|
# Moving the model to GPU if available for faster processing
|
|
76
|
-
if torch.cuda.is_available() and self.device == "cuda":
|
|
76
|
+
if torch.cuda.is_available() and self.device == torch.device("cuda"):
|
|
77
77
|
model = model.cuda()
|
|
78
78
|
logger.info("Transferred model to GPU")
|
|
79
79
|
else:
|
|
@@ -160,7 +160,7 @@ class Antiberta2Embedder(HuggingfaceEmbedder):
|
|
|
160
160
|
|
|
161
161
|
def _initialize_model(self, model_link="alchemab/antiberta2-cssp"):
|
|
162
162
|
"""Initialize the model, tokenizer, and device."""
|
|
163
|
-
if torch.cuda.is_available() and self.device == "cuda":
|
|
163
|
+
if torch.cuda.is_available() and self.device == torch.device("cuda"):
|
|
164
164
|
device = torch.device("cuda")
|
|
165
165
|
logger.info("Transferred model to GPU")
|
|
166
166
|
else:
|
|
@@ -224,7 +224,7 @@ class T5Embedder(HuggingfaceEmbedder):
|
|
|
224
224
|
def _initialize_model(self, model_link="Rostlab/prot_t5_xl_half_uniref50-enc"):
|
|
225
225
|
"""Initialize the model, tokenizer, and device."""
|
|
226
226
|
|
|
227
|
-
if torch.cuda.is_available() and self.device == "cuda":
|
|
227
|
+
if torch.cuda.is_available() and self.device == torch.device("cuda"):
|
|
228
228
|
device = torch.device("cuda")
|
|
229
229
|
logger.info("Transferred model to GPU")
|
|
230
230
|
else:
|
|
@@ -10,7 +10,7 @@ sys.argv = [
|
|
|
10
10
|
"--experiment_name",
|
|
11
11
|
"test",
|
|
12
12
|
"--model_name",
|
|
13
|
-
"
|
|
13
|
+
"esm2_t33_650M_UR50D",
|
|
14
14
|
"--fasta_path",
|
|
15
15
|
"src/tests/test_files/test.fasta",
|
|
16
16
|
"--output_path",
|
|
@@ -20,12 +20,10 @@ sys.argv = [
|
|
|
20
20
|
"--extract_embeddings",
|
|
21
21
|
"mean_pooled",
|
|
22
22
|
"per_token",
|
|
23
|
-
"
|
|
23
|
+
"substring_pooled",
|
|
24
24
|
"attention_head",
|
|
25
|
-
"--
|
|
25
|
+
"--streaming_output",
|
|
26
26
|
"true",
|
|
27
|
-
"--device",
|
|
28
|
-
"cpu",
|
|
29
27
|
]
|
|
30
28
|
|
|
31
29
|
args = parse_arguments()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_protein_model/pytorch_model.pt
RENAMED
|
File without changes
|
|
File without changes
|
{pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_protein_model/tokenizer_config.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|