kale icon indicating copy to clipboard operation
kale copied to clipboard

Kale - try blocks aren't supported:

Open ashokbalaraman opened this issue 3 years ago • 1 comments

I have few custom libraries that have plenty of "try except" blocks. Any reason why "kale" doesn't support "try - except" blocks? Any plans to support code with exception handling? Or, is there any workaround.

2021-03-22 00:53:32 Kale marshalling [INFO] Saving function object using Function backend: evaluate_model_on_snapshot 2021-03-22 00:53:32 Kale marshalling [INFO] Saving pytorch object using PyTorch backend: model 2021-03-22 00:53:32 Kale marshalling [ERROR] During data passing, Kale could not marshal the following object:

  • path: 'model'
  • type: '<class 'models.neural_networks.ImageClassification'>' The error was: try blocks aren't supported: File "../models/neural_networks.py", line 65 def forward(self, x: torch.tensor) -> torch.tensor: try: ~~~ <--- HERE x = self.model(x) return(x)

ashokbalaraman avatar Mar 22 '21 01:03 ashokbalaraman

Hey @ashokbalaraman sorry for the belated reply. I haven't seem this error before and I am not sure how to reproduce it.

Could you share the most minimal example to reproduce it?

StefanoFioravanzo avatar May 07 '21 13:05 StefanoFioravanzo