I think it is because LightningCLI is spawning another process that is running the whole prediction pipeline again instead of just the LightningCLI call.
An easy fix would be to use subprocess in rslp.utils.rslearn to do tho prediction instead of calling CustomLightningCLI directly. This is less clean but not sure there's a way to fix it otherwise.
Anyway needs some verification first about the source of the issue, I think it is what I said but not 100% sure.
I think it is because LightningCLI is spawning another process that is running the whole prediction pipeline again instead of just the LightningCLI call.
An easy fix would be to use subprocess in
rslp.utils.rslearnto do tho prediction instead of calling CustomLightningCLI directly. This is less clean but not sure there's a way to fix it otherwise.Anyway needs some verification first about the source of the issue, I think it is what I said but not 100% sure.