Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
7c28e9a
new dial capability
Mar 18, 2025
bf677f9
reorganising the sampling and startegy modules
Mar 18, 2025
6e0a6e2
continue merger of Ankit's work into the stateful approach, get some …
Lance-Drane Apr 9, 2025
bd69987
updates for sklearn backened, added new variables such as extra_args,…
May 12, 2025
297c50e
sklearn tests updated, all passed
ashriva16 May 12, 2025
80bfe62
adding y_is_good in next_data_point
ashriva16 May 13, 2025
a13d9e0
Merge remote-tracking branch 'origin/develop' into march-work-merger
Lance-Drane May 13, 2025
aa01935
Merge remote-tracking branch 'origin/nomad' into march-work-merger
Lance-Drane May 13, 2025
6dd8be1
run ruff linter and formatter
Lance-Drane May 15, 2025
1c65210
fix default config path in 1d_sinusoidal_growth script
Lance-Drane May 15, 2025
3457a5b
only train models when adding new data to the database
Lance-Drane May 16, 2025
fd475d7
add '_client' suffix to client scripts
Lance-Drane May 16, 2025
af3eb1e
allow saving backend/kernel args, allow custom extra args
Lance-Drane May 16, 2025
cddd516
updated client
ashriva16 May 16, 2025
d72f080
run ruff formatter
Lance-Drane May 19, 2025
f53681c
make sure that updated args are applied when training the model
Lance-Drane May 20, 2025
7ebdd24
fix extra args merging
Lance-Drane May 20, 2025
d97da1f
penalised ucb
ashriva16 May 23, 2025
eb6943f
run formatter
Lance-Drane Jun 20, 2025
88f5491
Merge pull request #6 from INTERSECT-DIAL/march-work-merger
Lance-Drane Jun 20, 2025
45b036b
creating separate nomad strategy function: upper_confidence_bound_nomad
ashriva16 Jul 22, 2025
6f458b7
allow for MacOS tests to fail for now
Lance-Drane Jul 22, 2025
7a77a68
Merge pull request #10 from INTERSECT-DIAL/march-work-merger
Lance-Drane Jul 22, 2025
7d7bbf7
correcting the tests
ashriva16 Jul 22, 2025
f5a17c3
fix formatting
Lance-Drane Jul 22, 2025
06c49c4
Merge pull request #11 from INTERSECT-DIAL/march-work-merger
Lance-Drane Jul 22, 2025
57fdaef
temporarily allow for python 3.13 tests to fail as workaround for #12
Lance-Drane Jul 22, 2025
50d7528
Merge remote-tracking branch 'origin/main' into develop
Lance-Drane Nov 11, 2025
274effd
Bumps PDM version 2.21.0 for python compatibility
marshallmcdonnell Jan 9, 2026
c433f6e
Adds docker compose to also build dial
marshallmcdonnell Jan 9, 2026
8947dba
Adds docker tests to GH actions CI
marshallmcdonnell Jan 27, 2026
a66d44f
Adds release of container image to GHCR for tags
marshallmcdonnell Jan 27, 2026
674899b
DEBUG: add this feature branch for CI
marshallmcdonnell Jan 27, 2026
a499ff1
Fix for tests - reasonable tolerance for comparisons
marshallmcdonnell Jan 27, 2026
ee04b6f
Fix for uncertainty unit test for macOS py3.12
marshallmcdonnell Jan 27, 2026
153a544
Format fixes to tests
marshallmcdonnell Jan 27, 2026
0574246
Fix to container image CI release tag
marshallmcdonnell Jan 28, 2026
4770b58
Adds initial helm chart w/ forked image
marshallmcdonnell Jan 29, 2026
5392d77
Removes debug of my branch from ci.yml
marshallmcdonnell Jan 29, 2026
2be9e1b
Removes unnecessay service stuff from chart
marshallmcdonnell Jan 29, 2026
332024c
Removes more unused service stuff in chart
marshallmcdonnell Jan 29, 2026
0a937b1
Tidy up the chart README
marshallmcdonnell Jan 29, 2026
72d4935
allow for templating the config file
Lance-Drane Jan 29, 2026
3a82287
add probes to helm chart deployment
Lance-Drane Jan 29, 2026
532b46a
Apply HPA versioning suggestion from @Copilot
Lance-Drane Jan 29, 2026
903882f
Apply templating suggestion from @Copilot
Lance-Drane Jan 29, 2026
659a5e1
apply more corrections
Lance-Drane Jan 29, 2026
4023bbd
add helm chart releaser GH Action
Lance-Drane Jan 29, 2026
c1264f4
CHART: comment out 'serviceAccountName' so that serviceAccountName.cr…
Lance-Drane Jan 29, 2026
d11dc6e
fix README
Lance-Drane Jan 29, 2026
619ccba
Merge pull request #17 from marshallmcdonnell/16-add-docker
Lance-Drane Jan 29, 2026
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
38 changes: 31 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,52 @@ jobs:
name: Unit tests on various OSes and Python versions
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
python-version:
- python-version: "3.10"
continue-on-error: false
- python-version: "3.11"
continue-on-error: false
- python-version: "3.12"
continue-on-error: false
# TODO - fix issue with Jaxlib not installing
- python-version: "3.13"
continue-on-error: true
os:
- macos-latest
- windows-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
- os: macos-latest
continue-on-error: false
- os: windows-latest
continue-on-error: false
- os: ubuntu-latest
continue-on-error: false
runs-on: ${{ matrix.os.os }}
steps:
- uses: actions/checkout@v4
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-version.python-version }}
cache: true
- name: Install dependencies
run: |
pdm venv create --with-pip --force $PYTHON
pdm sync --dev -G:all
continue-on-error: ${{ matrix.os.continue-on-error || matrix.python-version.continue-on-error }}
- run: pdm run test-all
continue-on-error: ${{ matrix.os.continue-on-error || matrix.python-version.continue-on-error }}

docker-test:
name: Build Docker image and run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t dial:test --target test .
- name: Run tests in container
run: docker run --rm dial:test pytest tests/

continuous-deployment:
name: Update deployments automatically
needs: ['lint', 'test-all']
needs: ['lint', 'test-all', 'docker-test']
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}
runs-on: ubuntu-latest
steps:
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release

on:
push:
branches:
- develop
- main
tags:
- 'v*.*.*'
workflow_dispatch:

permissions:
contents: read
packages: write

jobs:
publish-image:
name: Build and publish Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
build-args: |
PRODUCTION=1
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
target: runtime
41 changes: 41 additions & 0 deletions .github/workflows/helm-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Helm

on:
push:
branches:
- "main"
paths:
- "chart/"
workflow_dispatch:

jobs:
helm-release:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Add Helm repo dependencies
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami

- name: Run chart-releaser for all applications
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
charts_dir: charts
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# ignore all configuration files except for our default one
*.json
!local-conf.json
!local-docker-conf.json

# testing reports
reports/
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM ${REPO}python:3.12-slim AS environment

# set to non-empty string to skip dev dependencies
ARG PRODUCTION=
ENV PDM_VERSION=2.19.3 \
ENV PDM_VERSION=2.21.0 \
PDM_HOME=/usr/local \
PDM_CHECK_UPDATE=false \
PIP_NO_CACHE_DIR=off \
Expand Down
69 changes: 41 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,36 +40,11 @@ To run linter and automatically fix errors:

## running infrastructure locally

You can use `docker compose up -d` to automatically spin up both a broker instance and a database instance locally.
You can use `docker compose up -d -f docker-compose-dev.yml` or to automatically spin up both a broker instance and a database instance locally.

To remove the infrastructure containers: `docker compose down -v`; leave off the `-v` flag if you would like to persist the DB data.

Note that if you are also running the Client/Service scripts in Docker, you will need to make sure that you add in appropriate `host` properties inside of `local-conf.json` (the host names are the names of the services in `docker-compose.yml`, instead of `127.0.0.1`):

```json
{
"intersect": {
"brokers": [
{
"username": "intersect_username",
"password": "intersect_password",
"host": "broker",
"port": 1883,
"protocol": "mqtt3.1.1"
}
]
},
"dial": {
"mongo": {
"username": null,
"password": null,
"host": "mongodb",
"port": 27017
}
}
}
If you also want to run DIAL inside the container, you can instead run `docker compose up -d`

```
To remove the infrastructure containers: `docker compose down -v`; leave off the `-v` flag if you would like to persist the DB data.

## Running

Expand All @@ -82,6 +57,7 @@ In a separate terminal, you can run one of the following clients:
CLI arg `--config` or environment variable `DIAL_CONFIG_FILE` should be a path to a valid JSON configuration. If neither value is set, it will default to `local-conf.json` .

- `local-conf.json` - If you set up the infrastructure locally via `docker compose up`, use this config file.
- `local-conf-docker.json` - This config file should only be used if you are running DIAL in the Docker image as well.

## Docker

Expand All @@ -98,6 +74,43 @@ To run the client, select one of the following:
- Automatic run: `docker run --rm -it -e DIAL_CONFIG_FILE=/app/config.json -v path-to-your-config.json:/app/config.json dial-image python scripts/automated_client.py`
- Manual run: `docker run --rm -it -e DIAL_CONFIG_FILE=/app/config.json -v path-to-your-config.json:/app/config.json dial-image python scripts/manual_client.py`

## Kubernetes Deployment (Helm)

A Helm chart is available for deploying Dial to Kubernetes with MongoDB database support. The chart includes:

- Dial service deployment
- MongoDB subchart from bitnami

### Quick Start

```bash
cd charts/dial
helm dependency update
helm install dial . -n dial --create-namespace
```

For detailed Helm chart documentation, see:
- [charts/dial/README.md](charts/dial/README.md) - Comprehensive Helm documentation

### Common Helm Commands

With custom INTERSECT configuration:
```bash
helm install dial . -n dial --create-namespace -f values.yaml -f values.config.yaml
```

With NodePort service:
```bash
helm install dial . -n dial --create-namespace -f values.yaml -f values.nodePort.yaml
```

With external MongoDB:
```bash
helm install dial . -n dial --create-namespace \
--set mongodb.enabled=false \
--set externalMongoDB.connectionString="mongodb://user:pass@host:27017/dial"
```

## Testing

You will need `pytest` installed to run the tests, it should be automatically included in your virtual environment if using the PDM workflow.
Expand Down
1 change: 1 addition & 0 deletions charts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
charts
2 changes: 2 additions & 0 deletions charts/dial/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Chart.lock
charts/
23 changes: 23 additions & 0 deletions charts/dial/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
12 changes: 12 additions & 0 deletions charts/dial/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v2
name: dial
description: "DIAL (Distributed INTERSECT Active Learning): An INTERSECT service that provides Bayesian optimization and active learning"
version: 0.1.0
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
version: "^2.9.1"
- name: mongodb
repository: https://charts.bitnami.com/bitnami
version: "^15.0.0"
condition: mongodb.enabled
Loading
Loading