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.
Files changed (37) hide show
  1. {pepe_cli-1.0.4/src/pepe_cli.egg-info → pepe_cli-1.0.5}/PKG-INFO +1 -1
  2. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/__init__.py +1 -1
  3. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/embedders/custom_embedder.py +4 -2
  4. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/embedders/esm_embedder.py +1 -1
  5. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/embedders/huggingface_embedder.py +2 -2
  6. {pepe_cli-1.0.4 → pepe_cli-1.0.5/src/pepe_cli.egg-info}/PKG-INFO +1 -1
  7. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/tests/test_run.py +3 -5
  8. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/LICENSE +0 -0
  9. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/MANIFEST.in +0 -0
  10. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/README.md +0 -0
  11. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/create_example_custom_model.py +0 -0
  12. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_protein_model/config.json +0 -0
  13. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_protein_model/pytorch_model.pt +0 -0
  14. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_protein_model/special_tokens_map.json +0 -0
  15. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_protein_model/tokenizer_config.json +0 -0
  16. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_protein_model/vocab.json +0 -0
  17. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_protein_model/vocab.txt +0 -0
  18. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_sequences.fasta +0 -0
  19. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/custom_model/example_substring.csv +0 -0
  20. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/embedding_options.md +0 -0
  21. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/examples/model_selection.md +0 -0
  22. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/pyproject.toml +0 -0
  23. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/requirements.txt +0 -0
  24. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/setup.cfg +0 -0
  25. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/setup.py +0 -0
  26. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/__main__.py +0 -0
  27. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/embedders/__init__.py +0 -0
  28. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/embedders/base_embedder.py +0 -0
  29. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/model_selecter.py +0 -0
  30. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/parse_arguments.py +0 -0
  31. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe/utils.py +0 -0
  32. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe_cli.egg-info/SOURCES.txt +0 -0
  33. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe_cli.egg-info/dependency_links.txt +0 -0
  34. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe_cli.egg-info/entry_points.txt +0 -0
  35. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe_cli.egg-info/requires.txt +0 -0
  36. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/pepe_cli.egg-info/top_level.txt +0 -0
  37. {pepe_cli-1.0.4 → pepe_cli-1.0.5}/src/tests/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pepe-cli
3
- Version: 1.0.4
3
+ Version: 1.0.5
4
4
  Summary: Pipeline for Easy Protein Embedding - Extract embeddings and attention matrices from protein sequences
5
5
  Home-page: https://github.com/csi-greifflab/pepe-cli
6
6
  Author: Jahn Zhong
@@ -2,7 +2,7 @@ import logging
2
2
  import sys
3
3
 
4
4
  # Package metadata - single source of truth
5
- __version__ = "1.0.4"
5
+ __version__ = "1.0.5"
6
6
  __package_name__ = "pepe-cli"
7
7
  __module_name__ = "pepe"
8
8
  __author__ = "Jahn Zhong"
@@ -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, self.sequences, self.model_name,
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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pepe-cli
3
- Version: 1.0.4
3
+ Version: 1.0.5
4
4
  Summary: Pipeline for Easy Protein Embedding - Extract embeddings and attention matrices from protein sequences
5
5
  Home-page: https://github.com/csi-greifflab/pepe-cli
6
6
  Author: Jahn Zhong
@@ -10,7 +10,7 @@ sys.argv = [
10
10
  "--experiment_name",
11
11
  "test",
12
12
  "--model_name",
13
- "ZYMScott/antiberty",
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
- "substring_pooling",
23
+ "substring_pooled",
24
24
  "attention_head",
25
- "--batch_writing",
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
File without changes
File without changes
File without changes
File without changes
File without changes