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

Error while running "python train_2D.py" #80

Open
rhoadesScholar opened this issue Jan 2, 2025 Discussed in #75 · 3 comments
Open

Error while running "python train_2D.py" #80

rhoadesScholar opened this issue Jan 2, 2025 Discussed in #75 · 3 comments
Assignees
Labels
Partipant Issue A code issue/bug encountered by challenge participant(s).

Comments

@rhoadesScholar
Copy link
Member

Discussed in #75

Originally posted by rajpiyush18 December 24, 2024
I am getting the following error while running python train_2D.py

Sampling box shape is <= 0 for axis y with size -14. Setting to 1 and padding.
Error: len() should return >= 0
Error: len() should return >= 0
Error: len() should return >= 0
Error: len() should return >= 0
Error: len() should return >= 0
Error: len() should return >= 0
Error: len() should return >= 0
Error: len() should return >= 0
Error: len() should return >= 0
Error: len() should return >= 0

Thereafter, the training proceeds normally. However, when Validation starts, I get the following error:

_Traceback (most recent call last):
File "C:\Users\plato\OneDrive - Mass General Brigham\Projects\CellMap_challenge\cellmap-segmentation-challenge\examples\train_2D.py", line 79, in
train(file)
File "C:\Users\plato\OneDrive - Mass General Brigham\Projects\CellMap_challenge\cellmap-segmentation-challenge\src\cellmap_segmentation_challenge\train.py", line 290, in train
for batch in val_bar:
File "C:\Users\plato\miniforge3\envs\cellmap_hhmi\Lib\site-packages\torch\utils\data\dataloader.py", line 701, in next
data = self._next_data()
^^^^^^^^^^^^^^^^^
File "C:\Users\plato\miniforge3\envs\cellmap_hhmi\Lib\site-packages\torch\utils\data\dataloader.py", line 757, in _next_data
data = self.dataset_fetcher.fetch(index) # may raise StopIteration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\plato\miniforge3\envs\cellmap_hhmi\Lib\site-packages\torch\utils\data_utils\fetch.py", line 50, in fetch
data = self.dataset.getitems(possibly_batched_index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\plato\miniforge3\envs\cellmap_hhmi\Lib\site-packages\torch\utils\data\dataset.py", line 420, in getitems
return [self.dataset[self.indices[idx]] for idx in indices]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\plato\miniforge3\envs\cellmap_hhmi\Lib\site-packages\torch\utils\data\dataset.py", line 420, in
return [self.dataset[self.indices[idx]] for idx in indices]
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "C:\Users\plato\miniforge3\envs\cellmap_hhmi\Lib\site-packages\torch\utils\data\dataset.py", line 350, in getitem
return self.datasets[dataset_idx][sample_idx]
~~~~~~~~~~~~~^^^^^^^^^^^^^
IndexError: list index out of range

My system configuration:
Windows 11 Laptop, 64 GB RAM, i9-12th Gen, Nvidia GeForce RTX 3070 Ti Laptop GPU
Running through miniforge prompt

@rhoadesScholar rhoadesScholar self-assigned this Jan 2, 2025
@rhoadesScholar
Copy link
Member Author

@rajpiyush18 can you post the contents of the datasplit.csv that was generated?

@rajpiyush18
Copy link

Attaching the datasplit.csv file
datasplit.csv

@rhoadesScholar
Copy link
Member Author

My apologies. It seems that the bugs aren't all worked out on Windows yet. This is an issue with how file paths are parsed in the utilities. I should be able to clear it up Monday, if not before.

@rhoadesScholar rhoadesScholar added the Partipant Issue A code issue/bug encountered by challenge participant(s). label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Partipant Issue A code issue/bug encountered by challenge participant(s).
Projects
None yet
Development

No branches or pull requests

2 participants