Skip to content
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
merged 17 commits into from
May 24, 2024

Conversation

BeatrixCohere
Copy link
Collaborator

@BeatrixCohere BeatrixCohere commented May 22, 2024

  • Updates Coral to set the deployment options in the request verse .env file
  • Return available deployment at one deployment call verse multiple
  • Update sagemaker auth configuration
  • clean up env vars in backend

AI Description

This PR introduces changes to the backend and frontend services.

Backend

The PR adds a new utils.py module in the src/backend/model_deployments directory, which defines the get_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 in src/backend/model_deployments/utils.py, has been moved to src/backend/chat/custom/utils.py. This function now takes an additional model_config parameter and returns a BaseDeployment instance based on the provided deployment name and model configuration.

The ModelDeploymentName class in src/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, and SAGE_MAKER_ENV_VARS).

The is_available method in the AzureDeployment, BedrockDeployment, CohereDeployment, and SageMakerDeployment classes has been modified to check if all required environment variables are set instead of checking specific variable values.

The get_deployment function in src/backend/chat/custom/custom.py now passes the model_config parameter to the get_deployment function.

The chat method in the CustomChat class in src/backend/chat/custom/custom.py has been updated to include the model_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 the docker-compose.yml file.

Summary

To summarise, the PR introduces changes to the backend services by adding a new utils.py module, updating the get_deployment function, modifying the ModelDeploymentName class and related deployment classes, and updating the get_deployment and chat methods. Additionally, the PR removes specific lines related to SageMaker configuration from the docker-compose.yml file in the frontend services.

Copy link
Contributor

@wujessica wujessica left a 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!

@BeatrixCohere BeatrixCohere merged commit bfe5503 into main May 24, 2024
2 checks passed
@BeatrixCohere BeatrixCohere deleted the beatrix/SetCloudConfig branch May 24, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants