Closed SlmpIex closed 3 months ago
I got the same issue!
I have fix it. for life2vec-light_old/src/dataloaders/tasks/base.py line 117: change the p = np.random.uniform(low=0.0, high=1.0, size=[5]) to p = np.random.uniform(low=0.1, high=1.0, size=[5])
if is_train:
# print(f'self.p_sequence_resample is : {self.p_sequence_resample}')
# AUGMENTATION WITH NOISE
p = np.random.uniform(low=0.1, high=1.0, size=[5])
# Should be in the exact order
# 1. TIMECUT (returns cut document)
if p[0] < self.p_sequence_timecut:
document = make_timecut(document) # random timecut
# 2. RESAMPLE DOCUMENT
print(f'p[1] is : {p[1]}')
if p[1] < self.p_sequence_resample:
I got the same issue, and I suspect this behavior is caused by this weird assignment below, which makes every person's sentences empty. After removing this line the code works fine. I would appreciate if the authors could add some explanation to it @carlomarxdk
I got the same issue, and I suspect this behavior is caused by this weird assignment below, which makes every person's sentences empty. After removing this line, the code works fine. I would appreciate if the authors could add some explanation to it @carlomarxdk
@bruceyyu Thanks for noticing the issue. I have included this line to disable the sequence augmentation. In principle, timecut_pos
tells us at what timestep we cut the sequence before feeding it to the model (on the training).
I will remove this line in the next commit.
I have fix it. for life2vec-light_old/src/dataloaders/tasks/base.py line 117: change the p = np.random.uniform(low=0.0, high=1.0, size=[5]) to p = np.random.uniform(low=0.1, high=1.0, size=[5])
if is_train: # print(f'self.p_sequence_resample is : {self.p_sequence_resample}') # AUGMENTATION WITH NOISE p = np.random.uniform(low=0.1, high=1.0, size=[5]) # Should be in the exact order # 1. TIMECUT (returns cut document) if p[0] < self.p_sequence_timecut: document = make_timecut(document) # random timecut # 2. RESAMPLE DOCUMENT print(f'p[1] is : {p[1]}') if p[1] < self.p_sequence_resample:
@quantumdotsss I would not suggest switching the low
to 0.1
(it might disable some of the augmentations). For example, if your p_sequence_timecut=0.05
, then it would never be activated, since the p[0]
is going to be always higher than 0.05
Let me know if the v0.2.0
does not solve the issue (see overview)
Hi there! Nice codebase..helps a lot with my current work.
I just started reviewing your code and noticed a ValueError when running your simple_workflow.ipynb file. The exception occurs during epoch 8 of training. Since there already was an issue regarding the execution of
trainer.fit(model=l2v, datamodule=datamodule)
I figured posting an issue here as well.If I can assist in any way or providing additional information, please let me know.