Skip to content

unexpected keyword argument 'col' #9

@loveneet29

Description

@loveneet29

Iam i doing something wrong
data = (AudioItemList
.from_df(df,NSYNTH_AUDIO,col=1)
.split_by_folder()
.databunch(bs=batch_size, tfms=tfms))

TypeError Traceback (most recent call last)
in
1 data = (AudioItemList
----> 2 .from_df(df,NSYNTH_AUDIO,col=1)
3 .split_by_folder()
4 .databunch(bs=batch_size, tfms=tfms))

~\Documents\fastai_audio\data.py in from_df(cls, df, path, col, folder, suffix, length_col)
96 suffix at the end. create_func is used to open the audio files."""
97 suffix = suffix or ''
---> 98 res = super().from_df(df, path=path, col=col, length_col=length_col)
99 res.items = np.char.add(np.char.add(f'{folder}/', res.items.astype(str)), suffix)
100 res.items = np.char.add(f'{res.path}/', res.items)

~\Anaconda3\lib\site-packages\fastai\data_block.py in from_df(cls, df, path, cols, processor, **kwargs)
135 inputs = df.iloc[:,df_names_to_idx(cols, df)]
136 assert not inputs.isna().any().any(), f"You have NaN values in column(s) {cols} of your dataframe, please fix it."
--> 137 res = cls(items=_maybe_squeeze(inputs.values), path=path, inner_df=df, processor=processor, **kwargs)
138 return res
139

TypeError: init() got an unexpected keyword argument 'col'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions