jobert_abma
10/11/2021, 11:24 PMorchestrate/dags
directory that have package dependencies that aren’t shipped with Meltano/Airflow by default. I’ve added them using poetry (they’re tracked in poetry.lock and pyproject.toml), but they aren’t available in the custom DAGs. Am I missing something? I can’t really find any documentation for adding new dependencies either. 🤔jobert_abma
10/11/2021, 11:26 PMBroken DAG: [/project/orchestrate/dags/ml_iris_train_model.py] Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/project/orchestrate/dags/ml_iris_train_model.py", line 4, in <module>
from sklearn.multiclass import OneVsRestClassifier
ModuleNotFoundError: No module named 'sklearn'
jobert_abma
10/11/2021, 11:37 PMedgar_ramirez_mondragon
10/11/2021, 11:39 PMpip_url
to include a requirements.txt
. Currently it's
'apache-airflow==2.1.2 --constraint <https://raw.githubusercontent.com/apache/airflow/constraints-2.1.2/constraints-${MELTANO__PYTHON_VERSION}.txt>'
So maybe something like
'apache-airflow==2.1.2 --constraint <https://raw.githubusercontent.com/apache/airflow/constraints-2.1.2/constraints-${MELTANO__PYTHON_VERSION}.txt> -r requirements.txt'
At this point you won't be able to install dependencies from poetry directly, but you can export poetry.lock
into a `requirements.txt`: https://python-poetry.org/docs/cli/#exportjobert_abma
10/11/2021, 11:55 PMedgar_ramirez_mondragon
10/12/2021, 1:00 AM