Skip to content

Commit

Permalink
Merge pull request #12 from whylabs/dev/aberg/update
Browse files Browse the repository at this point in the history
Update langkit with peformance improvements and default image
  • Loading branch information
andyndang authored Feb 20, 2024
2 parents 27015cb + 9ac6abe commit a624f61
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 44 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,26 @@
# 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
```shell
# 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.
Expand Down
16 changes: 16 additions & 0 deletions charts/langkit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions charts/langkit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
26 changes: 14 additions & 12 deletions charts/langkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -55,22 +59,22 @@ 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
```shell
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
Expand All @@ -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` | |
Expand All @@ -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` | |
Expand Down
12 changes: 0 additions & 12 deletions charts/langkit/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
22 changes: 8 additions & 14 deletions charts/langkit/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
replicaCount: 3
replicaCount: 4

nameOverride: ""
fullnameOverride: ""
Expand Down Expand Up @@ -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: []
Expand All @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit a624f61

Please sign in to comment.