PaddleNLP icon indicating copy to clipboard operation
PaddleNLP copied to clipboard

CodeGen 服务无法被vscode copilot 插件调用

Open KenyonY opened this issue 3 years ago • 4 comments

在vscode copilot 没有被激活时,更改插件的用户配置,似乎也无法使用本地运行的codeGen服务:

[INFO] [auth] [2022-09-09T07:23:22.316Z] Invalid copilot token: missing token: 403 
[ERROR] [default] [2022-09-09T07:23:22.317Z] GitHub Copilot could not connect to server. Extension activation failed: "User not authorized" 

这是否意味着必须激活copilot才能使配置更改生效? 那么关于在未激活状态下使用有任何建议吗

KenyonY avatar Sep 09 '22 07:09 KenyonY

你好,127.0.0.1有改为服务器对外IP地址吗?服务器对外IP地址本地可访问吗?

gongel avatar Sep 09 '22 09:09 gongel

想问一下vscode copilot 配合 codegen,是在哪里看到相关信息的了?

wawltor avatar Sep 09 '22 09:09 wawltor

你好, @gongel 服务器地址是正确设置的,服务也是可以被访问的。
@wawltor codegen目录的README中: GithubCopilot插件配置配置插件

KenyonY avatar Sep 09 '22 15:09 KenyonY

@beidongjiedeguang 你好,确实是的,Copilot确实是需要先激活。如果不激活的话,可以使用另外一个插件,我们也是支持的,可以看下这个fauxpilot(注意事项的最后一点)

gongel avatar Sep 22 '22 11:09 gongel

It don't work! When I use fauxpilot extension in vscode, the server said: INFO: 127.0.0.1:54744 - "POST /v1/engines/codegen/completions HTTP/1.1" 500 Internal Server Error ERROR: Exception in ASGI application Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/uvicorn/protocols/http/h11_impl.py", line 366, in run_asgi …… RuntimeError: (NotFound) There are no kernels which are registered in the unsqueeze2 operator. [Hint: Expected kernels_iter != all_op_kernels.end(), but received kernels_iter == all_op_kernels.end().] (at /paddle/paddle/fluid/imperative/prepared_operator.cc:341) [operator < unsqueeze2 > error]

@beidongjiedeguang 你好,确实是的,Copilot确实是需要先激活。如果不激活的话,可以使用另外一个插件,我们也是支持的,可以看下这个fauxpilot(注意事项的最后一点)

anyxgit avatar Nov 13 '22 02:11 anyxgit

This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。

github-actions[bot] avatar Jan 12 '23 16:01 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。

github-actions[bot] avatar Jan 27 '23 00:01 github-actions[bot]

我在mac上跑,只有cpu,没有nvdia的gpu,出现类似问题。

RuntimeError: (NotFound) The kernel with key (CPU, NCHW, float16) of kernel `unsqueeze_with_xshape` is not registered. [Hint: Expected kernel_iter == iter->second.end() && kernel_key.backend() == Backend::CPU != true, but received kernel_iter == iter->second.end() && kernel_key.backend() == Backend::CPU:1 == true:1.] (at /home/Paddle/paddle/phi/core/kernel_factory.cc:147)

关掉FastGeneration,可以执行,但就太慢了,直接卡不动,有没有方法只用cpu就可以加速的,谢谢。

我只有一丢丢python经验,搞了一个晚上都没搞定,如果只有CPU用不了注明一下,我就放弃了😅。

Tindtily avatar Mar 06 '23 16:03 Tindtily

我在mac上跑,只有cpu,没有nvdia的gpu,出现类似问题。

RuntimeError: (NotFound) The kernel with key (CPU, NCHW, float16) of kernel `unsqueeze_with_xshape` is not registered. [Hint: Expected kernel_iter == iter->second.end() && kernel_key.backend() == Backend::CPU != true, but received kernel_iter == iter->second.end() && kernel_key.backend() == Backend::CPU:1 == true:1.] (at /home/Paddle/paddle/phi/core/kernel_factory.cc:147)

关掉FastGeneration,可以执行,但就太慢了,直接卡不动,有没有方法只用cpu就可以加速的,谢谢。

我只有一丢丢python经验,搞了一个晚上都没搞定,如果只有CPU用不了注明一下,我就放弃了😅。

只有cpu的话会比较慢,暂时不支持cpu加速。

gongel avatar Mar 07 '23 01:03 gongel