-
Notifications
You must be signed in to change notification settings - Fork 21
ITEP-64780 weights uploader #225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors and implements the weights uploader service (ITEP-64780
), adding configuration, unit tests, Helm charts, and updating related helper scripts.
- Added unit tests for
main
intest_weights_uploader.py
- Defined project metadata and dependencies in
pyproject.toml
- Introduced Helm chart templates for ServiceEntry, RBAC, proxy, and Job resources
- Implemented core upload/download logic in
app/weights_uploader.py
andapp/pretrained_models/pretrained_models.py
- Updated interactive AI workflows to use the new download utilities and exposed
WEIGHTS_URL
in pod definitions
Reviewed Changes
Copilot reviewed 15 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
platform/services/weights_uploader/tests/unit/test_weights_uploader.py |
Added auto-mocked env var fixture and success/failure tests |
platform/services/weights_uploader/pyproject.toml |
Project metadata, dependencies, and tooling config |
platform/services/weights_uploader/chart/templates/*.yaml |
Added Helm templates for ServiceEntry, RBAC, proxy, and Job |
platform/services/weights_uploader/app/weights_uploader.py |
Core S3 upload logic and main workflow |
platform/services/weights_uploader/app/pretrained_models/pretrained_models.py |
Download, unzip, retry, and SHA‐256 verification logic |
interactive_ai/.../scripts/run.py |
Switched calls from download_file_from_s3 to download_file |
interactive_ai/.../scripts/minio_util.py |
Refactored download utilities, added URL fallback |
interactive_ai/.../trainer_pod_definition.py |
Exposed WEIGHTS_URL in Kubernetes container environment |
Files not reviewed (4)
- platform/services/weights_uploader/.dockerignore: Language not supported
- platform/services/weights_uploader/Dockerfile: Language not supported
- platform/services/weights_uploader/Makefile: Language not supported
- platform/services/weights_uploader/app/pretrained_models/pretrained_models_v2.json: Language not supported
Comments suppressed due to low confidence (3)
platform/services/weights_uploader/pyproject.toml:6
- There's a typo in the description—"Wights" should be "Weights".
description = "Wights uploader service for Geti"
interactive_ai/workflows/otx_domain/trainer/otx_v2/scripts/minio_util.py:16
- The
download_file_from_url
function usesbucket_name
inside but does not accept it as a parameter, causing an undefined variable at runtime.
def download_file_from_url(client: Minio, object_name: str, file_path: str) -> None:
interactive_ai/workflows/otx_domain/trainer/otx_v2/scripts/minio_util.py:23
requests
is used here but not imported at the top of the module, leading to a NameError.
resp = requests.get(url, timeout=600)
platform/services/weights_uploader/chart/templates/weight_uploader_proxy.yaml
Show resolved
Hide resolved
platform/services/weights_uploader/app/pretrained_models/pretrained_models.py
Outdated
Show resolved
Hide resolved
interactive_ai/workflows/geti_domain/common/jobs_common/k8s_helpers/trainer_pod_definition.py
Outdated
Show resolved
Hide resolved
platform/services/weights_uploader/app/pretrained_models/pretrained_models.py
Outdated
Show resolved
Hide resolved
platform/services/weights_uploader/app/pretrained_models/pretrained_models_v2.json
Show resolved
Hide resolved
platform/services/weights_uploader/app/pretrained_models/pretrained_models_v2.json
Show resolved
Hide resolved
platform/services/weights_uploader/app/pretrained_models/pretrained_models.py
Outdated
Show resolved
Hide resolved
platform/services/weights_uploader/app/pretrained_models/pretrained_models.py
Show resolved
Hide resolved
16bf548
to
de590dd
Compare
de590dd
to
c2961ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
interactive_ai/workflows/geti_domain/common/jobs_common/k8s_helpers/trainer_pod_definition.py
Outdated
Show resolved
Hide resolved
interactive_ai/workflows/otx_domain/trainer/otx_v2/scripts/minio_util.py
Show resolved
Hide resolved
2399ec7
to
8a3830e
Compare
📝 Description
In order to overcome the problem with installation timeouts due to prolonged initial weights download, we changed the way they are copied to Geti.
In details:
Fixes #147
✨ Type of Change
Select the type of change your PR introduces:
🧪 Testing Scenarios
✅ Checklist
Before submitting the PR, ensure the following: