ejjordan / airflowHPC

2 stars 1 forks source link

trouble with `PoolPartialDescriptor` - no `mro` #30

Open andre-merzky opened 2 months ago

andre-merzky commented 2 months ago

Hey,

I am trying to catch up with the latest developments, but alas am stumbling over the following error:

$ python airflowHPC/scripts/base_runner.py get_mass
[2024-08-19T09:46:17.402+0200] {dagbag.py:587} INFO - Filling up the DagBag from /home/merzky/radical/airflowHPC/airflowHPC/airflowHPC/dags/
[2024-08-19T09:46:17.508+0200] {_logging.py:84} INFO - Importing gmxapi.
[2024-08-19T09:46:17.511+0200] {operation.py:99} INFO - Importing gmxapi.operation
[2024-08-19T09:46:17.516+0200] {commandline.py:62} INFO - Importing gmxapi.commandline
[2024-08-19T09:46:17.519+0200] {runtime.py:101} INFO - Importing gmxapi.runtime
[2024-08-19T09:46:17.522+0200] {workflow.py:56} INFO - Importing gmx.workflow
[2024-08-19T09:46:17.522+0200] {workflow.py:60} INFO - Using schema version gmxapi_workspec_0_1.
[2024-08-19T09:46:17.522+0200] {mdrun.py:66} INFO - Importing gmxapi.simulation.mdrun
[2024-08-19T09:46:17.524+0200] {read_tpr.py:56} INFO - Importing gmxapi.simulation.read_tpr
[2024-08-19T09:46:17.525+0200] {modify_input.py:60} INFO - Importing gmxapi.simulation.modify_input
[2024-08-19T09:46:18.107+0200] {dagbag.py:386} ERROR - Failed to import: /home/merzky/radical/airflowHPC/airflowHPC/airflowHPC/dags/test_mpi4py.py
Traceback (most recent call last):
  File "/home/merzky/radical/airflowHPC/ve3/lib/python3.10/site-packages/airflow/models/dagbag.py", line 382, in parse
    loader.exec_module(new_module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/merzky/radical/airflowHPC/airflowHPC/airflowHPC/dags/test_mpi4py.py", line 33, in <module>
    multi = MPIExternalPythonOperator.partial(
  File "/home/merzky/radical/airflowHPC/airflowHPC/airflowHPC/operators/mpi_external_python_operator.py", line 32, in pool_slots_partial
    return airflow_partial(*args, **kwargs)
  File "/home/merzky/radical/airflowHPC/ve3/lib/python3.10/site-packages/airflow/models/baseoperator.py", line 284, in partial
    validate_mapping_kwargs(operator_class, "partial", kwargs)
  File "/home/merzky/radical/airflowHPC/ve3/lib/python3.10/site-packages/airflow/models/mappedoperator.py", line 98, in validate_mapping_kwargs
    for klass in op.mro():
AttributeError: 'PoolPartialDescriptor' object has no attribute 'mro'

This is using apache-airflow==2.10.0 and Python 3.10.13.

I don't really see why that happens - the PoolPartialDescriptor is a class after all. Any idea what's going on? Thanks!

ejjordan commented 2 months ago

A few things to note here.

andre-merzky commented 2 months ago

Thanks Joe. I also saw the error a couple of times when not using the command line tools but could not determine yet what triggers it. And yes, that PoolPartialDescriptor seems to be a funny :-)