The problem you are facing shows that L object is no callable. L objects are used to list the items that the model will use.
Since the exception is raised at self.get_items(source), it seems like your get_items is a L object, not a function that returns a L object. Could you have built your DataBlock with a line like that?
get_items = a_function(),
If you call the function, you get the result. In this case, try this instead:
The get_items and get_y parameters expect a function as input (the get_image_files function for example, not a call to this function).
It seems like you are passing a list instead:
hubmap = DataBlock(blocks=(ImageBlock, MaskBlock(codes)),
# get_items=get_image_files(IMAGES_PATH), # replace this line by:
get_items=get_image_files, # just the function
get_y=get_mask,
splitter=EndSplitter(valid_pct=0.35),
batch_tfms=[SegmentationAlbumentationsTransform(custom_aug()),
Normalize.from_stats(*[mean, std]),
])
Remember that this get_items function expects only one parameter: the source of the images (then, when you call the dataloaders function, you can provide the image path).