Skip to content

Commit

Permalink
Fix ParametricBuffer to consider __getitem__ fields (such as task lab…
Browse files Browse the repository at this point in the history
…els)
  • Loading branch information
lrzpellegrini committed Dec 21, 2023
1 parent 0aec47e commit 5749629
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion avalanche/training/storage_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,10 @@ def update(self, strategy: "SupervisedTemplate", **kwargs):
self.update_from_dataset(strategy, new_data)

def update_from_dataset(self, strategy, new_data):
self.buffer = self.buffer.concat(new_data)
if len(self.buffer) == 0:
self.buffer = new_data
else:
self.buffer = self.buffer.concat(new_data)
self.resize(strategy, self.max_size)

def resize(self, strategy, new_size: int):
Expand Down

0 comments on commit 5749629

Please sign in to comment.