Skip to content

Commit

Permalink
fix setup.sh (#2)
Browse files Browse the repository at this point in the history
* WIP

Signed-off-by: Kosaku Kimura <kimura.kosaku@fujitsu.com>

* Issue fix in setup.sh for SapientML

* Updation of config file as Sapientml supports Python version 3.9

Signed-off-by: HimanshuRRai <himanshu.rai@fujitsu.com>

---------

Signed-off-by: Kosaku Kimura <kimura.kosaku@fujitsu.com>
Signed-off-by: HimanshuRRai <himanshu.rai@fujitsu.com>
Co-authored-by: muhammed-nafi-k-a <muhammednafi.a@fujitsu.com>
Co-authored-by: HimanshuRRai <himanshu.rai@fujitsu.com>
  • Loading branch information
3 people authored Oct 9, 2024
1 parent 49f4a22 commit 5b55360
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
2 changes: 0 additions & 2 deletions frameworks/SapientML/exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import os
import tempfile as tmp

from amlb.benchmark import TaskConfig
from amlb.data import Dataset
from frameworks.shared.callee import call_run, result
from frameworks.shared.utils import Timer
from sapientml import SapientML
Expand Down
4 changes: 1 addition & 3 deletions frameworks/SapientML/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
sapientml
openml
boto3==1.26.98
requests
26 changes: 22 additions & 4 deletions frameworks/SapientML/setup.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
#!/usr/bin/env bash
HERE=$(dirname "$0")
VERSION=${1:-"stable"}
REPO=${2:-"https://github.com/sapientml/sapientml"}
PKG=${3:-"sapientml"}
if [[ "$VERSION" == "latest" ]]; then
VERSION="main"
fi

#create venv
. ${HERE}/.setup/setup_env
#create local venv
. ${HERE}/../shared/setup.sh ${HERE} true
PIP install --upgrade pip
PIP install --no-cache-dir -r $HERE/requirements.txt

PIP install -r ${HERE}/requirements.txt
if [[ "$VERSION" == "stable" ]]; then
PIP install --no-cache-dir -U ${PKG}
elif [[ "$VERSION" =~ ^[0-9] ]]; then
PIP install --no-cache-dir -U ${PKG}==${VERSION}
else
# PIP install --no-cache-dir -e git+${REPO}@${VERSION}#egg=${PKG}
TARGET_DIR="${HERE}/lib/${PKG}"
rm -Rf ${TARGET_DIR}
git clone --depth 1 --single-branch --branch ${VERSION} --recurse-submodules ${REPO} ${TARGET_DIR}
PIP install -U -e ${TARGET_DIR}
fi

PY -c "import pkg_resources; print(pkg_resources.get_distribution('sapientml').version)" >> "${HERE}/.setup/installed"
2 changes: 1 addition & 1 deletion resources/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ openml: # configuration namespace for openML.

versions: # configuration namespace for versions enforcement (libraries versions are usually enforced in requirements.txt for the app and for each framework).
pip:
python: 3.11 # the Python minor version that will be used by the application in containers and cloud instances, also used as a based version for virtual environments created for each framework.
python: 3.9 # the Python minor version that will be used by the application in containers and cloud instances, also used as a based version for virtual environments created for each framework.

container: &container # parent configuration namespace for container modes.
force_branch: true # set to true if image can only be built from a clean branch, with same tag as defined in `project_repository`.
Expand Down

0 comments on commit 5b55360

Please sign in to comment.