Skip to content

Commit

Permalink
chore: remove unecessary requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrery committed Apr 15, 2024
1 parent d217ffb commit 225f910
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 28 deletions.
22 changes: 8 additions & 14 deletions script/make_utils/run_use_case_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,19 @@ setup_virtualenv() {
echo "Virtual environment activated."
}

install_concrete_ml() {
pip install -U pip setuptools wheel
if pip install -e .; then
echo "Concrete ML installation successful."
else
echo "Failed to install Concrete ML."
return 1
fi
}

install_requirements() {
if [ -f "requirements.txt" ]; then
pip install -U pip setuptools wheel
local example_dir=$1
if [ -f "${example_dir}/requirements.txt" ]; then
pushd "$example_dir"
if pip install -r requirements.txt; then
echo "Requirements installed successfully."
else
echo "Failed to install requirements."
popd
return 1
fi
popd
fi
}

Expand All @@ -63,13 +58,12 @@ run_example() {

echo "*** Running example: $example_name ***"
setup_virtualenv "$example_name"
install_concrete_ml || return
install_requirements || return
install_requirements "$example_dir" || return

echo "Running use case example using Makefile..."
make -C "$example_dir" run_example

local result="${PIPESTATUS[0]}"
local result=$?

if [ "$result" -ne 0 ]; then
echo "Failure in example $example_name."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
concrete-ml
jupyter
torchvision
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
concrete-ml
jupyter
torchvision
2 changes: 0 additions & 2 deletions use_case_examples/credit_scoring/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
concrete-ml
jupyter
pandas
1 change: 1 addition & 0 deletions use_case_examples/deployment/cifar_8_bit/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
torchvision==0.14.1
Pillow
concrete-ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
concrete-ml
jupyter
pandas
transformers
3 changes: 0 additions & 3 deletions use_case_examples/disease_prediction/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
concrete-ml
jupyter
pandas
matplotlib
4 changes: 3 additions & 1 deletion use_case_examples/federated_learning/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ PYTHON_RUN=python
run_example: run_sh load_to_cml

run_sh:
@echo "Running federated learning training script..."
@./run.sh

load_to_cml:
@$(PYTHON_RUN) load_to_cml.py
@echo "Loading and compiling the model with Concrete ML..."
@$(PYTHON_RUN) load_to_cml.py
13 changes: 13 additions & 0 deletions use_case_examples/hybrid_model/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Useful for jupyter notebooks
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

EXAMPLE_NAME=hybrid_model

run_example: compile_model serve_model

compile_model:
@python compile_hybrid_llm.py

serve_model:
@./serve.sh
1 change: 1 addition & 0 deletions use_case_examples/hybrid_model/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
concrete-ml
datasets==2.14.4
apache_beam==2.49.0
mwparserfromhell==0.6.4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
concrete-ml
jupyter
pandas
transformers
2 changes: 0 additions & 2 deletions use_case_examples/titanic/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
concrete-ml
jupyter
pandas

0 comments on commit 225f910

Please sign in to comment.