rcsb-embedding-model 0.0.14__tar.gz → 0.0.16__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.16/.github/workflows/_workflow-docker.yaml +17 -0
  2. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/.github/workflows/publish.yaml +23 -13
  3. rcsb_embedding_model-0.0.16/Dockerfile +8 -0
  4. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/PKG-INFO +2 -2
  5. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/README.md +1 -1
  6. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/pyproject.toml +1 -1
  7. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/tests/test_remote_inference.py +4 -4
  8. rcsb_embedding_model-0.0.14/tests/resources/esm-from-chain-inference.csv +0 -2
  9. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/.gitignore +0 -0
  10. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/LICENSE.md +0 -0
  11. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/assets/embedding-model-architecture.png +0 -0
  12. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/examples/esm_embeddings.py +0 -0
  13. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/__init__.py +0 -0
  14. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/cli/args_utils.py +0 -0
  15. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/cli/inference.py +0 -0
  16. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/dataset/esm_prot_from_chain.py +0 -0
  17. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/dataset/esm_prot_from_structure.py +0 -0
  18. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/dataset/resdiue_assembly_embedding_from_structure.py +0 -0
  19. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/dataset/residue_assembly_embedding_from_tensor_file.py +0 -0
  20. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/dataset/residue_embedding_from_structure.py +0 -0
  21. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/dataset/residue_embedding_from_tensor_file.py +0 -0
  22. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/inference/assembly_inferece.py +0 -0
  23. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/inference/chain_inference.py +0 -0
  24. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/inference/esm_inference.py +0 -0
  25. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/inference/structure_inference.py +0 -0
  26. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/model/layers.py +0 -0
  27. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/model/residue_embedding_aggregator.py +0 -0
  28. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/modules/chain_module.py +0 -0
  29. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/modules/esm_module.py +0 -0
  30. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/modules/structure_module.py +0 -0
  31. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/rcsb_structure_embedding.py +0 -0
  32. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/types/api_types.py +0 -0
  33. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/utils/data.py +0 -0
  34. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/utils/model.py +0 -0
  35. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/utils/structure_parser.py +0 -0
  36. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/utils/structure_provider.py +0 -0
  37. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/src/rcsb_embedding_model/writer/batch_writer.py +0 -0
  38. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/tests/resources/embeddings/1acb.A.pt +0 -0
  39. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/tests/resources/embeddings/1acb.B.pt +0 -0
  40. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/tests/resources/embeddings/2uzi.A.pt +0 -0
  41. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/tests/resources/embeddings/2uzi.B.pt +0 -0
  42. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/tests/resources/embeddings/2uzi.C.pt +0 -0
  43. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/tests/resources/pdb/1acb.cif +0 -0
  44. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/tests/resources/pdb/2uzi.cif +0 -0
  45. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/tests/test_embedding_model.py +0 -0
  46. {rcsb_embedding_model-0.0.14 → rcsb_embedding_model-0.0.16}/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.
@@ -3,16 +3,15 @@ name: CI Pipeline
3
3
  on:
4
4
  push:
5
5
  branches: [master]
6
- tags:
7
- - 'v*'
8
6
  pull_request:
9
7
  branches: [master]
8
+ release:
9
+ types: [published]
10
10
 
11
11
  jobs:
12
- test:
12
+ hatch-test:
13
13
  name: Test on Python ${{ matrix.python-version }}
14
- runs-on:
15
- - "self-hosted"
14
+ runs-on: ["self-hosted", "buildchain"]
16
15
  timeout-minutes: 20
17
16
  strategy:
18
17
  matrix:
@@ -21,12 +20,17 @@ jobs:
21
20
  - name: Checkout code
22
21
  uses: actions/checkout@v4
23
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
+
24
28
  - name: Set up Python ${{ matrix.python-version }}
25
29
  uses: actions/setup-python@v4
26
30
  with:
27
31
  python-version: ${{ matrix.python-version }}
28
32
 
29
- - name: Install Hatch
33
+ - name: Install Hatch and HaggingFace
30
34
  run: pip install hatch huggingface_hub[cli]
31
35
 
32
36
  - name: Authenticate to Hugging Face
@@ -35,11 +39,11 @@ jobs:
35
39
  - name: Run tests
36
40
  run: hatch test
37
41
 
38
- build:
42
+ hatch-build:
39
43
  name: Build to PyPI
40
- needs: test
44
+ needs: hatch-test
41
45
  runs-on: ubuntu-latest
42
- # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
46
+ if: github.event_name == 'release'
43
47
  steps:
44
48
  - name: Checkout code
45
49
  uses: actions/checkout@v4
@@ -64,13 +68,13 @@ jobs:
64
68
  publish-to-pypi:
65
69
  name: >-
66
70
  Publish Python 🐍 distribution 📦 to PyPI
67
- # if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
71
+ if: github.event_name == 'release'
68
72
  needs:
69
- - build
73
+ - hatch-build
70
74
  runs-on: ubuntu-latest
71
75
  environment:
72
76
  name: pypi
73
- url: https://pypi.org/p/rcsb-embedding-model # Replace <package-name> with your PyPI project name
77
+ url: https://pypi.org/p/rcsb-embedding-model
74
78
  permissions:
75
79
  id-token: write
76
80
 
@@ -81,4 +85,10 @@ jobs:
81
85
  name: python-package-distributions
82
86
  path: dist/
83
87
  - name: Publish distribution 📦 to PyPI
84
- uses: pypa/gh-action-pypi-publish@release/v1
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,8 @@
1
+ FROM python:3.10
2
+
3
+ WORKDIR /app
4
+ COPY . /app/
5
+
6
+ RUN pip install --no-cache-dir -e .
7
+
8
+ ENTRYPOINT ["inference"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rcsb-embedding-model
3
- Version: 0.0.14
3
+ Version: 0.0.16
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.14
21
+ **Version** 0.0.16
22
22
 
23
23
 
24
24
  ## Overview
@@ -1,6 +1,6 @@
1
1
  # RCSB Embedding Model
2
2
 
3
- **Version** 0.0.14
3
+ **Version** 0.0.16
4
4
 
5
5
 
6
6
  ## Overview
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "rcsb-embedding-model"
3
- version = "0.0.14"
3
+ version = "0.0.16"
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