Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: AttributeError in VolumeDataset when not providing a label list #98

Open
Lauenburg opened this issue Jan 20, 2022 · 2 comments · Fixed by #101
Open

Bug: AttributeError in VolumeDataset when not providing a label list #98

Lauenburg opened this issue Jan 20, 2022 · 2 comments · Fixed by #101
Assignees
Labels
enhancement New feature or request

Comments

@Lauenburg
Copy link
Contributor

Steps to reproduce

Use VolumeDataset without specifying a list of labels.

In line 48, the label list is initialized with None.

In line 88 with set self.label_vol_ratio = self.sample_label_size / self.sample_volume_size if self.label is not None.

However, in line 232 self.label_vol_ratio is referenced even if the label list was not initialized and consequently self.label_vol_ratio was never defined.

Current behavior (bug)

Raises AttributeError

Expected behavior (correct)

Should be able to process a data volume without providing a list of labels since label has a default value of None.

/label ~Bug

@zudi-lin
Copy link
Owner

Fixed with PR #101

@zudi-lin
Copy link
Owner

zudi-lin commented Feb 1, 2022

@Lauenburg could you add your test function for different input cases you tried, e.g., mode='train', volume=data, lable=None, valid_mask=data to tests/? Please create a new file called test_data_loading.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants