Skip to content

Commit

Permalink
Merge branch 'main' into aim-tags-support
Browse files Browse the repository at this point in the history
  • Loading branch information
suprjinx committed Jun 11, 2024
2 parents 5bcd199 + 135be30 commit b9d6e0e
Show file tree
Hide file tree
Showing 308 changed files with 10,792 additions and 13,248 deletions.
6 changes: 1 addition & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,4 @@ COPY --from=tools /tmp/tools /usr/local/bin
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

# Install xh
RUN curl -sfL https://raw.githubusercontent.com/ducaale/xh/master/install.sh | XH_BINDIR=/usr/local/bin sh

# Add docker-compose symlink to Docker Compose v2
# This is a workaround until https://github.com/devcontainers/features/pull/621 lands
RUN ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/local/bin/
RUN curl -sfL https://raw.githubusercontent.com/ducaale/xh/master/install.sh | XH_BINDIR=/usr/local/bin sh
4 changes: 1 addition & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"dockerDashComposeVersion": "none"
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/node:1": {
Expand Down
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/ask_question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Need Help?
description: Ask a question or request help regarding FastTrackML
title: "[QUESTION]: <title>"
labels: [ "question" ]

body:
- type: textarea
id: question-details
attributes:
label: Question / Problem
description: Provide a clear and concise description of your question or the issue you're facing.
validations:
required: true

- type: textarea
id: environment
attributes:
label: Environment
description: "Please provide details about your environment:"
value: |
- FastTrackML Version: [e.g., 0.3.6]
- Operating System: [e.g., Ubuntu 18.04]
- Database: [e.g., SQLite]
- Artifact Storage: [e.g., MinIO]
validations:
required: false

- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Include any relevant context, screenshots, or code snippets that can help us better understand and address your question or problem.
validations:
required: false
61 changes: 61 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Bug report
description: Create a report to help us improve FastTrackML
title: "[BUG]: <title>"
labels: [ "bug" ]

body:
- type: markdown
attributes:
value: |
**Thank you for reporting this issue!**
To help us understand and address the problem effectively, please provide detailed information.
You can refer to [this guide](https://stackoverflow.com/help/mcve) for tips on creating a good bug report.
- type: textarea
id: describe-bug
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true

- type: textarea
id: environment
attributes:
label: Environment
description: "Please complete the following information:"
value: |
- FastTrackML Version: [e.g., 0.3.6]
- Operating System: [e.g., Ubuntu 18.04]
- Database: [e.g., SQLite]
- Artifact Storage: [e.g., MinIO]
validations:
required: true

- type: textarea
id: steps-to-reproduce
attributes:
label: Steps To Reproduce
description: "Detailed steps to reproduce the behavior:"
placeholder: |
1. Provide a minimal code example or steps.
2. Specify the command used to run.
3. Explain the exact error message or current behavior.
validations:
required: true

- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true

- type: textarea
id: context
attributes:
label: Additional Context (Optional)
description: Add any other context about the problem here, including log outputs or screenshots if applicable.
validations:
required: false
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Feature request
description: Suggest a new idea for FastTrackML
title: "[FEATURE REQUEST]: <title>"
labels: [ "feature" ]

body:
- type: textarea
id: describe-desired-feature
attributes:
label: Describe the feature you'd like
description: A clear and concise description of what you want to happen.
placeholder: ex. I wish I could [...]
validations:
required: true

- type: textarea
id: related-problem
attributes:
label: Is your feature request related to a problem? Please describe
description: A clear and concise description of what the problem is.
placeholder: ex. I'm always frustrated when [...]
validations:
required: false

- type: textarea
id: describe-alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
61 changes: 52 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
- name: Compute cache info
id: cache-info
run: |
image=$(yq .services.service.image < tests/integration/docker-compose.yml)
image=$(yq .services.integration-tests.image < tests/integration/docker-compose.yml)
echo go-version=$(skopeo inspect docker://${image} | jq -r .Digest | cut -d: -f2) >> $GITHUB_OUTPUT
- name: Setup cache
Expand All @@ -166,30 +166,73 @@ jobs:
if: steps.cache.outputs.cache-hit == 'true'
run: docker run --rm -v fml-integration-tests_go-cache:/cache -v /tmp/go-cache:/src alpine tar xf /src/go-build.tar -C /cache

- name: Run Integration Tests (Aim Original)
- name: Run Integration Tests
run: make container-test
env:
DOCKER_BUILDKIT: 1
FML_DATABASE_BACKEND: ${{ matrix.database-backend }}
FML_RUN_ORIGINAL_AIM_SERVICE: true
FML_SLOW_TESTS_ENABLED: ${{ github.event_name == 'schedule' }}

- name: Run Integration Tests (Aim Refactor)
run: make container-test
- name: Save cache
if: steps.cache.outputs.cache-hit != 'true'
run: docker run --rm -v fml-integration-tests_go-cache:/cache -v /tmp/go-cache:/dst alpine tar cf /dst/go-build.tar -C /cache go-build

go-compatibility-tests:
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
name: Go Compatibility Tests (Mlflow ${{ matrix.mlflow-version }} - ${{ matrix.database-uri}})
runs-on: ubuntu-latest
strategy:
matrix:
mlflow-version:
- 1.30.0
- 2.13.0
database-uri:
- postgres://postgres:postgres@postgres/postgres
- sqlite:///db/mlflow.db
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Compute cache info
id: cache-info
run: |
image=$(yq .services.integration-tests.image < tests/integration/docker-compose.yml)
echo go-version=$(skopeo inspect docker://${image} | jq -r .Digest | cut -d: -f2) >> $GITHUB_OUTPUT
- name: Setup cache
id: cache
uses: actions/cache@v4
with:
path: /tmp/go-cache/go-build.tar
key: go-integration-tests-${{ matrix.database-backend }}-image-${{ steps.cache-info.outputs.go-version }}-mod-${{ hashFiles('.go-build-tags', 'go.sum') }}

- name: Restore cache
if: steps.cache.outputs.cache-hit == 'true'
run: docker run --rm -v fml-integration-tests_go-cache:/cache -v /tmp/go-cache:/src alpine tar xf /src/go-build.tar -C /cache

- name: Run Container Tests
run: make container-compatibility-test
env:
DOCKER_BUILDKIT: 1
FML_DATABASE_BACKEND: ${{ matrix.database-backend }}
MLFLOW_VERSION: ${{ matrix.mlflow-version }}
DATABASE_URI: ${{ matrix.database-uri }}

- name: Save cache
if: steps.cache.outputs.cache-hit != 'true'
run: docker run --rm -v fml-integration-tests_go-cache:/cache -v /tmp/go-cache:/dst alpine tar cf /dst/go-build.tar -C /cache go-build


python-integration-tests:
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
name: Python Integration Tests (${{ matrix.api }})
name: Python Integration Tests (${{ matrix.test-targets }})
runs-on: ubuntu-latest
strategy:
matrix:
api: [aim, mlflow]
test-targets: [aim, mlflow, fml_client]
fail-fast: false
steps:
- name: Checkout
Expand Down Expand Up @@ -220,7 +263,7 @@ jobs:
else
cache=-cache-to=/tmp/go-cache
fi
go run tests/integration/python/main.go $cache -targets ${{ matrix.api }}
go run tests/integration/python/main.go $cache -targets ${{ matrix.test-targets }}
build:
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
path: dist

- name: Create release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: dist/*
Expand Down Expand Up @@ -118,3 +118,11 @@ jobs:
$(printf -- "--tag ${{ vars.DOCKER_REPO }}:%s " ${tags[@]}) \
$(printf "${{ vars.DOCKER_REPO }}@%s " ${digests[@]})
echo "::endgroup::"
chart-release:
name: Publish Helm chart
if: startsWith(github.ref, 'refs/tags/v')
uses: G-Research/charts/.github/workflows/invoke-push.yaml@master
secrets:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
cache-dependency-path: website/yarn.lock
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5
if: steps.has-pages.outputs.has_pages == 'true'
- name: Restore cache
uses: actions/cache@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ python/build/
python/*.egg-info/
wheelhouse/

benchmark_outputs
# Python package
__pycache__/
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "ui/fasttrackml-ui-aim"]
path = ui/fasttrackml-ui-aim
url = ssh://git@github.com/g-research/fasttrackml-ui-aim.git
[submodule "ui/fasttrackml-ui-mlflow"]
path = ui/fasttrackml-ui-mlflow
url = ssh://git@github.com/g-research/fasttrackml-ui-mlflow.git
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// Please keep the content of go.buildTags identical to the content of the authoritative file .go-build-tags
"go.buildTags": "netgo,osusergo,sqlite_foreign_keys,sqlite_math_functions,sqlite_omit_load_extension,sqlite_unlock_notify,sqlite_vacuum_incr",
"go.buildTags": "netgo,osusergo,sqlite_foreign_keys,sqlite_math_functions,sqlite_omit_load_extension,sqlite_unlock_notify,sqlite_vacuum_incr,compatibility",
"gopls": {
"formatting.local": "github.com/G-Research/fasttrackml",
"formatting.gofumpt": true
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.19
FROM alpine:3.20

COPY fml /usr/local/bin/

Expand Down
42 changes: 39 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ COMPOSE_FILE=tests/integration/docker-compose.yml
# Docker compose project name.
COMPOSE_PROJECT_NAME=$(APP)-integration-tests

AIM_BUILD_LOCATION=$(HOME)/fasttrackml-ui-aim
MLFLOW_BUILD_LOCATION=$(HOME)/fasttrackml-ui-mlflow

#
# Default target (help).
#
Expand Down Expand Up @@ -145,6 +148,11 @@ test-go-integration: ## run go integration tests.
@echo ">>> Running integration tests."
@go test -tags="$(GO_BUILDTAGS)" ./tests/integration/golang/...

.PHONY: test-go-compatibility
test-go-compatibility: ## run go compatibility tests.
@echo ">>> Running compatibility tests."
@go test -tags="$(GO_BUILDTAGS),compatibility" ./tests/integration/golang/compatibility

.PHONY: test-python-integration
test-python-integration: ## run all the python integration tests.
@echo ">>> Running all python integration tests."
Expand All @@ -167,13 +175,21 @@ test-python-integration-aim: ## run the Aim python integration tests.
container-test: ## run integration tests in container.
@echo ">>> Running integration tests in container."
@COMPOSE_FILE=$(COMPOSE_FILE) COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) \
docker-compose run -e FML_RUN_ORIGINAL_AIM_SERVICE integration-tests
docker compose run -e FML_SLOW_TESTS_ENABLED integration-tests

.PHONY: container-compatibility-test
container-compatibility-test: ## run compatibility tests in container.
@echo ">>> Running compatibility tests in container."
@COMPOSE_FILE=$(COMPOSE_FILE) COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) \
docker compose run -e MLFLOW_VERSION -e DATABASE_URI mlflow-setup
@COMPOSE_FILE=$(COMPOSE_FILE) COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) \
docker compose run -e MLFLOW_VERSION -e DATABASE_URI compatibility-tests

.PHONY: container-clean
container-clean: ## clean containers.
@echo ">>> Cleaning containers."
@COMPOSE_FILE=$(COMPOSE_FILE) COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) \
docker-compose down -v --remove-orphans
docker compose down -v --remove-orphans

#
# Mockery targets.
Expand Down Expand Up @@ -223,7 +239,7 @@ endif

#
# Build targets.
#
#
.PHONY: clean
clean: ## clean build artifacts.
@echo ">>> Cleaning build artifacts."
Expand Down Expand Up @@ -255,3 +271,23 @@ migrations-create: ## generate a new database migration.
migrations-rebuild: ## rebuild the migrations script to detect new migrations.
@echo ">>> Running FastTrackML migrations rebuild."
@go run main.go migrations rebuild

.PHONY: ui-aim-sync
ui-aim-sync: ## copy Aim UI files to docker volume.
@echo ">>> Syncing the Aim UI."
@rsync -rvu --exclude node_modules --exclude .git ui/fasttrackml-ui-aim/ $(AIM_BUILD_LOCATION)

.PHONY: ui-aim-start
ui-aim-start: ui-aim-sync ## start the Aim UI for development.
@echo ">>> Starting the Aim UI."
@cd $(AIM_BUILD_LOCATION)/src && npm ci --legacy-peer-deps && npm start

.PHONY: ui-mlflow-sync
ui-mlflow-sync: ## copy MLflow UI files to docker volume.
@echo ">>> Syncing the MLflow UI."
@rsync -rvu --exclude node_modules --exclude .git ui/fasttrackml-ui-mlflow/ $(MLFLOW_BUILD_LOCATION)

.PHONY: ui-mlflow-start
ui-mlflow-start: ui-mlflow-sync ## start the MLflow UI for development.
@echo ">>> Starting the MLflow UI."
@cd $(MLFLOW_BUILD_LOCATION)/src && yarn install --immutable && yarn start
Loading

0 comments on commit b9d6e0e

Please sign in to comment.