Coder Social home page Coder Social logo

Comments (6)

zwq2018 avatar zwq2018 commented on August 30, 2024

huggingface的 space 已经停了,api 开销太大了。 本地自己部署是可以跑的,出现这个问题可能是格式上有些问题,你 debug 下就可以

from data-copilot.

zmsoft avatar zmsoft commented on August 30, 2024

@zwq2018 @ET-yzk 我是本地运行app.py,报上面这个错误,请问是什么原因导致的?

===============================Intent Detecting===========================================
Exception in thread Thread-12:
Traceback (most recent call last):
  File "/xxx/miniconda3/envs/data_copilot/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/xxx/Data-Copilot/main.py", line 37, in run
    self.result = self.func(*self.args)
  File "/xxx/Data-Copilot/main.py", line 135, in run
    prompt_intent_detection = prompt_intent_detection + '\n\n' + 'Instruction:' + '今天的日期是'+ formatted_time +', '+ instruction + ' ###New Instruction: '
TypeError: can only concatenate str (not "function") to str
Traceback (most recent call last):
  File "/xxx/.local/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1117, in call_function
    prediction = await utils.async_iteration(iterator)
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 350, in async_iteration
    return await iterator.__anext__()
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 343, in __anext__
    return await anyio.to_thread.run_sync(
  File "/xxx/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 326, in run_sync_iterator_async
    return next(iterator)
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 695, in gen_wrapper
    yield from f(*args, **kwargs)
  File "/xxx/Data-Copilot/app.py", line 168, in run
    for solving_step, img, res, df in generator:
  File "/xxx/Data-Copilot/app.py", line 64, in run
    yield next(gen)
  File "/xxx/Data-Copilot/main.py", line 378, in gradio_interface
    finally_text, img, output, df = thread.get_result()
  File "/xxx/Data-Copilot/main.py", line 40, in get_result
    return self.result
AttributeError: 'MyThread' object has no attribute 'result'```

from data-copilot.

zwq2018 avatar zwq2018 commented on August 30, 2024

@zwq2018 @ET-yzk 我是本地运行app.py,报上面这个错误,请问是什么原因导致的?

===============================Intent Detecting===========================================
Exception in thread Thread-12:
Traceback (most recent call last):
  File "/xxx/miniconda3/envs/data_copilot/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/xxx/Data-Copilot/main.py", line 37, in run
    self.result = self.func(*self.args)
  File "/xxx/Data-Copilot/main.py", line 135, in run
    prompt_intent_detection = prompt_intent_detection + '\n\n' + 'Instruction:' + '今天的日期是'+ formatted_time +', '+ instruction + ' ###New Instruction: '
TypeError: can only concatenate str (not "function") to str
Traceback (most recent call last):
  File "/xxx/.local/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1117, in call_function
    prediction = await utils.async_iteration(iterator)
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 350, in async_iteration
    return await iterator.__anext__()
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 343, in __anext__
    return await anyio.to_thread.run_sync(
  File "/xxx/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 326, in run_sync_iterator_async
    return next(iterator)
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 695, in gen_wrapper
    yield from f(*args, **kwargs)
  File "/xxx/Data-Copilot/app.py", line 168, in run
    for solving_step, img, res, df in generator:
  File "/xxx/Data-Copilot/app.py", line 64, in run
    yield next(gen)
  File "/xxx/Data-Copilot/main.py", line 378, in gradio_interface
    finally_text, img, output, df = thread.get_result()
  File "/xxx/Data-Copilot/main.py", line 40, in get_result
    return self.result
AttributeError: 'MyThread' object has no attribute 'result'```

看上去应该是因为 gpt 版本版本变化导致了输出格式没解析出来 ,具体可能需要debug下

from data-copilot.

zmsoft avatar zmsoft commented on August 30, 2024

@zwq2018 @ET-yzk 我是本地运行app.py,报上面这个错误,请问是什么原因导致的?

===============================Intent Detecting===========================================
Exception in thread Thread-12:
Traceback (most recent call last):
  File "/xxx/miniconda3/envs/data_copilot/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/xxx/Data-Copilot/main.py", line 37, in run
    self.result = self.func(*self.args)
  File "/xxx/Data-Copilot/main.py", line 135, in run
    prompt_intent_detection = prompt_intent_detection + '\n\n' + 'Instruction:' + '今天的日期是'+ formatted_time +', '+ instruction + ' ###New Instruction: '
TypeError: can only concatenate str (not "function") to str
Traceback (most recent call last):
  File "/xxx/.local/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1117, in call_function
    prediction = await utils.async_iteration(iterator)
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 350, in async_iteration
    return await iterator.__anext__()
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 343, in __anext__
    return await anyio.to_thread.run_sync(
  File "/xxx/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 326, in run_sync_iterator_async
    return next(iterator)
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 695, in gen_wrapper
    yield from f(*args, **kwargs)
  File "/xxx/Data-Copilot/app.py", line 168, in run
    for solving_step, img, res, df in generator:
  File "/xxx/Data-Copilot/app.py", line 64, in run
    yield next(gen)
  File "/xxx/Data-Copilot/main.py", line 378, in gradio_interface
    finally_text, img, output, df = thread.get_result()
  File "/xxx/Data-Copilot/main.py", line 40, in get_result
    return self.result
AttributeError: 'MyThread' object has no attribute 'result'```

看上去应该是因为 gpt 版本版本变化导致了输出格式没解析出来 ,具体可能需要debug下

main.py L135
prompt_intent_detection = prompt_intent_detection + '\n\n' + 'Instruction:' + '今天的日期是'+ formatted_time +', '+ instruction + ' ###New Instruction: ' 

@zwq2018 请教一下,这句代码是在做什么操作?
这句代码得到了以下的错误:

TypeError: can only concatenate str (not "function") to str

from data-copilot.

zwq2018 avatar zwq2018 commented on August 30, 2024

就是把今天的时间 到 prompt 里吧 你debug 下哪个不是 str

from data-copilot.

zwq2018 avatar zwq2018 commented on August 30, 2024

@zwq2018 @ET-yzk 我是本地运行app.py,报上面这个错误,请问是什么原因导致的?

===============================Intent Detecting===========================================
Exception in thread Thread-12:
Traceback (most recent call last):
  File "/xxx/miniconda3/envs/data_copilot/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/xxx/Data-Copilot/main.py", line 37, in run
    self.result = self.func(*self.args)
  File "/xxx/Data-Copilot/main.py", line 135, in run
    prompt_intent_detection = prompt_intent_detection + '\n\n' + 'Instruction:' + '今天的日期是'+ formatted_time +', '+ instruction + ' ###New Instruction: '
TypeError: can only concatenate str (not "function") to str
Traceback (most recent call last):
  File "/xxx/.local/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1117, in call_function
    prediction = await utils.async_iteration(iterator)
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 350, in async_iteration
    return await iterator.__anext__()
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 343, in __anext__
    return await anyio.to_thread.run_sync(
  File "/xxx/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 326, in run_sync_iterator_async
    return next(iterator)
  File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 695, in gen_wrapper
    yield from f(*args, **kwargs)
  File "/xxx/Data-Copilot/app.py", line 168, in run
    for solving_step, img, res, df in generator:
  File "/xxx/Data-Copilot/app.py", line 64, in run
    yield next(gen)
  File "/xxx/Data-Copilot/main.py", line 378, in gradio_interface
    finally_text, img, output, df = thread.get_result()
  File "/xxx/Data-Copilot/main.py", line 40, in get_result
    return self.result
AttributeError: 'MyThread' object has no attribute 'result'```

看上去应该是因为 gpt 版本版本变化导致了输出格式没解析出来 ,具体可能需要debug下

main.py L135
prompt_intent_detection = prompt_intent_detection + '\n\n' + 'Instruction:' + '今天的日期是'+ formatted_time +', '+ instruction + ' ###New Instruction: ' 

@zwq2018 请教一下,这句代码是在做什么操作? 这句代码得到了以下的错误:

TypeError: can only concatenate str (not "function") to str

可以看看论文 。里面介绍的比较清楚

from data-copilot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.