aipatr opened a new issue #19701:
URL: https://github.com/apache/airflow/issues/19701
### Apache Airflow version
2.2.0
### Operating System
Ubuntu
### Versions of Apache Airflow Providers
apache-airflow-providers-ftp==2.0.1
apache-airflow-providers-http==2.0.1
apache-airflow-providers-imap==2.0.1
apache-airflow-providers-postgres==2.3.0
apache-airflow-providers-sqlite==2.0.1
### Deployment
Other
### Deployment details
_No response_
### What happened
When training using Pytorch from an airflow dag I get the following error:
RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA
with multiprocessing, you must use the 'spawn' start method
[2021-11-19, 10:06:11 UTC] {logging_mixin.py:109} WARNING - Failed to
execute job 116 for task training_final_model
Traceback (most recent call last):
### What you expected to happen
There is some configuration problem that doesn´t allow python to spawn
processes but it forks them.
### How to reproduce
Try to run a pytorch training from an airflow task
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]