Skip to content

Commit 1497452

Browse files
add back comments from initial code
1 parent 8961ea1 commit 1497452

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

model-engine/model_engine_server/infra/repositories/s3_file_llm_fine_tune_events_repository.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ def _open(self, uri: str, mode: str = "rt", **kwargs) -> IO:
2929
return smart_open.open(uri, mode, transport_params=transport_params)
3030

3131
def _get_model_cache_directory_name(self, model_name: str) -> str:
32+
"""How huggingface maps model names to directory names in their cache for model files.
33+
We adopt this when storing model cache files in s3.
34+
Args:
35+
model_name (str): Name of the huggingface model
36+
"""
37+
3238
name = "models--" + model_name.replace("/", "--")
3339
return name
3440

model-engine/model_engine_server/infra/repositories/s3_file_llm_fine_tune_repository.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def _open(self, uri: str, mode: str = "rt", **kwargs) -> IO:
2222

2323
@staticmethod
2424
def _get_key(model_name: str, fine_tuning_method: str) -> str:
25-
return f"{model_name}-{fine_tuning_method}"
25+
return f"{model_name}-{fine_tuning_method}" # possible for collisions but we control these names
2626

2727
async def get_job_template_for_model(
2828
self, model_name: str, fine_tuning_method: str

pr.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Add On-Premise Deployment Support
2+
3+
This PR adds comprehensive support for on-premise deployments using Redis, MinIO/S3-compatible storage, and private container registries as alternatives to cloud-managed services.
4+
5+
## Key Changes
6+
7+
- **New on-prem configuration**: Added `onprem.yaml` config file with settings for MinIO, Redis, and private registries
8+
- **Redis-based infrastructure**: Implemented Redis task queues and on-prem queue endpoint delegate
9+
- **S3-compatible storage**: Added support for MinIO and custom S3 endpoints with configurable addressing styles
10+
- **Container registry flexibility**: Support for private registries with `OnPremDockerRepository`
11+
- **Database configuration**: Environment variable-based PostgreSQL connection for on-prem deployments
12+
- **Improved logging**: Enhanced error handling and debug logs in S3 file storage gateway
13+
14+
## Configuration Highlights
15+
16+
The on-prem setup allows deployments to use:
17+
- MinIO or S3-compatible object storage instead of AWS S3/Azure Blob
18+
- Redis for Celery task queues and caching instead of SQS/ASB
19+
- Local PostgreSQL with environment-based credentials
20+
- Private container registries instead of ECR/ACR

0 commit comments

Comments
 (0)