I’m trying to set up a patient pool to evaluate how the system scales for multiple patients. When trying to run the “HowTo_PatientPool.py” in the python howtos, I run into a couple of errors.
First, I get an import error for the hemorrhage action:
Traceback (most recent call last):
File “~\pulse\engine\src\python\pulse\howto\HowTo_PatientPool.py”, line 10, in
from pulse.cdm.patient_actions import SEHemorrhage, eHemorrhageType,
ImportError: cannot import name ‘eHemorrhageType’ from ‘pulse.cdm.patient_actions’ (~pulse\engine\src\python\pulse\cdm\patient_actions.py)
That’s overall fine, I just removed the import and the application of a hemorrhage.
The next issue I run into is this:
Traceback (most recent call last):
File “~\pulse\engine\src\python\pulse\howto\HowTo_PatientPool.py”, line 114, in
HowTo_PatientPool()
File “~\pulse\engine\src\python\pulse\howto\HowTo_PatientPool.py”, line 59, in HowTo_PatientPool
if not pool.initialize_engines():
^^^^^^^^^^^^^^^^^^^^^^^^^
File “~\pulse\engine\src\python\pulse\engine\PulseEnginePool.py”, line 64, in initialize_engines
self._is_active = self.__pool.initialize_engines(json, PyPulse.serialization_format.json)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: initialize_engines(): incompatible function arguments. The following argument types are supported:
1. (self: PyPulse.EnginePool) → boolInvoked with: <PyPulse.EnginePool object at 0x0000026FD2A4C230>, (long EngingeInitialization JSON follows…), <serialization_format.json: 0>
I believe it is calling the function here:
https://gitlab.kitware.com/physiology/engine/-/blob/stable/src/cpp/cdm/PhysiologyEnginePool.cpp#L83
It looks like this function does not take any arguments, and the howto code is sending a json.
If I just remove the arguments from the function call in the howto (line 64 in PulseEnginePool.py),
self._is_active = self.__pool.initialize_engines(json, PyPulse.serialization_format.json)
changed to
self._is_active = self.__pool.initialize_engines()
the function at line 60 of HowTo_PatientPool.py returns false, ending the script with the message:
“Unable to load/stabilize any engine”
I’m fine continuing to try and get it to work. Any suggestions for a fix would be appreciated. I also wanted to make sure to bring it up in case a fix is needed for the howto for anyone to use the PatientPool example in the future.