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

Finetuning updates to the QnA RAG Demo #154

Open
wants to merge 24 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
92 changes: 92 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
TOPDIR := $(shell git rev-parse --show-toplevel)
BASE_VER ?= v1.2.0
BUILD_ID ?= $(shell git describe --always --dirty)
VERSION := $(BASE_VER)-$(BUILD_ID)


export REPO := ezkf
REGISTRY ?= lr1-bd-harbor-registry.mip.storage.hpecorp.net/develop
EZKF_REGISTRY ?= $(REGISTRY)/$(REPO)

docker-build:
@echo "Building JupyterLab images..."
$(foreach target, base jupyter, \
docker build \
--build-arg="BASE_IMG=$(EZKF_REGISTRY)/base:$(VERSION)" \
-t $(EZKF_REGISTRY)/$(target):$(VERSION) \
-f $(TOPDIR)/dockerfiles/notebooks/$(target)/Dockerfile \
$(TOPDIR)/dockerfiles/notebooks/$(target); \
)

@echo "Building the images for the Question-Answering demo..."
$(foreach target, app llm transformer vectorstore, \
docker build \
-t $(EZKF_REGISTRY)/qna-$(target):$(VERSION) \
-f $(TOPDIR)/demos/rag-demos/question-answering/dockerfiles/$(target)/Dockerfile \
$(TOPDIR)/demos/rag-demos/question-answering/dockerfiles/$(target); \
)

@echo "Building the images for the Question-Answering GPU demo..."
$(foreach target, app transformer vectorstore triton-inference-server, \
docker build \
-t $(EZKF_REGISTRY)/qna-$(target)-gpu:$(VERSION) \
-f $(TOPDIR)/demos/rag-demos/question-answering-gpu/dockerfiles/$(target)/Dockerfile \
$(TOPDIR)/demos/rag-demos/question-answering-gpu/dockerfiles/$(target); \
)

@echo "Building the images for the Fraud Detection demo..."
docker build \
-t $(EZKF_REGISTRY)/fraud-detection-app:$(VERSION) \
-f $(TOPDIR)/demos/fraud-detection/dockerfiles/app/Dockerfile \
$(TOPDIR)/demos/fraud-detection/dockerfiles/app

docker-push:
@echo "Pushing JupyterLab images..."
$(foreach target, base jupyter, \
docker push $(EZKF_REGISTRY)/$(target):$(VERSION); \
)

@echo "Pushing the images for the Question-Answering demo..."
$(foreach target, app llm transformer vectorstore, \
docker push $(EZKF_REGISTRY)/qna-$(target):$(VERSION); \
)

@echo "Pushing the images for the Question-Answering GPU demo..."
$(foreach target, app transformer vectorstore triton-inference-server, \
docker push $(EZKF_REGISTRY)/qna-$(target)-gpu:$(VERSION); \
)

@echo "Pushing the images for the Fraud Detection demo..."
docker push $(EZKF_REGISTRY)/fraud-detection-app:$(VERSION)

################################################################################
# Pipeline API #
################################################################################

version:
@echo $(VERSION)

deliverables:
@echo

dependencies:
@echo

test:
@echo

.PHONY: images
images:
@echo $(EZKF_REGISTRY)/base:$(VERSION)
@echo $(EZKF_REGISTRY)/jupyter:$(VERSION)
@echo $(EZKF_REGISTRY)/qna-app:$(VERSION)
@echo $(EZKF_REGISTRY)/qna-llm:$(VERSION)
@echo $(EZKF_REGISTRY)/qna-transformer:$(VERSION)
@echo $(EZKF_REGISTRY)/qna-vectorstore:$(VERSION)
@echo $(EZKF_REGISTRY)/qna-app-gpu:$(VERSION)
@echo $(EZKF_REGISTRY)/qna-transformer-gpu:$(VERSION)
@echo $(EZKF_REGISTRY)/qna-vectorstore-gpu:$(VERSION)
@echo $(EZKF_REGISTRY)/qna-triton-inference-server-gpu:$(VERSION)
@echo $(EZKF_REGISTRY)/fraud-detection-app:$(VERSION)

release: docker-build docker-push
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ capabilities.

![ezua-tutorials](images/ezua-tutorials.jpg)

## Branching Model

This repository adheres to the versioning scheme of the EzUA platform. The `develop` branch serves
as the hub for active development. Release branches are derived from the develop branch, aligning
closely with EzUA versions. For instance, `release-x.y.z` is designed to seamlessly woth with EzUA
version `x.y.z`. It's worth noting that when you clone this repository, the default branch aligns
with the most recent EzUA version. Therefore, if you're working with the latest EzUA iteration, you
can clone it and proceed without the need to switch branches.

## Repository Structure

This repository is organized into two main directories:
Expand All @@ -34,8 +43,7 @@ find specialized guides that show you how to leverage EzUA's frameworks and tool
The current list of framework-specific tutorials include:

- [FEAST feature store](tutorials/feast/): Ride sharing tutorial
- [Kubeflow Pipelines](tutorials/kubeflow-pipelines/): Financial time series tutorial
- [RAY](tutorials/ray): News recommendation tutorial
- [Superset](tutorials/superset/): Data connection and visualization

## Getting Started

Expand Down
16 changes: 13 additions & 3 deletions demos/bike-sharing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ For this tutorial, ensure you have:
To complete the tutorial follow the steps below:

1. Login to your EzUA cluster, using your credentials.
1. Create a new Notebook server using the `jupyter-data-science` image. Request at least 4Gi of memory for the Notebook
server.
1. Create a new Notebook server using the `jupyter-data-science` image. Request at least 4Gi of
memory for the Notebook server.
1. Connect to the Notebook server, launch a new terminal window, and clone the repository locally.
1. Navigate to the tutorial's directory (`ezua-tutorials/tutorials/mlflow`)
See the troubleshooting section if this step fails.
1. Navigate to the tutorial's directory (`ezua-tutorials/demos/bike-sharing`)
1. Create your virtual environment:
- Deactivate the base conda environment:
```
Expand Down Expand Up @@ -65,6 +66,15 @@ To complete the tutorial follow the steps below:
1. Launch the two Notebooks in order and execute the code cells. Make sure to select the `bike-sharing` environment
kernel for each Notebook.

## Troubleshooting

If you are behind a proxy you will have to set a few environment variables to be able to clone the
`ezua-tutorials` repository locally and install the dependencies via `pip`. To this end, launch a
terminal window and before cloning the repository, run the following commands:

- `export http_proxy=<your http proxy URL>`
- `export https_proxy=<your https proxy URL>`

## How it Works

MLflow is an open-source platform designed to manage the end-to-end machine learning lifecycle. It encompasses tools for
Expand Down
1 change: 0 additions & 1 deletion demos/bike-sharing/environment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: bike-sharing
channels:
- conda-forge
- defaults
dependencies:
- python=3.8
- pip
Expand Down
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions demos/fraud-detection/application/helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: fraud-detection-app
version: 0.1.0
version: 0.2.1
apiVersion: v2
appVersion: v0.1.0
appVersion: v0.2.1
description: Install the Fraud Detection application on EzAF
type: application
6 changes: 3 additions & 3 deletions demos/fraud-detection/application/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ image:
repository: dpoulopoulos/fraud-detection-app
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "v0.1.0"
tag: "v0.2.1"

imagePullSecrets: []
nameOverride: ""
Expand Down Expand Up @@ -75,10 +75,10 @@ ingress:
resources:
limits:
cpu: 100m
memory: 128Mi
memory: 1Gi
requests:
cpu: 100m
memory: 128Mi
memory: 1Gi

autoscaling:
enabled: false
Expand Down
Loading