ContinualAI / avalanche

Avalanche: an End-to-End Library for Continual Learning based on PyTorch.
http://avalanche.continualai.org
MIT License
1.79k stars 291 forks source link

Fix type hints to make use of new benchmark structure #989

Closed NickLucche closed 2 years ago

NickLucche commented 2 years ago

I think we should update the typing in function signatures such as https://github.com/ContinualAI/avalanche/blob/master/avalanche/training/templates/base.py#L74 requiring specific experiences to be more general, replacing them with the new CLExperience, perhaps even swapping the Sequence of experiences requirement with a CLStream.

AntonioCarta commented 2 years ago

Agree.

even swapping the Sequence of experiences requirement with a CLStream

Not sure about this. train also accepts a single CLExperience so you can't really use the CLStream properties.

NickLucche commented 2 years ago

yeah I was thinking about something like experiences: Union[CLExperience, CLStream ]