From 9ac6abe692db09064480f9be7560935f05b73714 Mon Sep 17 00:00:00 2001 From: AnchorArray Date: Mon, 19 Feb 2024 10:31:56 -0700 Subject: [PATCH] Update langkit with peformance improvements and default image --- README.md | 8 ++++---- charts/langkit/CHANGELOG.md | 16 +++++++++++++++ charts/langkit/Chart.yaml | 4 ++-- charts/langkit/README.md | 26 +++++++++++++----------- charts/langkit/templates/deployment.yaml | 12 ----------- charts/langkit/values.yaml | 22 ++++++++------------ 6 files changed, 44 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 843d2ca..14c52ee 100644 --- a/README.md +++ b/README.md @@ -18,18 +18,18 @@ # Downloads a .tgz file to the working directory or --destination path helm pull \ oci://ghcr.io/whylabs/langkit \ - --version "0.9.0" + --version "0.10.0" helm diff upgrade \ --allow-unreleased \ --namespace langkit \ `# Specify the .tgz file as the chart` \ - langkit langkit-0.9.0.tgz + langkit langkit-0.10.0.tgz helm upgrade --install \ --create-namespace \ --namespace langkit \ - langkit langkit-0.9.0.tgz + langkit langkit-0.10.0.tgz ``` #### Extended Example @@ -37,7 +37,7 @@ helm upgrade --install \ # Configure local variables for clarity and simplicity helm_repo="ghcr.io/whylabs" chart_name="langkit" -chart_version="0.9.0" +chart_version="0.10.0" chart="${chart_name}-${chart_version}.tgz" # Release and namespace values mirror other variables for simplicity. diff --git a/charts/langkit/CHANGELOG.md b/charts/langkit/CHANGELOG.md index 260f881..3d62c45 100644 --- a/charts/langkit/CHANGELOG.md +++ b/charts/langkit/CHANGELOG.md @@ -6,6 +6,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning] (https://semver.org/spec/v2.0.0.html). +## [0.10.0] - 2023-02-19 + +### Added + +- Recommendation for Intel processors and `6 GiB` of memory per pod. + +### Changed + +- Updated default image tag from `py-llm-1.0.2.dev6` to `py-llm-1.0.2.dev10`. +- Changed replica count from `3` to `4` for improved performance. +- Updated resource requests and limits for improved performance. + +### Removed + +- Removed the init container. + ## [0.9.0] - 2023-02-15 ### Added diff --git a/charts/langkit/Chart.yaml b/charts/langkit/Chart.yaml index d0dfe91..7eb5fdc 100644 --- a/charts/langkit/Chart.yaml +++ b/charts/langkit/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: langkit description: A Helm chart for LangKit container deployment type: application -version: 0.9.0 -appVersion: "1.0.2.dev6" +version: 0.10.0 +appVersion: "1.0.2.dev10" diff --git a/charts/langkit/README.md b/charts/langkit/README.md index 4e5e542..c48e6cc 100644 --- a/charts/langkit/README.md +++ b/charts/langkit/README.md @@ -37,6 +37,10 @@ No LangKit configurations are required out of the box. However, for further cust review the [langkit-container-examples](https://github.com/whylabs/langkit-container-examples) repository for more details. +### Hardware Requirements + +:rocket: For best performance, use Intel processors and ≥ `6 GiB` memory per replica. + ## Helm Chart Installation ### Template @@ -55,7 +59,7 @@ View the difference between the current state and desired state. # helm plugin install https://github.com/databus23/helm-diff helm diff upgrade \ --allow-unreleased \ - langkit langkit-0.9.0.tgz + langkit langkit-0.10.0.tgz ``` ### Install/Update @@ -63,14 +67,14 @@ helm diff upgrade \ helm upgrade --install \ --create-namespace \ --namespace langkit \ - langkit langkit-0.9.0.tgz + langkit langkit-0.10.0.tgz ``` ### Uninstall ```shell helm uninstall \ --namespace langkit \ - langkit langkit-0.9.0.tgz + langkit langkit-0.10.0.tgz ``` ## Development @@ -88,22 +92,20 @@ helm-docs --dry-run | Key | Type | Default | Description | |-----|------|---------|-------------| -| containers.env | list | `[{"name":"TRANSFORMERS_OFFLINE","value":1},{"name":"HF_DATASETS_OFFLINE","value":1},{"name":"HOME","value":"/home"},{"name":"HF_HOME","value":"/home/.cache/hf_home"}]` | Environment variables for the containers | +| containers.env | list | `[{"name":"LANGKIT_WORKERS","value":"1"},{"name":"TRANSFORMERS_OFFLINE","value":"1"},{"name":"HF_DATASETS_OFFLINE","value":"1"},{"name":"HOME","value":"/home"},{"name":"HF_HOME","value":"/home/.cache/hf_home"}]` | Environment variables for the containers | | containers.securityContext | object | `{"readOnlyRootFilesystem":true,"runAsUser":1000}` | Container security context | | containers.volumeMounts | list | `[{"mountPath":"/tmp","name":"temp-dir"},{"mountPath":"/home","name":"home"}]` | Volume mounts for containers | | fullnameOverride | string | `""` | | | image.containerPort | int | `8000` | | | image.pullPolicy | string | `"Always"` | | | image.repository | string | `"whylabs/whylogs"` | | -| image.tag | string | `"py-llm-1.0.2.dev6"` | | +| image.tag | string | `"py-llm-1.0.2.dev10"` | | | imagePullSecrets | list | `[]` | | | ingress.annotations | object | `{}` | | | ingress.className | string | `""` | | | ingress.enabled | bool | `false` | | | ingress.hosts | list | `[]` | | | ingress.tls | list | `[]` | | -| initContainers.command | list | `["sh","-c","cp -R /opt/whylogs-container/.cache /home/"]` | Command for init container | -| initContainers.volumeMounts | list | `[{"mountPath":"/home","name":"home"}]` | Volume mounts for init container | | livenessProbe.initialDelaySeconds | int | `15` | | | livenessProbe.periodSeconds | int | `10` | | | livenessProbe.tcpSocket.port | int | `8000` | | @@ -115,11 +117,11 @@ helm-docs --dry-run | readinessProbe.initialDelaySeconds | int | `15` | | | readinessProbe.periodSeconds | int | `10` | | | readinessProbe.tcpSocket.port | int | `8000` | | -| replicaCount | int | `3` | | -| resources.limits.cpu | string | `"8"` | | -| resources.limits.memory | string | `"16Gi"` | | -| resources.requests.cpu | string | `"4"` | | -| resources.requests.memory | string | `"8Gi"` | | +| replicaCount | int | `4` | | +| resources.limits.cpu | string | `"1"` | | +| resources.limits.memory | string | `"6Gi"` | | +| resources.requests.cpu | string | `"1"` | | +| resources.requests.memory | string | `"6Gi"` | | | secrets.langkitApiSecret.name | string | `"langkit-api-secret"` | Name of the secret that stores the WhyLabs LangKit API Secret | | secrets.whylabsApiKey.name | string | `"whylabs-api-key"` | Name of the secret that stores the WhyLabs API Key | | service.port | int | `80` | | diff --git a/charts/langkit/templates/deployment.yaml b/charts/langkit/templates/deployment.yaml index b2c410b..8d47c0c 100644 --- a/charts/langkit/templates/deployment.yaml +++ b/charts/langkit/templates/deployment.yaml @@ -28,18 +28,6 @@ spec: serviceAccountName: {{ include "langkit.serviceAccountName" . }} securityContext: {{- toYaml .Values.pod.securityContext | nindent 8 }} - initContainers: - - name: init - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - securityContext: - {{- toYaml .Values.containers.securityContext | nindent 12 }} - command: - {{- toYaml .Values.initContainers.command | nindent 12 }} - {{- with .Values.initContainers.volumeMounts }} - volumeMounts: - {{- toYaml . | nindent 12 }} - {{- end }} containers: - name: {{ .Chart.Name }} securityContext: diff --git a/charts/langkit/values.yaml b/charts/langkit/values.yaml index 1f55e85..393bef3 100644 --- a/charts/langkit/values.yaml +++ b/charts/langkit/values.yaml @@ -1,4 +1,4 @@ -replicaCount: 3 +replicaCount: 4 nameOverride: "" fullnameOverride: "" @@ -31,7 +31,7 @@ ingress: image: repository: whylabs/whylogs pullPolicy: Always - tag: py-llm-1.0.2.dev6 + tag: py-llm-1.0.2.dev10 containerPort: 8000 imagePullSecrets: [] @@ -56,6 +56,8 @@ containers: # runAsUser: 1000 # containers.env -- (list) Environment variables for the containers env: + - name: LANGKIT_WORKERS + value: "1" - name: TRANSFORMERS_OFFLINE value: "1" - name: HF_DATASETS_OFFLINE @@ -71,25 +73,17 @@ containers: - name: home mountPath: /home -initContainers: - # initContainers.command -- (list) Command for init container - command: ["sh", "-c", "cp -R /opt/whylogs-container/.cache /home/"] - # initContainers.volumeMounts -- (list) Volume mounts for init container - volumeMounts: - - name: home - mountPath: /home - service: type: ClusterIP port: 80 resources: requests: - cpu: "4" - memory: 8Gi + cpu: "1" + memory: 6Gi limits: - cpu: "8" - memory: 16Gi + cpu: "1" + memory: 6Gi secrets: whylabsApiKey: