Skip to content

using ysyw for stage trainning would get error. could you please give one stage example using ysyw? #7

@dingxmhan

Description

@dingxmhan

DEBUG Creating working directory in /tmp/sk-stage train.py:31

DEBUG Random seed 11165 train.py:34

IndexError Traceback (most recent call last)
Cell In[12], line 1
----> 1 task.train(params)

File /mnt/nvme/sleepkit-main/sleepkit/tasks/stage/init.py:29, in StageTask.train(params)
21 @staticmethod
22 def train(params: TaskParams) -> None:
23 """Train sleep stage model.
24
25 Args:
26 params (TaskParams): Task parameters
27
28 """
---> 29 train(params)

File /mnt/nvme/sleepkit-main/sleepkit/tasks/stage/train.py:59, in train(params)
48 # Load features
49 dataloader = H5Dataloader(
50 path=params.feature.save_path,
51 frame_size=params.frame_size,
(...) 56 class_map=params.class_map,
57 )
---> 59 feat_shape = dataloader.feature_shape
61 # Get train/val subject IDs and generators
...
--> 118 with h5py.File(self._subject_paths[self.subject_ids[0]], mode="r") as h5:
119 feat_shape = (self.frame_size, h5[self.feat_key].shape[-1])
120 if self.feat_cols:

IndexError: list index out of range

I have tested the self.subject_ids[0] is out of range, means self.subject_ids have no data...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions