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

RexUniNLU模型多线程调用报错 #846

Open
zhangkesheng opened this issue Apr 28, 2024 · 1 comment
Open

RexUniNLU模型多线程调用报错 #846

zhangkesheng opened this issue Apr 28, 2024 · 1 comment
Assignees
Labels

Comments

@zhangkesheng
Copy link

import time

from fastapi import FastAPI
from modelscope.pipelines import pipeline
from pydantic import BaseModel

semantic_cls = pipeline('rex-uninlu',
                        model='damo/nlp_deberta_rex-uninlu_chinese-base',
                        model_revision='v1.2.1')

app = FastAPI()


class Item(BaseModel):
    input: str
    fields: object


@app.post("/damo/rex-uninlu")
def uie(item: Item):
    start = time.time()
    return {
        'data': semantic_cls(input=item.input, schema=item.fields),
        'took': time.time() - start
    }

用FastAPI对外提供了接口, 在阿里云FC里部署, 实例并发度10, 多线程调用的时候就会出现下面的报错
图片
Pipeline related: @Firmament-cyou @wenmengzhou

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants