Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Fix a bitwise operator

Open tomohideshibata opened this issue 2 years ago • 2 comments

I got the following error at model/supervised_finetuning/custom_datasets/summarization.py#L60:

TypeError: unsupported operand type(s) for &: 'list' and 'str'

tomohideshibata avatar Feb 10 '23 06:02 tomohideshibata

@tomohideshibata not sure what's the difference between the two, can you extrapolate?

theblackcat102 avatar Feb 11 '23 07:02 theblackcat102

@theblackcat102 Thanks for your response. First, the current code does not work due to the operator precedence. The following code would work, but I think it is normal to use and instead of &.

if (summarization_config_mapping[dataset][0] in ["billsum", "tldr_news"]) & (split == "validation"):
    ...

tomohideshibata avatar Feb 11 '23 07:02 tomohideshibata

This is fixed via https://github.com/LAION-AI/Open-Assistant/pull/1455.

tomohideshibata avatar Feb 12 '23 06:02 tomohideshibata