-
Notifications
You must be signed in to change notification settings - Fork 371
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
backend: Deployments refactor; Add deployment service and fix deployment config setting #831
base: main
Are you sure you want to change the base?
backend: Deployments refactor; Add deployment service and fix deployment config setting #831
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.
TODOs
src/interfaces/coral_web/src/components/EditEnvVariablesButton.tsx
Outdated
Show resolved
Hide resolved
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.
Great great PR, happy to see a lot of these changes. Added some general comments throughout
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.
Looks good to me, pinged @EugeneLightsOn to help take a second look
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.
Great work, some changes are requested
…es-i-dont-know-if-its-been
…es-i-dont-know-if-its-been
…es-i-dont-know-if-its-been
…n serialization issue
…es-i-dont-know-if-its-been
The motivation for this change was a request to improve how deployment configs are set in Coral.
Deployments are set up by creating subclasses of BaseDeployment and usually these have the configuration values we want to use when calling models. However, we also have the ability to make changes to these models, which are then stored in the DB. This refactor introduces a
deployment_service
module to hide the differences between models that are purely defined in code and models that have updates stored in the DB.This change also finishes off the partially-completed Coral work that allows for changing model config values.
There is a new potential security issue now introduced. We are assuming that anyone who is running Toolkit should have permission to view and change global deployment configurations, which includes API keys. If that's not true, we'll need to add a concept of admin users in the future and prevent non-admins from viewing and changing these values.
AI Description
This PR introduces a new
DeploymentNotFoundError
exception to handle cases where a deployment is not found. It also refactors theget_deployment
function to use a newdeployment_service
module, which provides methods for retrieving deployments by name or ID. Theget_deployment
function now returns aBaseDeployment
instance, which is a base class for all model deployment options.The PR also adds a new
DeploymentInfo
class, which represents the information required to interact with an LLM. This class is used in various parts of the codebase, including thecreate_deployment
,update_deployment
, andget_deployment
functions.Additionally, the PR updates the
create_deployment_by_config
andcreate_model_by_config
functions to use the newDeploymentInfo
class. It also updates thevalidate_deployment_config
function to use the newdeployment_service
module.The PR also introduces a new
get_installed_deployments
function, which returns a list of installed deployments. This function is used in theget_available_deployments
function, which has been updated to use the newdeployment_service
module.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also introduces a new
update_config
function, which updates the configuration of a deployment. This function is used in theset_env_vars
function, which has been updated to use the newdeployment_service
module.The PR also updates the
validate_env_vars
function to use the newdeployment_service
module. This function is used in thecreate_agent
function, which has been updated to use the newDeploymentInfo
class.The PR also introduces a new
get_default_deployment
function, which returns the default deployment. This function is used in theget_deployment
function, which has been updated to use the newdeployment_service
module.The PR also updates the
get_available_deployments
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployments_info
function to use the newdeployment_service
module. This function is used in thelist_deployments
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info
function to use the newdeployment_service
module. This function is used in theget_deployment
function, which has been updated to use the newDeploymentInfo
class.The PR also updates the
get_deployment_info_by_name
function to use the newdeployment_service
module. This function is used in theget_deployments_info
function, which has been updated to use the newDeploymentInfo
class.The PR also updates