Cannot import pyotb after Tensorflow has been imported
In OTBTF environments, this code crashes on the 2nd line:
import tensorflow
import pyotb
raising:
tensorflow/core/lib/monitoring/collection_registry.cc:77] Cannot register 2 metrics with the same name: /tensorflow/core/op_expansion/op_counter
tensorflow/core/framework/device_factory.cc:90] Duplicate registration of device factory for type XLA_CPU with the same priority 50
Solution: In pyotb
, when getting the list of available applications, we need to do it in an other process to avoid potential clashes with Tensorflow