-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: optimization of Airflow tasks with parallelism and PostGreSQL
- Loading branch information
Francesco Stablum
committed
Nov 10, 2021
1 parent
20193de
commit 97b6e4c
Showing
10 changed files
with
42 additions
and
5 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
config/ | ||
config/*.yaml | ||
!config/example.yaml | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
|
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
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
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,3 @@ | ||
CREATE DATABASE airflow_db; | ||
CREATE USER airflow_user WITH PASSWORD 'AIRFLOW_PASSWORD'; | ||
GRANT ALL PRIVILEGES ON DATABASE airflow_db TO airflow_user; |
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,2 @@ | ||
libpq-dev | ||
postgresql |
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# suggestion on how to generate a password: | ||
# tr -dc A-Za-z0-9 </dev/urandom | head -c 13 ; echo '' | ||
# https://unix.stackexchange.com/questions/230673/how-to-generate-a-random-string | ||
|
||
mongo_user: someuser | ||
mongo_password: somepassword | ||
mongo_host: somehost | ||
|
@@ -6,3 +10,8 @@ mongo_db: learning_sets | |
|
||
vm_user: someuser | ||
vm_host: somehost | ||
|
||
pg_password: somepassword | ||
airflow_user: someuser | ||
airflow_password: somepassword | ||
airflow_email: [email protected] |
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,6 @@ | ||
#!/bin/bash | ||
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
LEARNING_SETS_DIR="$(readlink -f $SCRIPT_DIR/..)" | ||
cd $LEARNING_SETS_DIR | ||
|
||
python3 -c "from common import config ; print(config.${1})" | tail -n1 |
File renamed without changes.
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 |
---|---|---|
|
@@ -16,3 +16,4 @@ gensim | |
nltk | ||
airflow | ||
torchvision | ||
psycopg2 |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
VM_URI=$(bash vm_uri.sh) | ||
VM_URI=$(bash config/vm_uri.sh) | ||
bash mongo_dump.sh | ||
rsync -ruv --exclude mlruns . $VM_URI:~/learning_sets/ |