Skip to content

Commit

Permalink
Change
Browse files Browse the repository at this point in the history
  • Loading branch information
BeatrixCohere committed Jul 26, 2024
1 parent d405b75 commit 2d733eb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/backend/config/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

SKIP_AUTH = os.getenv("SKIP_AUTH", None)
# Ex: [BasicAuthentication]
ENABLED_AUTH_STRATEGIES = []
ENABLED_AUTH_STRATEGIES = [OpenIDConnect]
if ENABLED_AUTH_STRATEGIES == [] and Settings().auth.enabled_auth is not None:
ENABLED_AUTH_STRATEGIES = [auth_map[auth] for auth in Settings().auth.enabled_auth]
if "pytest" in sys.modules or SKIP_AUTH == "true":
Expand Down
48 changes: 24 additions & 24 deletions src/backend/config/deployments.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,30 +46,30 @@ class ModelDeploymentName(StrEnum):
is_available=SingleContainerDeployment.is_available(),
env_vars=SC_ENV_VARS,
),
ModelDeploymentName.SageMaker: Deployment(
id="sagemaker",
name=ModelDeploymentName.SageMaker,
deployment_class=SageMakerDeployment,
models=SageMakerDeployment.list_models(),
is_available=SageMakerDeployment.is_available(),
env_vars=SAGE_MAKER_ENV_VARS,
),
ModelDeploymentName.Azure: Deployment(
id="azure",
name=ModelDeploymentName.Azure,
deployment_class=AzureDeployment,
models=AzureDeployment.list_models(),
is_available=AzureDeployment.is_available(),
env_vars=AZURE_ENV_VARS,
),
ModelDeploymentName.Bedrock: Deployment(
id="bedrock",
name=ModelDeploymentName.Bedrock,
deployment_class=BedrockDeployment,
models=BedrockDeployment.list_models(),
is_available=BedrockDeployment.is_available(),
env_vars=BEDROCK_ENV_VARS,
),
# ModelDeploymentName.SageMaker: Deployment(
# id="sagemaker",
# name=ModelDeploymentName.SageMaker,
# deployment_class=SageMakerDeployment,
# models=SageMakerDeployment.list_models(),
# is_available=SageMakerDeployment.is_available(),
# env_vars=SAGE_MAKER_ENV_VARS,
# ),
# ModelDeploymentName.Azure: Deployment(
# id="azure",
# name=ModelDeploymentName.Azure,
# deployment_class=AzureDeployment,
# models=AzureDeployment.list_models(),
# is_available=AzureDeployment.is_available(),
# env_vars=AZURE_ENV_VARS,
# ),
# ModelDeploymentName.Bedrock: Deployment(
# id="bedrock",
# name=ModelDeploymentName.Bedrock,
# deployment_class=BedrockDeployment,
# models=BedrockDeployment.list_models(),
# is_available=BedrockDeployment.is_available(),
# env_vars=BEDROCK_ENV_VARS,
# ),
}


Expand Down
3 changes: 1 addition & 2 deletions src/backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from backend.config.auth import (
get_auth_strategy_endpoints,
is_authentication_enabled,
verify_migrate_token,
)
from backend.config.routers import ROUTER_DEPENDENCIES
from backend.config.settings import Settings
Expand Down Expand Up @@ -119,7 +118,7 @@ async def health():
return {"status": "OK"}


@app.post("/migrate", dependencies=[Depends(verify_migrate_token)])
@app.post("/migrate")
async def apply_migrations():
"""
Applies Alembic migrations - useful for serverless applications
Expand Down

0 comments on commit 2d733eb

Please sign in to comment.