Open guarin opened 7 months ago
From my understanding, the goal is to replace the lambda functions with picklable functions because lambda functions, being anonymous, cannot be pickled. Therefore, am I correct in assuming that we need to convert the lambda functions into named functions?
Yes, something like this should work:
def target_transform(t):
return 0
then I'd be happy to work on this. can you assign this issue to me ?
We sometimes use lambdas in the examples when creating torch datasets: https://github.com/lightly-ai/lightly/blob/e7f13a53e68031ee0ae77124e76401b48381001f/examples/pytorch/mae.py#L87
This results in issues on Windows as lambdas cannot be pickled. We should update the examples and replace the lambdas with pickleable functions.