Open
Conversation
Why upgrade protobuf? Dependency issue
1. `google-api-core[grpc]` requires `grpcio-status>=1.49.1`
2. `grpcio-status>=1.49.1` requires `protobuf >= 4.21`
3. we specify that `protobuf~=3.20`
Soln: upgrade protobuf. Why is is it safe to do this? Look at this
dependency graph from pipdeptree
```
protobuf==3.20.3
├── ddsketch==2.0.4 [requires: protobuf>=3.0.0]
│ └── ddtrace==1.8.3 [requires: ddsketch>=2.0.1]
├── ddtrace==1.8.3 [requires: protobuf>=3]
├── google-api-core==2.24.1 [requires: protobuf>=3.19.5,<6.0.0.dev0,!=4.21.5,!=4.21.4,!=4.21.3,!=4.21.2,!=4.21.1,!=4.21.0,!=3.20.1,!=3.20.0]
│ ├── google-cloud-artifact-registry==1.14.0 [requires: google-api-core>=1.34.1,<3.0.0dev,!=2.9.*,!=2.8.*,!=2.7.*,!=2.6.*,!=2.5.*,!=2.4.*,!=2.3.*,!=2.2.*,!=2.10.*,!=2.1.*,!=2.0.*]
│ └── google-cloud-secret-manager==2.22.1 [requires: google-api-core>=1.34.1,<3.0.0dev,!=2.9.*,!=2.8.*,!=2.7.*,!=2.6.*,!=2.5.*,!=2.4.*,!=2.3.*,!=2.2.*,!=2.10.*,!=2.1.*,!=2.0.*]
├── google-cloud-artifact-registry==1.14.0 [requires: protobuf>=3.20.2,<6.0.0dev,!=4.21.5,!=4.21.4,!=4.21.3,!=4.21.2,!=4.21.1,!=4.21.0]
├── google-cloud-secret-manager==2.22.1 [requires: protobuf>=3.20.2,<6.0.0dev,!=4.21.5,!=4.21.4,!=4.21.3,!=4.21.2,!=4.21.1,!=4.21.0]
├── googleapis-common-protos==1.66.0 [requires: protobuf>=3.20.2,<6.0.0.dev0,!=4.21.5,!=4.21.4,!=4.21.3,!=4.21.2,!=4.21.1,!=3.20.1,!=3.20.0]
│ ├── google-api-core==2.24.1 [requires: googleapis-common-protos>=1.56.2,<2.0.dev0]
│ ├── grpc-google-iam-v1==0.14.0 [requires: googleapis-common-protos>=1.56.0,<2.0.0dev]
│ └── grpcio-status==1.48.2 [requires: googleapis-common-protos>=1.5.5]
├── grpc-google-iam-v1==0.14.0 [requires: protobuf>=3.20.2,<6.0.0dev,!=4.21.5,!=4.21.4,!=4.21.3,!=4.21.2,!=4.21.1]
│ ├── google-cloud-artifact-registry==1.14.0 [requires: grpc-google-iam-v1>=0.12.4,<1.0.0dev]
│ └── google-cloud-secret-manager==2.22.1 [requires: grpc-google-iam-v1>=0.12.4,<1.0.0dev]
├── grpcio-status==1.48.2 [requires: protobuf>=3.12.0]
└── proto-plus==1.26.0 [requires: protobuf>=3.19.0,<6.0.0dev]
├── google-api-core==2.24.1 [requires: proto-plus>=1.22.3,<2.0.0dev]
├── google-cloud-artifact-registry==1.14.0 [requires: proto-plus>=1.22.3,<2.0.0dev]
└── google-cloud-secret-manager==2.22.1 [requires: proto-plus>=1.22.3,<2.0.0dev]
```
- ddtrace 1.8.3 has support for protobuf 4.21 ((pr)[DataDog/dd-trace-py#3791] that added it was in 2022, ddtrace 1.8.3 is from 2023)
- ddsketch has support ((release notes)[https://github.com/DataDog/sketches-py/blob/0d16e695d1f991276863b8ffaaf6c8e9bd9ad9de/releasenotes/notes/proto4-e8646610178bef59.yaml#L3] indicate support was added in May 2022, we use 2.0.4 from July 2022). This is also a transitive dep of dd-trace
- the rest are google deps I added for GCP support. Assume google works with these (they made protobuf!)
The model bundle is not written to the DB yet, but that's next!
AaDalal
commented
Feb 19, 2025
| elif infra_config().cloud_provider == "azure": | ||
| inference_task_queue_gateway = servicebus_task_queue_gateway | ||
| infra_task_queue_gateway = servicebus_task_queue_gateway | ||
| elif infra_config().cloud_provider == "gcp": |
Author
There was a problem hiding this comment.
@kovben95scale had a good question about this -- is there a reason we don't use redis on azure etc? I think we're just using this as a celery task queue here, which seems like it would fit with redis.
AaDalal
commented
Feb 19, 2025
model-engine/model_engine_server/infra/repositories/gcp_artifact_registry_docker_repository.py
Outdated
Show resolved
Hide resolved
AaDalal
commented
Feb 19, 2025
| @@ -55,16 +61,17 @@ def get_engine_url( | |||
| key_file = os.environ.get("DB_SECRET_NAME") | |||
| if env is None: | |||
| env = infra_config().env | |||
Author
There was a problem hiding this comment.
What are the values of env / where is it used?
GCPArtifactRegistryDockerRepository.get_latest_image_tag
AaDalal
commented
Feb 19, 2025
| ) | ||
|
|
||
| if broker_type == "redis": | ||
| # TODO gcp: change this to use cloud storage |
Author
There was a problem hiding this comment.
This should be covered in the cloud storage PR @anishxyz was working on. I think we can merge this first, then merge that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Summary
This PR
backend_protocolused to store the messages persistently. In Google Cloud Storage Integration #683 we should change this to use cloud storage.Note on upgrading
protobufThere's a dependency resolution issue raised because we installed google api sdks in this PR.
google-api-core[grpc]requiresgrpcio-status>=1.49.1grpcio-status>=1.49.1requiresprotobuf >= 4.21protobuf~=3.20Soln: upgrade protobuf. Why is is it safe to do this? Look at this pipdeptree output (things that depend on protobuf)
Test Plan and Usage Guide
How did you validate that your PR works correctly? How do you run or demo the code? Provide enough detail so a reviewer can reasonably reproduce the testing procedure. Paste example command line invocations if applicable.