-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] helpers bash scripts to run the models
- Loading branch information
1 parent
b57ba81
commit b4a6fc0
Showing
4 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
cd .. | ||
|
||
BASE_FOLDER=$1 | ||
CONFIG_PATH="/app/CONFIG.yaml" | ||
|
||
# Check if BASE_FOLDER is not set or empty | ||
if [ -z "$BASE_FOLDER" ]; then | ||
echo "Error: BASE_FOLDER is not specified." | ||
exit 1 | ||
fi | ||
|
||
docker run -v $BASE_FOLDER:/data -v $PWD:/app --gpus all beats poetry run prototypicalbeats/trainer.py fit \ | ||
--config $CONFIG_PATH \ | ||
--model.model_type baseline \ | ||
--model.state train \ | ||
--trainer.default_root_dir "/data/lightning_logs/baseline" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
BASE_FOLDER=$1 | ||
CONFIG_PATH="/app/CONFIG.yaml" | ||
|
||
# Check if BASE_FOLDER is not set or empty | ||
if [ -z "$BASE_FOLDER" ]; then | ||
echo "Error: BASE_FOLDER is not specified." | ||
exit 1 | ||
fi | ||
|
||
docker run -v $BASE_FOLDER:/data -v $PWD:/app --gpus all beats poetry run prototypicalbeats/trainer.py fit --config $CONFIG_PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
cd .. | ||
|
||
BASE_FOLDER=$1 | ||
CONFIG_PATH="/app/CONFIG.yaml" | ||
|
||
# Check if BASE_FOLDER is not set or empty | ||
if [ -z "$BASE_FOLDER" ]; then | ||
echo "Error: BASE_FOLDER is not specified." | ||
exit 1 | ||
fi | ||
|
||
docker run -v $BASE_FOLDER:/data -v $PWD:/app --gpus all beats poetry run prototypicalbeats/trainer.py fit \ | ||
--config $CONFIG_PATH \ | ||
--model.model_type pann \ | ||
--model.state train \ | ||
--model.model_path "/data/models/PANN/Cnn14_mAP=0.431.pth" \ | ||
--trainer.default_root_dir "/data/lightning_logs/pann" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
BASE_DIR=$1 | ||
|
||
cd .. | ||
|
||
docker run -v $BASE_DIR:/data -v $PWD:/app \ | ||
--gpus all \ | ||
beats \ | ||
poetry run python /app/evaluate/evaluateDCASE.py \ | ||
--config "/app/CONFIG_PREDICT.yaml" \ | ||
--overwrite | ||
#data.status="validate" \ | ||
#model.model_type="beats" \ | ||
#model.model_path="/data/lightning_logs/BEATs/lightning_logs/version_2/checkpoints/epoch=99-step=10000.ckpt" |