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

add(FR-9): autoscaling feature UI in model service creation/modification panel #3024

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"backendaiclient",
"backendaioptions",
"baseversion",
"cooldown",
"cssinjs",
"cuda",
"FGPU",
Expand All @@ -30,6 +31,7 @@
"shmem",
"Signout",
"superadmin",
"Talkativot",
"Tensorboard",
"textbox",
"Totp",
Expand All @@ -39,16 +41,7 @@
"Warboy",
"webcomponent",
"webui",
"wsproxy",
"ahooks",
"lucide",
"Signout",
"Totp",
"Keypairs",
"Hyperaccel",
"Tensorboard",
"Automount",
"Talkativot"
"wsproxy"
],
"flagWords": [
"데이터레이크",
Expand Down
135 changes: 134 additions & 1 deletion react/data/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,12 @@ type Queries {

"""Added in 24.12.0."""
networks(filter: String, order: String, offset: Int, before: String, after: String, first: Int, last: Int): NetworkConnection

"""Added in 25.1.0."""
endpoint_auto_scaling_rule_node(id: String!): EndpointAutoScalingRuleNode

"""Added in 25.1.0."""
endpoint_auto_scaling_rule_nodes(endpoint: String!, filter: String, order: String, offset: Int, before: String, after: String, first: Int, last: Int): EndpointAutoScalingRuleConnection
}

"""
Expand Down Expand Up @@ -1471,13 +1477,15 @@ type QuotaDetails {
hard_limit_bytes: BigInt
}

"""Deprecated since 24.09.0. use `ContainerRegistryNode` instead"""
type ContainerRegistry implements Node {
"""The ID of the object"""
id: ID!
hostname: String
config: ContainerRegistryConfig
}

"""Deprecated since 24.09.0."""
type ContainerRegistryConfig {
url: String!
type: String!
Expand Down Expand Up @@ -1651,6 +1659,63 @@ type NetworkEdge {
cursor: String!
}

"""Added in 25.1.0."""
type EndpointAutoScalingRuleNode implements Node {
"""The ID of the object"""
id: ID!
row_id: UUID!
metric_source: AutoScalingMetricSource!
metric_name: String!
threshold: String!
comparator: AutoScalingMetricComparator!
step_size: Int!
cooldown_seconds: Int!
min_replicas: Int
max_replicas: Int
created_at: DateTime!
last_triggered_at: DateTime
endpoint: UUID!
}

"""The source type to fetch metrics. Added in 25.1.0."""
enum AutoScalingMetricSource {
KERNEL
INFERENCE_FRAMEWORK
}

"""
The comparator used to compare the metric value with the threshold. Added in 25.1.0.
"""
enum AutoScalingMetricComparator {
LESS_THAN
LESS_THAN_OR_EQUAL
GREATER_THAN
GREATER_THAN_OR_EQUAL
}

"""Added in 25.1.0."""
type EndpointAutoScalingRuleConnection {
"""Pagination data for this connection."""
pageInfo: PageInfo!

"""Contains the nodes in this connection."""
edges: [EndpointAutoScalingRuleEdge]!

"""Total count of the GQL nodes of the query."""
count: Int
}

"""
Added in 25.1.0. A Relay edge containing a `EndpointAutoScalingRule` and its cursor.
"""
type EndpointAutoScalingRuleEdge {
"""The item at the end of the edge"""
node: EndpointAutoScalingRuleNode

"""A cursor for use in pagination"""
cursor: String!
}

"""All available GraphQL mutations."""
type Mutations {
modify_agent(id: String!, props: ModifyAgentInput!): ModifyAgent
Expand Down Expand Up @@ -1715,7 +1780,11 @@ type Mutations {
create_keypair(props: KeyPairInput!, user_id: String!): CreateKeyPair
modify_keypair(access_key: String!, props: ModifyKeyPairInput!): ModifyKeyPair
delete_keypair(access_key: String!): DeleteKeyPair
rescan_images(registry: String): RescanImages
rescan_images(
"""Added in 25.1.0."""
project: String
registry: String
): RescanImages
preload_image(references: [String]!, target_agents: [String]!): PreloadImage
unload_image(references: [String]!, target_agents: [String]!): UnloadImage
modify_image(architecture: String = "x86_64", props: ModifyImageInput!, target: String!): ModifyImage
Expand Down Expand Up @@ -1848,8 +1917,23 @@ type Mutations {
"""Object id. Can be either global id or object id. Added in 24.09.0."""
id: String!
): DeleteContainerRegistryNode

"""Added in 25.1.0."""
create_endpoint_auto_scaling_rule_node(endpoint: String!, props: EndpointAutoScalingRuleInput!): CreateEndpointAutoScalingRuleNode

"""Added in 25.1.0."""
modify_endpoint_auto_scaling_rule_node(id: String!, props: ModifyEndpointAutoScalingRuleInput!): ModifyEndpointAutoScalingRuleNode

"""Added in 25.1.0."""
delete_endpoint_auto_scaling_rule_node(id: String!): DeleteEndpointAutoScalingRuleNode

"""Deprecated since 24.09.0. use `CreateContainerRegistryNode` instead"""
create_container_registry(hostname: String!, props: CreateContainerRegistryInput!): CreateContainerRegistry

"""Deprecated since 24.09.0. use `ModifyContainerRegistryNode` instead"""
modify_container_registry(hostname: String!, props: ModifyContainerRegistryInput!): ModifyContainerRegistry

"""Deprecated since 24.09.0. use `DeleteContainerRegistryNode` instead"""
delete_container_registry(hostname: String!): DeleteContainerRegistry
modify_endpoint(endpoint_id: UUID!, props: ModifyEndpointInput!): ModifyEndpoint

Expand Down Expand Up @@ -2581,10 +2665,56 @@ type DeleteContainerRegistryNode {
container_registry: ContainerRegistryNode
}

"""Added in 25.1.0."""
type CreateEndpointAutoScalingRuleNode {
ok: Boolean
msg: String
rule: EndpointAutoScalingRuleNode
}

"""Added in 25.1.0."""
input EndpointAutoScalingRuleInput {
metric_source: AutoScalingMetricSource!
metric_name: String!
threshold: String!
comparator: AutoScalingMetricComparator!
step_size: Int!
cooldown_seconds: Int!
min_replicas: Int
max_replicas: Int
}

"""Added in 25.1.0."""
type ModifyEndpointAutoScalingRuleNode {
ok: Boolean
msg: String
rule: EndpointAutoScalingRuleNode
}

"""Added in 25.1.0."""
input ModifyEndpointAutoScalingRuleInput {
metric_source: AutoScalingMetricSource
metric_name: String
threshold: String
comparator: AutoScalingMetricComparator
step_size: Int
cooldown_seconds: Int
min_replicas: Int
max_replicas: Int
}

"""Added in 25.1.0."""
type DeleteEndpointAutoScalingRuleNode {
ok: Boolean
msg: String
}

"""Deprecated since 24.09.0. use `CreateContainerRegistryNode` instead"""
type CreateContainerRegistry {
container_registry: ContainerRegistry
}

"""Deprecated since 24.09.0."""
input CreateContainerRegistryInput {
url: String!
type: String!
Expand All @@ -2597,10 +2727,12 @@ input CreateContainerRegistryInput {
is_global: Boolean
}

"""Deprecated since 24.09.0. use `ModifyContainerRegistryNode` instead"""
type ModifyContainerRegistry {
container_registry: ContainerRegistry
}

"""Deprecated since 24.09.0."""
input ModifyContainerRegistryInput {
url: String
type: String
Expand All @@ -2613,6 +2745,7 @@ input ModifyContainerRegistryInput {
is_global: Boolean
}

"""Deprecated since 24.09.0. use `DeleteContainerRegistryNode` instead"""
type DeleteContainerRegistry {
container_registry: ContainerRegistry
}
Expand Down
Loading