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

Text Summarization: 'int' object has no attribute 'isnumeric' #1355

Open
1 of 2 tasks
onefanwu opened this issue Nov 14, 2023 · 1 comment
Open
1 of 2 tasks

Text Summarization: 'int' object has no attribute 'isnumeric' #1355

onefanwu opened this issue Nov 14, 2023 · 1 comment
Assignees
Labels
Bug 🐞 EVA is not working as expected
Milestone

Comments

@onefanwu
Copy link

Search before asking

  • I have searched the EvaDB issues and found no similar bug report.

Bug

evadb=#SELECT TextSummarizer(article) FROM cnn_news_test;
@status: ResponseStatus.FAIL
@batch: 
 None
@error: 'int' object has no attribute 'isnumeric'

When I run the queries in the text_summarization benchmark, I get the above error.

The queries used are as follows:

DROP TABLE IF EXISTS cnn_news_test;

CREATE TABLE IF NOT EXISTS cnn_news_test(
        id TEXT(128),
        article TEXT(4096),
        highlights TEXT(1024)
    );

DROP FUNCTION IF EXISTS TextSummarizer;

CREATE FUNCTION IF NOT EXISTS TextSummarizer
      TYPE HuggingFace
      TASK 'summarization'
      MODEL 'benchmark/models/distilbart-cnn-12-6'
      MIN_LENGTH 5
      MAX_LENGTH 100;


DROP TABLE IF EXISTS cnn_news_summary;

LOAD CSV 'benchmark/datasets/text/cnn_dailymail/test.csv'
INTO cnn_news_test;

CREATE TABLE IF NOT EXISTS cnn_news_summary AS
SELECT TextSummarizer(article) FROM cnn_news_test;

The error may be due to the following section in hf_abstract_function.py:

        for entry in function_obj.metadata:
            if entry.value.isnumeric():
                pipeline_args[entry.key] = int(entry.value)
            else:
                pipeline_args[entry.key] = entry.value

Environment

  • EvaDB v0.3.8

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@xzdandy
Copy link
Collaborator

xzdandy commented Nov 14, 2023

Thanks @onefanwu for reporting this issue. I will fix this issue.

I think a workaround now is

CREATE FUNCTION IF NOT EXISTS TextSummarizer
      TYPE HuggingFace
      TASK 'summarization'
      MODEL 'benchmark/models/distilbart-cnn-12-6'
      MIN_LENGTH '5'
      MAX_LENGTH '100';

@xzdandy xzdandy self-assigned this Nov 14, 2023
@xzdandy xzdandy added the Bug 🐞 EVA is not working as expected label Nov 14, 2023
@xzdandy xzdandy moved this to In Progress in EVA Public Roadmap ⚡🚀 Nov 14, 2023
@xzdandy xzdandy modified the milestones: Long Term Goal, v0.3.9, V0.3.10 Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 EVA is not working as expected
Projects
Status: In Progress
Development

No branches or pull requests

2 participants