fani-lab / Adila

Fairness-Aware Team Formation
3 stars 2 forks source link

Removing torch from Adila's pipeline #64

Open Hamedloghmani opened 1 year ago

Hamedloghmani commented 1 year ago

In Adila, we are using torch library just to load our .pred files. Using just a small function from a big toolkit is not desirable since being lightweight is one of our goals in Adila's development. We are looking for an alternate tool to remove torch from pipeline and use that library or toolkit instead for loading .pred files. Note that .pred files are PyTorch model predictions (e.g outputs of OpeNTF).

Hamedloghmani commented 1 year ago

Hi @edwinpaul121 , hope you are doing well.

I assigned this new side-task to you for the moment. Let me know if you have any questions. I'll send you another one soon.

edwinpaul121 commented 1 year ago

Hi @Hamedloghmani, just to clarify, we're trying to load .pred files created using PyTorch in OpeNTF, using another library that we may already be using in our pipeline or can it be any other library that is a bit more lightweight than PyTorch?

Hamedloghmani commented 1 year ago

Hi @edwinpaul121 , Exactly, we are looking for something lighter. Although it should somehow be significantly lighter to be worthy of switching from PyTorch to that second library. In Adila, we don't use PyTorch except for loading .pred files.

edwinpaul121 commented 1 year ago

Hi @Hamedloghmani hope you're doing well, I was looking into a few ways to do this and came by ONNX and ONNX runtime, I still have to research it a little bit but from what I've understood they are tools that acts as an intermediary between different libraries, but I think we might be able to use it for this purpose. Two concerns though:

  1. The output/export prediction file needs to be converted into the ONNX format beforehand, meaning ONNX might need to be incorporated into OpeNTF just for this purpose.
  2. I'm not entirely sure how much lighter it will be compared to PyTorch.
Hamedloghmani commented 1 year ago

Hi @edwinpaul121 Thank you for your update. As you kindly mentioned, ONNX requires changes in saving procedure of the model as well which is a bit unpleasant for us. I'll take a deeper look and send you an update here.