Hello Quants,

I recently trained a model using a Liquide Neuron Network (LNN) based on PyTorch and want to use the same model in the QuantConnect (QC) environment to generate signals.

Issues I'm Facing:

  • Liquide Neuron Network (LNN) support: LNN is not directly supported in QuantConnect or ONNX.
  • torch.jit: I've tried using torch.jit to save and load the model, but my custom LNN model does not support JIT at the moment. I’m working on resolving this issue, but it's not fixed yet.

My Findings:

  • Successful Module Loading: I was able to successfully load the LNN model when I used the GitHub repository code directly in the QC environment as a library.
  • ONNX Support: I noticed that ONNX was supported in the past, but it doesn't seem to be mentioned in the current documentation.
  • torch.jit: I am not sure why my custom LNN model does not support the torch.jit method for saving and loading.
  • Saving/Loading using state_dict: I saved the model parameters using state_dict and loaded them in the QC environment, where I recreated the architecture. This works, but it may not be the most efficient method.

Open to Suggestions:

I’m open to any suggestions or best practices for loading and using a custom PyTorch-based Liquide Neuron Network model in the QuantConnect environment.

Thank you for your help!