rcsb-embedding-model 0.0.13__tar.gz → 0.0.15__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.

Potentially problematic release.


This version of rcsb-embedding-model might be problematic. Click here for more details.

Files changed (46) hide show
  1. rcsb_embedding_model-0.0.15/.github/workflows/_workflow-docker.yaml +17 -0
  2. rcsb_embedding_model-0.0.15/.github/workflows/publish.yaml +94 -0
  3. rcsb_embedding_model-0.0.15/Dockerfile +6 -0
  4. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/PKG-INFO +2 -2
  5. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/README.md +1 -1
  6. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/pyproject.toml +1 -1
  7. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/tests/test_remote_inference.py +4 -4
  8. rcsb_embedding_model-0.0.13/tests/resources/esm-from-chain-inference.csv +0 -2
  9. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/.gitignore +0 -0
  10. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/LICENSE.md +0 -0
  11. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/assets/embedding-model-architecture.png +0 -0
  12. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/examples/esm_embeddings.py +0 -0
  13. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/__init__.py +0 -0
  14. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/cli/args_utils.py +0 -0
  15. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/cli/inference.py +0 -0
  16. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/dataset/esm_prot_from_chain.py +0 -0
  17. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/dataset/esm_prot_from_structure.py +0 -0
  18. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/dataset/resdiue_assembly_embedding_from_structure.py +0 -0
  19. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/dataset/residue_assembly_embedding_from_tensor_file.py +0 -0
  20. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/dataset/residue_embedding_from_structure.py +0 -0
  21. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/dataset/residue_embedding_from_tensor_file.py +0 -0
  22. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/inference/assembly_inferece.py +0 -0
  23. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/inference/chain_inference.py +0 -0
  24. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/inference/esm_inference.py +0 -0
  25. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/inference/structure_inference.py +0 -0
  26. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/model/layers.py +0 -0
  27. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/model/residue_embedding_aggregator.py +0 -0
  28. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/modules/chain_module.py +0 -0
  29. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/modules/esm_module.py +0 -0
  30. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/modules/structure_module.py +0 -0
  31. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/rcsb_structure_embedding.py +0 -0
  32. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/types/api_types.py +0 -0
  33. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/utils/data.py +0 -0
  34. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/utils/model.py +0 -0
  35. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/utils/structure_parser.py +0 -0
  36. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/utils/structure_provider.py +0 -0
  37. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/src/rcsb_embedding_model/writer/batch_writer.py +0 -0
  38. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/tests/resources/embeddings/1acb.A.pt +0 -0
  39. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/tests/resources/embeddings/1acb.B.pt +0 -0
  40. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/tests/resources/embeddings/2uzi.A.pt +0 -0
  41. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/tests/resources/embeddings/2uzi.B.pt +0 -0
  42. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/tests/resources/embeddings/2uzi.C.pt +0 -0
  43. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/tests/resources/pdb/1acb.cif +0 -0
  44. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/tests/resources/pdb/2uzi.cif +0 -0
  45. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/tests/test_embedding_model.py +0 -0
  46. {rcsb_embedding_model-0.0.13 → rcsb_embedding_model-0.0.15}/tests/test_inference.py +0 -0
@@ -0,0 +1,17 @@
1
+ # Docker build and push workflow
2
+
3
+ name: Run CI/CD Docker Workflow
4
+
5
+ on:
6
+ workflow_call:
7
+
8
+ jobs:
9
+ run-workflow:
10
+ if: github.event_name == 'release'
11
+ name: "Run automated docker workflow"
12
+ uses: rcsb/devops-cicd-github-actions/.github/workflows/workflow-docker.yaml@master
13
+ with:
14
+ dockerfile_location: "Dockerfile" # The location of the Dockerfile relative to the root of the repository. Defaults to "Dockerfile".
15
+ repo_project: "rcsb" # REQUIRED. The name of the project or organization in the remote Docker image repository.
16
+ docker_image_name: "rcsb-embedding-model" # REQUIRED. The name of the Docker image to create.
17
+ docker_build_context: "." # The path location of the docker build context, relative to the project root. Defaults to the project root.
@@ -0,0 +1,94 @@
1
+ name: CI Pipeline
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+ release:
9
+ types: [published]
10
+
11
+ jobs:
12
+ hatch-test:
13
+ name: Test on Python ${{ matrix.python-version }}
14
+ runs-on: ["self-hosted", "buildchain"]
15
+ timeout-minutes: 20
16
+ strategy:
17
+ matrix:
18
+ python-version: ["3.10"]
19
+ steps:
20
+ - name: Checkout code
21
+ uses: actions/checkout@v4
22
+
23
+ - name: Install build dependencies
24
+ run: |
25
+ sudo apt-get update
26
+ sudo apt-get install -y build-essential pkg-config libzstd-dev
27
+
28
+ - name: Set up Python ${{ matrix.python-version }}
29
+ uses: actions/setup-python@v4
30
+ with:
31
+ python-version: ${{ matrix.python-version }}
32
+
33
+ - name: Install Hatch and HaggingFace
34
+ run: pip install hatch huggingface_hub[cli]
35
+
36
+ - name: Authenticate to Hugging Face
37
+ run: huggingface-cli login --token ${{ secrets.HF_API_TOKEN }}
38
+
39
+ - name: Run tests
40
+ run: hatch test
41
+
42
+ hatch-build:
43
+ name: Build to PyPI
44
+ needs: hatch-test
45
+ runs-on: ubuntu-latest
46
+ if: github.event_name == 'release'
47
+ steps:
48
+ - name: Checkout code
49
+ uses: actions/checkout@v4
50
+
51
+ - name: Set up Python 3.10
52
+ uses: actions/setup-python@v4
53
+ with:
54
+ python-version: "3.10"
55
+
56
+ - name: Install Hatch
57
+ run: pip install hatch
58
+
59
+ - name: Build distribution
60
+ run: hatch build
61
+
62
+ - name: Store the distribution packages
63
+ uses: actions/upload-artifact@v4
64
+ with:
65
+ name: python-package-distributions
66
+ path: dist/
67
+
68
+ publish-to-pypi:
69
+ name: >-
70
+ Publish Python 🐍 distribution 📦 to PyPI
71
+ if: github.event_name == 'release'
72
+ needs:
73
+ - hatch-build
74
+ runs-on: ubuntu-latest
75
+ environment:
76
+ name: pypi
77
+ url: https://pypi.org/p/rcsb-embedding-model
78
+ permissions:
79
+ id-token: write
80
+
81
+ steps:
82
+ - name: Download all the dists
83
+ uses: actions/download-artifact@v4
84
+ with:
85
+ name: python-package-distributions
86
+ path: dist/
87
+ - name: Publish distribution 📦 to PyPI
88
+ uses: pypa/gh-action-pypi-publish@release/v1
89
+
90
+ push-image:
91
+ needs:
92
+ - hatch-test
93
+ name: Push image to harbor
94
+ uses: ./.github/workflows/_workflow-docker.yaml
@@ -0,0 +1,6 @@
1
+ FROM python:3.10
2
+
3
+ WORKDIR /app
4
+ COPY . /app/
5
+
6
+ RUN pip install --no-cache-dir -e .
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rcsb-embedding-model
3
- Version: 0.0.13
3
+ Version: 0.0.15
4
4
  Summary: Protein Embedding Model for Structure Search
5
5
  Project-URL: Homepage, https://github.com/rcsb/rcsb-embedding-model
6
6
  Project-URL: Issues, https://github.com/rcsb/rcsb-embedding-model/issues
@@ -18,7 +18,7 @@ Description-Content-Type: text/markdown
18
18
 
19
19
  # RCSB Embedding Model
20
20
 
21
- **Version** 0.0.13
21
+ **Version** 0.0.15
22
22
 
23
23
 
24
24
  ## Overview
@@ -1,6 +1,6 @@
1
1
  # RCSB Embedding Model
2
2
 
3
- **Version** 0.0.13
3
+ **Version** 0.0.15
4
4
 
5
5
 
6
6
  ## Overview
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "rcsb-embedding-model"
3
- version = "0.0.13"
3
+ version = "0.0.15"
4
4
  authors = [
5
5
  { name="Joan Segura", email="joan.segura@rcsb.org" },
6
6
  ]
@@ -14,8 +14,8 @@ class TestRemoteInference(unittest.TestCase):
14
14
 
15
15
  esm_embeddings = predict(
16
16
  src_stream=[
17
- ("3jce", "https://files.rcsb.org/download/3jce.cif", "3jce"),
18
- ("9qxy", "https://files.rcsb.org/download/9qxy.cif", "9qxy")
17
+ ("1acb", "https://files.rcsb.org/download/1acb.cif", "1acb"),
18
+ ("2uzi", "https://files.rcsb.org/download/2uzi.cif", "2uzi")
19
19
  ],
20
20
  src_location=SrcLocation.stream,
21
21
  src_from=SrcProteinFrom.structure,
@@ -24,8 +24,8 @@ class TestRemoteInference(unittest.TestCase):
24
24
  accelerator=Accelerator.cpu
25
25
  )
26
26
 
27
- self.assertEqual(len(esm_embeddings), 52)
28
- shapes = ((208, 1536), (207, 1536), (152, 1536), (104, 1536), (153, 1536), (131, 1536), (129, 1536), (100, 1536), (119, 1536), (125, 1536), (116, 1536), (102, 1536), (90, 1536), (84, 1536), (82, 1536), (57, 1536), (81, 1536), (87, 1536), (53, 1536), (220, 1536), (58, 1536), (52, 1536), (48, 1536), (66, 1536), (40, 1536), (236, 1536), (272, 1536), (211, 1536), (203, 1536), (179, 1536), (178, 1536), (151, 1536), (143, 1536), (144, 1536), (124, 1536), (145, 1536), (138, 1536), (122, 1536), (118, 1536), (116, 1536), (119, 1536), (105, 1536), (112, 1536), (95, 1536), (104, 1536), (96, 1536), (81, 1536), (79, 1536), (65, 1536), (60, 1536), (588, 1536), (208, 1536))
27
+ self.assertEqual(len(esm_embeddings), 5)
28
+ shapes = ((243, 1536), (65, 1536), (116, 1536), (106, 1536), (168, 1536))
29
29
  for idx, shape in enumerate(shapes):
30
30
  self.assertEqual(tuple(esm_embeddings[idx][0][0].shape), shape)
31
31
 
@@ -1,2 +0,0 @@
1
- 8GYM,/Users/joan/tmp/8GYM.cif,A,8GYM.A
2
- 2YBB,/Users/joan/tmp/2YBB.cif,A,2YBB.A