-
Notifications
You must be signed in to change notification settings - Fork 367
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
Set model deployment configuration through the UI at runtime (verse .env) #151
Merged
Conversation
This file contains 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
BeatrixCohere
requested review from
EugeneLightsOn,
malexw,
scottmx81,
tianjing-li and
a team
as code owners
May 22, 2024 10:22
BeatrixCohere
had a problem deploying
to
development
May 22, 2024 10:22
— with
GitHub Actions
Failure
BeatrixCohere
had a problem deploying
to
development
May 22, 2024 10:31
— with
GitHub Actions
Failure
wujessica
approved these changes
May 22, 2024
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.
frontend side looks good!
src/interfaces/coral_web/src/components/EditEnvVariablesButton.tsx
Outdated
Show resolved
Hide resolved
src/interfaces/coral_web/src/components/EditEnvVariablesButton.tsx
Outdated
Show resolved
Hide resolved
tianjing-li
reviewed
May 22, 2024
BeatrixCohere
had a problem deploying
to
development
May 23, 2024 09:51
— with
GitHub Actions
Failure
BeatrixCohere
had a problem deploying
to
development
May 23, 2024 09:52
— with
GitHub Actions
Failure
BeatrixCohere
had a problem deploying
to
development
May 23, 2024 09:53
— with
GitHub Actions
Failure
BeatrixCohere
had a problem deploying
to
development
May 23, 2024 16:06
— with
GitHub Actions
Failure
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.
AI Description
This PR introduces changes to the backend and frontend services.
Backend
The PR adds a new
utils.py
module in thesrc/backend/model_deployments
directory, which defines theget_model_config_var
function. This function retrieves the model config variable value based on the provided variable name and model config.The
get_deployment
function, previously defined insrc/backend/model_deployments/utils.py
, has been moved tosrc/backend/chat/custom/utils.py
. This function now takes an additionalmodel_config
parameter and returns aBaseDeployment
instance based on the provided deployment name and model configuration.The
ModelDeploymentName
class insrc/backend/config/deployments.py
has been updated to import environment variables from the corresponding model deployment modules (BEDROCK_ENV_VARS
,COHERE_ENV_VARS
,AZURE_ENV_VARS
, andSAGE_MAKER_ENV_VARS
).The
is_available
method in theAzureDeployment
,BedrockDeployment
,CohereDeployment
, andSageMakerDeployment
classes has been modified to check if all required environment variables are set instead of checking specific variable values.The
get_deployment
function insrc/backend/chat/custom/custom.py
now passes themodel_config
parameter to theget_deployment
function.The
chat
method in theCustomChat
class insrc/backend/chat/custom/custom.py
has been updated to include themodel_config
parameter in the function signature.Frontend
The PR removes the line
# For SageMaker: The line below for AWS configure file to sync credentials
and$HOME/.aws:/root/.aws
from thedocker-compose.yml
file.Summary
To summarise, the PR introduces changes to the backend services by adding a new
utils.py
module, updating theget_deployment
function, modifying theModelDeploymentName
class and related deployment classes, and updating theget_deployment
andchat
methods. Additionally, the PR removes specific lines related to SageMaker configuration from thedocker-compose.yml
file in the frontend services.