mirror of
https://github.com/GokuMohandas/Made-With-ML.git
synced 2026-03-08 23:02:27 -05:00
TypeError in Ray TorchTrainer with StreamSplitDataIterator #73
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AliHaiderAhmad001 on GitHub (Oct 10, 2024).
What happened + What you expected to happen
Description:
I encountered a TypeError when running TorchTrainer in a Ray Tune experiment. The error occurs due to an issue with StreamSplitDataIterator, which does not have a defined len() method. This issue causes the trial to fail and the training process to stop.
Error Traceback:
Expected Behavior:
I expected the training loop to handle the
StreamSplitDataIteratorproperly without raising theTypeError.Actual Behavior:
The
TypeErrorprevents the training process from completing, as it attempts to calculate the length of an object that lacks a__len__method.Detailed Traceback
Versions / Dependencies
Environment:
Ray version: 2.37.0
Python version: 3.10
OS: Ubuntu
Hardware: CPU-based training on local laptop
Reproduction script
Related codes
----------- Trainer -----------------
------------------------ train_step -------------------------
----------------- train_loop_per_worker -------------------------
--------- load_data ----------