kungmo
(민경모)
4월 1, 2023, 12:37오후
1
안녕하세요?
첫 글을 질문으로 시작하게 되어 부끄럽습니다..
최근에 데스크톱 컴퓨터에서도 구동할 수 있는 알파카가 나오고 우리말 처리가 된 KoAlpaca가 나왔다고 해서 beomi/KoAlpaca-Polyglot at main 나 GitHub - Beomi/KoAlpaca: KoAlpaca: Korean Alpaca Model based on Stanford Alpaca (feat. LLAMA and Polyglot-ko) 에 들어가봤습니다.
그런데 readme 파일을 읽어봐도... 어디를 보고 따라해야 구동시킬 수 있는지 감이 오지 않습니다. git clone GitHub - Beomi/KoAlpaca: KoAlpaca: Korean Alpaca Model based on Stanford Alpaca (feat. LLAMA and Polyglot-ko) 까지만 해보고, inference test.ipynb를 열어서 requirements.txt 에 있는 패키지를 설치했지만 그 다음부터는 감이 오지 않습니다...
초보자가 보고 따라해볼 수 있는 설명서가 어딨는지 알려주실 수 있을까요? ^^
컴퓨터는 Core i7 13700, 64GB RAM, RTX 3060 12GB, 우분투 22.04 입니다. 감사합니다.
2개의 좋아요
bot
(bot@PyTorchKorea)
4월 1, 2023, 1:14오후
2
아래 답변은 OpenAI의 GPT-3.5(ChatGPT) 모델로 자동 생성한 것으로, 정확하지 않을 수 있습니다.
잘못된 답변을 보셨다면 댓글로 첨삭 지도 부탁드립니다.
안녕하세요! KoAlpaca를 구동시키기 위해서는 다음과 같은 단계를 따르시면 됩니다.
우선 KoAlpaca를 다운로드 받습니다. 이를 위해서는 Git이 설치되어 있어야 합니다. 터미널에서 다음 명령어를 실행합니다.
git clone https://github.com/Beomi/KoAlpaca.git
다운로드 받은 폴더로 이동합니다.
cd KoAlpaca
필요한 라이브러리를 설치합니다. 이를 위해서는 Python과 pip가 설치되어 있어야 합니다. 다음 명령어를 실행합니다.
pip install -r requirements.txt
이제 모델을 다운로드 받습니다. 다음 명령어를 실행합니다.
python download.py
이제 inference를 수행할 수 있습니다. inference test.ipynb
파일을 열어서 실행하면 됩니다. 이 파일에서는 예시 문장에 대한 감성 분석을 수행하는 예시 코드가 제공됩니다.
위 단계를 따라하면 KoAlpaca를 구동시킬 수 있습니다. 추가적인 정보가 필요하다면, KoAlpaca의 GitHub 페이지에 있는 README.md
파일을 참고하시면 됩니다.
답변이 어떠셨나요? 괜찮았다고 생각하신다면 아래 를 한 번 눌러주시길 부탁드려요!
bot
(bot@PyTorchKorea)
4월 1, 2023, 1:28오후
3
아래 답변은 OpenAI의 GPT-4 모델로 자동 생성한 것으로, 정확하지 않을 수 있습니다.
잘못된 답변을 보셨다면 댓글로 첨삭 지도 부탁드립니다.
안녕하세요! KoAlpaca를 구동시키는 방법에 대해 안내해 드리겠습니다. 우선, 아래의 단계를 따라 진행해 주세요.
먼저, KoAlpaca 저장소를 클론합니다.
git clone https://github.com/Beomi/KoAlpaca.git
저장소로 이동한 후, 필요한 패키지를 설치합니다.
cd KoAlpaca
pip install -r requirements.txt
이제 Jupyter Notebook을 실행하여 inference test.ipynb
파일을 엽니다.
jupyter notebook
inference test.ipynb
파일에서, 아래와 같이 Hugging Face의 transformers
라이브러리를 사용하여 KoAlpaca 모델을 로드하고 텍스트 생성을 수행할 수 있습니다.
from transformers import AlpacaForMaskedLM, AlpacaTokenizer
tokenizer = AlpacaTokenizer.from_pretrained("beomi/KoAlpaca-Polyglot")
model = AlpacaForMaskedLM.from_pretrained("beomi/KoAlpaca-Polyglot")
text = "안녕하세요, 저는 [MASK]를 좋아합니다."
input_ids = tokenizer.encode(text, return_tensors="pt")
mask_idx = input_ids[0].tolist().index(tokenizer.mask_token_id)
output = model(input_ids)
token_id = output.logits[0, mask_idx].argmax(dim=-1).item()
predicted_token = tokenizer.decode([token_id])
print(f"예측된 토큰: {predicted_token}")
위의 코드를 실행하면, [MASK]
위치에 들어갈 적절한 단어가 예측되어 출력됩니다.
이제 KoAlpaca를 사용하여 텍스트 생성을 수행할 수 있습니다. 만약 추가적인 도움이 필요하시면 언제든지 문의해 주세요!
답변이 어떠셨나요? 괜찮았다고 생각하신다면 아래 를 한 번 눌러주시길 부탁드려요!
kungmo
(민경모)
4월 1, 2023, 1:39오후
4
답변 주셔서 감사합니다.
1시간 전 즈음 구글 코랩 GPU 사용 모드로 1~4번까지는 갔습니다.
그런데 from transformers import AlpacaForMaskedLM, AlpacaTokenizer 줄에서 오류가 났습니다.
transformers 안에 알파카가 들어 있어야 하는데 없다는 오류를 본 기억이 납니다.
이게 구글 코랩에서 해서 그런 걸까요??
2개의 좋아요
9bow
(박정환)
4월 1, 2023, 2:04오후
5
혹시 설치된 huggingface의 transformer 버전이 어떻게 되실까요?
아래 링크를 참고하셔서 최신(개발 중인) 버전을 설치해보시면 될 것 같습니다.
Colab을 사용하신다면 아래 명령어로 설치가 가능하십니다.
!pip install git+https://github.com/huggingface/transformers
추가로 Inference test.ipynb
파일에서는 ../KoAlpaca
경로에서 모델을 찾게 되는데요,
해당 경로에 모델을 받아두시거나 실행 시점에 huggingface에서 모델을 받아오게 하셔도 됩니다.
(후자의 경우 매번 실행하실 때마다 모델을 받아와야 해서 느릴 수 있습니다;; )
모델을 받으시려면 아래 주소를 git clone
하시면 됩니다. (git-lfs
가 필요한데, Colab에서는 어떻게 되는지 모르겠네요 )
huggingface에서 모델을 받아오시려면 아래와 같이 ../KoAlpaca
대신 beomi/KoAlpaca
를 인자로 주시면 됩니다.
import torch
from transformers import LlamaForCausalLM, LlamaTokenizer
tokenizer = LlamaTokenizer.from_pretrained("beomi/KoAlpaca")
model = LlamaForCausalLM.from_pretrained("beomi/KoAlpaca").to('cuda:0')
혹시나 잘 되시거나 안 되시면 알려주세요!
2개의 좋아요
9bow
(박정환)
4월 8, 2023, 1:43오전
6
혹시 성공하셨을까요?
결과를 공유해주시면 다른 분들께도 많은 도움이 될 것 같습니다. 감사합니다!
mozzipa
(Mozzipa)
4월 8, 2023, 7:38오전
7
저는 transformers-4.28.0.dev0 설치는 되지만, LlamaForCausalLM, LlamaTokenizer를 import 하지 못했는데, VSC를 껐다가 켜니까 됐어요.
mozzipa
(Mozzipa)
4월 8, 2023, 9:50오전
8
M1 Mac mini 16GB 를 이용해서 사용해보려고 했습니다만, 하기와 같은 에러가 나옵니다.
Canceled future for execute_request message before replies were done
The Kernel crashed while executing code in the the current cell or a previous cell. Please review the code in the cell(s) to identify a possible cause of the failure. Click [here](https://aka.ms/vscodeJupyterKernelCrash) for more info. View Jupyter [log](command:jupyter.viewOutput) for further details.
Jupyter Log는 아래와 같습니다.
error 18:47:04.217: Disposing session as kernel process died ExitCode: undefined, Reason: <ENV폴더>/lib/python3.10/site-packages/traitlets/traitlets.py:2548: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
warn(
<ENV폴더>/lib/python3.10/site-packages/traitlets/traitlets.py:2499: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '15b4aa0e-a5b9-4419-98a1-2ee3317ef3dc' instead of 'b"15b4aa0e-a5b9-4419-98a1-2ee3317ef3dc"'.
warn(
info 18:47:04.218: Dispose Kernel process 2917.
error 18:47:04.218: Raw kernel process exited code: undefined
error 18:47:04.222: Error in waiting for cell to complete Error: Canceled future for execute_request message before replies were done
at t.KernelShellFutureHandler.dispose (/.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:2:32419)
at /.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:2:51471
at Map.forEach (<anonymous>)
at y._clearKernelState (//.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:2:51456)
at y.dispose (/.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:2:44938)
at /.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:17:96826
at ee (/.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:2:1589492)
at jh.dispose (/.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:17:96802)
at Lh.dispose (/.vscode/extensions/ms-toolsai.jupyter-2023.3.1000892223/out/extension.node.js:17:104079)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
warn 18:47:04.224: Cell completed with errors {
message: 'Canceled future for execute_request message before replies were done'
}
info 18:47:04.228: Cancel all remaining cells true || Error || undefined
9bow
(박정환)
4월 8, 2023, 1:47오후
9
올려주신 Jupyter Log 메시지 자체는 vscode에서 사용하시는 Jupyter plugin에서 발생하는 오류인데,
검색해보니까 커널이 (어떤 이유로든지) 죽어서 응답을 받지 못해서 발생하는 것으로 보입니다.
opened 09:59AM - 15 Mar 23 UTC
closed 11:38PM - 15 Mar 23 UTC
bug
## Environment data
- VS Code version: 1.76.1
- Jupyter Extension versio… n: v2023.2.1200692131
- Python Extension version: v2023.4.1
- OS and version: Arch Linux
- Python and/or Anaconda version: Python-3.9.16
- Type of virtual environment used: venv with pyenv
- Jupyter server running: Local
## Extra Info
<details>
<summary>System Info</summary>
```text
In[1]:= ww --off
Out[1]:=
kands@ksc
OWOS: Arch Linux
MOWODEL: 81YN Lenovo XiaoXinAir-14ARE 2020
KEWNEL: 6.2.6-zen1-1-zen
SHEWW: /bin/bash
CPUWU: AMD Ryzen 5 4600U with Radeon Graphics [66.3°C]
GPUWU: AMD ATI 04:00.0 Renoir
MEMOWY: 3.74GiB / 15.00GiB (24%)
PKGS: 1146 (pacman), 25 (flatpak)
UWUPTIME: 11m
```
</details>
<details>
<summary>Python Env Info</summary>
```text
In[4]:= pip list
Out[4]:=
Package Version
------------------------ ---------
anyio 3.6.2
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
arrow 1.2.3
asteval 0.9.29
asttokens 2.2.1
attrs 22.2.0
autopep8 2.0.2
backcall 0.2.0
beautifulsoup4 4.11.2
black 23.1.0
bleach 6.0.0
certifi 2022.12.7
cffi 1.15.1
charset-normalizer 3.1.0
click 8.1.3
comm 0.1.2
contourpy 1.0.7
cryptography 39.0.2
cycler 0.11.0
debugpy 1.6.6
decorator 5.1.1
defusedxml 0.7.1
dill 0.3.6
docplex 2.25.236
executing 1.2.0
fastjsonschema 2.16.3
fonttools 4.39.0
fqdn 1.5.1
future 0.18.3
h5py 3.8.0
idna 3.4
importlib-metadata 6.0.0
importlib-resources 5.12.0
ipykernel 6.21.3
ipython 8.11.0
ipython-genutils 0.2.0
ipywidgets 8.0.4
isoduration 20.11.0
jedi 0.18.2
Jinja2 3.1.2
joblib 1.2.0
jsonpointer 2.3
jsonschema 4.17.3
jupyter_client 8.0.3
jupyter_core 5.2.0
jupyter-events 0.6.3
jupyter_server 2.4.0
jupyter_server_terminals 0.4.4
jupyterlab-pygments 0.2.2
jupyterlab-widgets 3.0.5
kiwisolver 1.4.4
lmfit 1.1.0
MarkupSafe 2.1.2
matplotlib 3.7.1
matplotlib-inline 0.1.6
mistune 2.0.5
mpmath 1.3.0
mypy-extensions 1.0.0
nbclassic 0.5.3
nbclient 0.7.2
nbconvert 7.2.10
nbformat 5.7.3
nest-asyncio 1.5.6
networkx 3.0
notebook 6.5.3
notebook_shim 0.2.2
ntlm-auth 1.5.0
numpy 1.23.5
packaging 23.0
pandas 1.5.3
pandocfilters 1.5.0
parso 0.8.3
pathspec 0.11.1
pbr 5.11.1
pexpect 4.8.0
pickleshare 0.7.5
Pillow 9.4.0
pip 23.0.1
platformdirs 3.1.1
ply 3.11
prometheus-client 0.16.0
prompt-toolkit 3.0.38
psutil 5.9.4
ptyprocess 0.7.0
pure-eval 0.2.2
pycodestyle 2.10.0
pycparser 2.21
Pygments 2.14.0
pylatexenc 2.10
pyparsing 3.0.9
pyrsistent 0.19.3
pyspnego 0.7.0
python-dateutil 2.8.2
python-json-logger 2.0.7
python3-pip-autoremove 0.9.1
pytz 2022.7.1
PyYAML 6.0
pyzmq 24.0.0
qiskit 0.42.0
qiskit-aer 0.12.0
qiskit-experiments 0.4.0
qiskit-ibm-experiment 0.2.8
qiskit-ibmq-provider 0.20.2
qiskit-nature 0.5.2
qiskit-optimization 0.5.0
qiskit-terra 0.23.2
requests 2.28.2
requests-ntlm 1.1.0
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rustworkx 0.12.1
scikit-learn 1.2.2
scipy 1.10.1
seaborn 0.12.2
Send2Trash 1.8.0
setuptools 67.6.0
six 1.16.0
sniffio 1.3.0
soupsieve 2.4
stack-data 0.6.2
stevedore 5.0.0
symengine 0.9.2
sympy 1.11.1
terminado 0.17.1
threadpoolctl 3.1.0
tinycss2 1.2.1
tomli 2.0.1
tornado 6.2
traitlets 5.9.0
typing_extensions 4.5.0
uncertainties 3.1.7
uri-template 1.2.0
urllib3 1.26.15
wcwidth 0.2.6
webcolors 1.12
webencodings 0.5.1
websocket-client 1.5.1
websockets 10.4
widgetsnbextension 4.0.5
zipp 3.15.0
```
</details>
## Expected behaviour
Run the code without ***Error***.
## Actual behaviour
The kernel crashed.

## Steps to reproduce:
[**NOTE**: Self-contained, minimal reproducing code samples are **extremely** helpful and will expedite addressing your issue]
### Create the environment
the `requirements.txt`
```text
numpy
notebook
ipywidgets
matplotlib
seaborn
scipy
sympy
pylatexenc
python3-pip-autoremove
qiskit
qiskit-experiments
qiskit-optimization
qiskit-nature
black
autopep8
```
create virtual env
```bash
pyenv virtualenv 3.9.16 test
```
install dependencies
```bash
pyenv shell test
pip install pip -U
pip installl -r requirements.txt -U
```
### Run the code
cell 01
```python
def qpe_pre(circ_, n_qbits):
circ_.x(n_qbits)
circ_.h(range(n_qbits))
for x in reversed(range(n_qbits)):
for _ in range(2**(n_qbits - 1 - x)):
circ_.cp(1, n_qbits - 1 - x, n_qbits)
```
cell 02
```python
import numpy as np
def qft_dagger(circ_, n_qbits):
for qbit in range(n_qbits // 2):
circ_.swap(qbit, n_qbits - qbit - 1)
for j in range(n_qbits):
for m in range(j):
circ_.cp(-np.pi / 2 ** (j - m), m, j)
circ_.h(j)
```
cell 03
```python
from qiskit import Aer, execute, QuantumCircuit
sim = Aer.get_backend('aer_simulator')
def get_pi_estimate(n_qbits):
circ = QuantumCircuit(n_qbits + 1, n_qbits)
qpe_pre(circ, n_qbits)
qft_dagger(circ, n_qbits)
circ.measure(range(n_qbits), range(n_qbits))
counts = execute(circ, sim, shots=1024).result().get_counts(circ)
max_counts_result = max(counts, key=counts.get)
max_counts_result = int(max_counts_result, 2)
phi = max_counts_result / 2**n_qbits
return 1.0 / (2 * phi)
```
cell 04
```python
import matplotlib.pyplot as plt
plt.plot(np.linspace(2, 15, num=13), np.array([np.pi for _ in range(2, 15)]), '.:b', label="pi")
plt.plot(np.linspace(2, 15, num=13), np.array([get_pi_estimate(n) for n in range(2, 15)]), '.-r', label="estimate")
plt.grid(True)
plt.legend()
plt.show()
```
> I can't guarantee that it will be reproduced every time, but the probability of it appearing is really high
If there are no errors, then restart the kernel and re-execute the code a few more times, and you should see the problem
<!--
Note: If you think a GIF of what is happening would be helpful, consider tools like https://www.cockos.com/licecap/, https://github.com/phw/peek or https://www.screentogif.com/ .
-->
## Logs
<details>
<summary>Output for <code>Jupyter</code> in the <code>Output</code> panel (<code>View</code>→<code>Output</code>, change the drop-down the upper-right of the <code>Output</code> panel to <code>Jupyter</code>)
</summary>
```
Visual Studio Code (1.76.1, undefined, desktop)
Jupyter Extension Version: 2023.2.1200692131.
Python Extension Version: 2023.4.1.
Workspace folder /home/kands/workspace/dev/paper/paper-code
用户属于试验组 "jupyterEnhancedDataViewer"
用户属于试验组 "jupyterTestcf"
info 17:29:25.767: LSP Notebooks experiment is enabled
info 17:29:26.757: Process Execution: > ~/.local/share/pyenv/versions/paper/bin/python -m pip list
> ~/.local/share/pyenv/versions/paper/bin/python -m pip list
info 17:29:31.885: Starting Jupyter Session startUsingPythonInterpreter, .jvsc74a57bd001e06f6b8fc4d51e3303e83bf94e17df0dd5d80f4250913d33825c8ccd89d330./home/kands/.local/share/pyenv/versions/paper/python./home/kands/.local/share/pyenv/versions/paper/python.-m#ipykernel_launcher (Python Path: /home/kands/.local/share/pyenv/versions/paper, EnvType: Venv, EnvName: 'paper', Version: 3.9.16 (main, Feb 16 2023, 11:29:21)
[GCC 12.2.1 20230201]) for '/home/kands/workspace/dev/paper/paper-code/test.ipynb' (disableUI=false)
info 17:29:31.909: Process Execution: > ~/.local/share/pyenv/versions/paper/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
> ~/.local/share/pyenv/versions/paper/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
info 17:29:31.947: Process Execution: > ~/.local/share/pyenv/versions/paper/bin/python -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"af3cc760-549e-44e5-b5ad-49d897eabc75" --shell=9002 --transport="tcp" --iopub=9004 --f=/home/kands/.local/share/jupyter/runtime/kernel-v2-2750SbjEuYDJGZGI.json
> ~/.local/share/pyenv/versions/paper/bin/python -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"af3cc760-549e-44e5-b5ad-49d897eabc75" --shell=9002 --transport="tcp" --iopub=9004 --f=/home/kands/.local/share/jupyter/runtime/kernel-v2-2750SbjEuYDJGZGI.json
info 17:29:31.947: Process Execution: cwd: ~/workspace/dev/paper/paper-code
cwd: ~/workspace/dev/paper/paper-code
info 17:29:32.212: ipykernel version & path 6.21.3, ~/.local/share/pyenv/versions/paper/lib/python3.9/site-packages/ipykernel/__init__.py for /home/kands/.local/share/pyenv/versions/paper/bin/python
info 17:29:32.794: Started Kernel paper (Python 3.9.16) (pid: 3056)
info 17:29:32.947: Process Execution: > ~/.local/share/pyenv/versions/paper/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/pythonFiles/printJupyterDataDir.py
> ~/.local/share/pyenv/versions/paper/bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/pythonFiles/printJupyterDataDir.py
error 17:29:40.524: Disposing session as kernel process died ExitCode: undefined, Reason: /home/kands/.local/share/pyenv/versions/paper/lib/python3.9/site-packages/traitlets/traitlets.py:2548: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
warn(
/home/kands/.local/share/pyenv/versions/paper/lib/python3.9/site-packages/traitlets/traitlets.py:2499: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'af3cc760-549e-44e5-b5ad-49d897eabc75' instead of 'b"af3cc760-549e-44e5-b5ad-49d897eabc75"'.
warn(
info 17:29:40.525: Dispose Kernel process 3056.
error 17:29:40.526: Raw kernel process exited code: undefined
error 17:29:40.532: Error in waiting for cell to complete [Error: Canceled future for execute_request message before replies were done
at t.KernelShellFutureHandler.dispose (/home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:2:33213)
at /home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:2:52265
at Map.forEach (<anonymous>)
at y._clearKernelState (/home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:2:52250)
at y.dispose (/home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:2:45732)
at /home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:17:127079
at ee (/home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:2:1552543)
at dh.dispose (/home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:17:127055)
at hh.dispose (/home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:17:134354)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)]
warn 17:29:40.534: Cell completed with errors {
message: 'Canceled future for execute_request message before replies were done'
}
info 17:29:40.536: Cancel all remaining cells true || Error || undefined
info 17:58:18.366: Restart kernel execution
info 17:58:18.367: Restart requested file:///home/kands/workspace/dev/paper/paper-code/test.ipynb
info 17:58:18.367: Restarting undefined
info 17:58:18.508: Process Execution: > ~/.local/share/pyenv/versions/paper/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
> ~/.local/share/pyenv/versions/paper/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
info 17:58:18.522: Process Execution: > ~/.local/share/pyenv/versions/paper/bin/python -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"b5ab2be2-594d-4765-be64-2f9857038dbb" --shell=9002 --transport="tcp" --iopub=9004 --f=/home/kands/.local/share/jupyter/runtime/kernel-v2-2750GW5l5pfepSIs.json
> ~/.local/share/pyenv/versions/paper/bin/python -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"b5ab2be2-594d-4765-be64-2f9857038dbb" --shell=9002 --transport="tcp" --iopub=9004 --f=/home/kands/.local/share/jupyter/runtime/kernel-v2-2750GW5l5pfepSIs.json
info 17:58:18.522: Process Execution: cwd: ~/workspace/dev/paper/paper-code
cwd: ~/workspace/dev/paper/paper-code
info 17:58:18.693: ipykernel version & path 6.21.3, ~/.local/share/pyenv/versions/paper/lib/python3.9/site-packages/ipykernel/__init__.py for /home/kands/.local/share/pyenv/versions/paper/bin/python
info 17:58:19.145: Got new session 93bd8a65-384b-4dfd-99ca-b16126964c96
info 17:58:19.145: Started new restart session
error 17:58:28.284: Disposing session as kernel process died ExitCode: undefined, Reason: /home/kands/.local/share/pyenv/versions/paper/lib/python3.9/site-packages/traitlets/traitlets.py:2548: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
warn(
/home/kands/.local/share/pyenv/versions/paper/lib/python3.9/site-packages/traitlets/traitlets.py:2499: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'b5ab2be2-594d-4765-be64-2f9857038dbb' instead of 'b"b5ab2be2-594d-4765-be64-2f9857038dbb"'.
warn(
info 17:58:28.285: Dispose Kernel process 8920.
error 17:58:28.285: Raw kernel process exited code: undefined
error 17:58:28.287: Error in waiting for cell to complete [Error: Canceled future for execute_request message before replies were done
at t.KernelShellFutureHandler.dispose (/home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:2:33213)
at /home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:2:52265
at Map.forEach (<anonymous>)
at y._clearKernelState (/home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:2:52250)
at y.dispose (/home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:2:45732)
at /home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:17:127079
at ee (/home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:2:1552543)
at dh.dispose (/home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:17:127055)
at hh.dispose (/home/kands/.vscode/extensions/ms-toolsai.jupyter-2023.2.1200692131/out/extension.node.js:17:134354)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)]
warn 17:58:28.288: Cell completed with errors {
message: 'Canceled future for execute_request message before replies were done'
}
info 17:58:28.289: Cancel all remaining cells true || Error || undefined
```
</details>
opened 11:36PM - 15 Mar 23 UTC
debt
Currently we end up with the following error message in the cell `Canceled futur… e for execute_request message before replies were done`
Originally filed here https://github.com/microsoft/vscode-jupyter/issues/13081
중요한건 커널이 왜 죽었을까, 인데요.... 혹시 어떤 셀을 실행하다가 문제가 발생했는지 알려주실 수 있을까요?
더불어 새로운 질문으로 올려주시면서 이 질문의 링크를 함께 남겨주시면 다른 분들이 참고하시기 좋을 것 같습니다.
괜찮으시면 위에 남겨주신 질문 링크 https://discuss.pytorch.kr/t/koalpaca/1342/8
를 포함하여 새 글로 질문을 올려주실 수 있으실까요?
9bow
(박정환)
4월 8, 2023, 1:53오후
10
그런데 생각해보니 Apple Silicon (M1/M2칩)에서 돌아갈지는 모르겠네요
저도 한 번 M2 맥북에서 테스트해보겠습니다 ㅎㅎ
mozzipa
(Mozzipa)
4월 8, 2023, 2:38오후
11
새 주제로 글을 작성하면서, 작성된 글의 어느 곳에나 주소가 포함되면 되나요? 아니면, 특별한 태그를 붙히거나 Editor의 어떤 기능을 이용해서 백링크(?)를 만들어야 하나요?
9bow
(박정환)
4월 8, 2023, 2:39오후
13
넵, 그냥 글 내용 아무 곳에나 링크를 포함시켜주시면 이 글에 링크가 걸려서 다른 분들께서 보시고 찾아오실 수 있습니다!
mozzipa
(Mozzipa)
4월 8, 2023, 2:49오후
14
3개의 좋아요
kungmo
(민경모)
4월 20, 2023, 3:22오전
15
답변해주셔서 감사합니다. 우분투 리눅스에서 계정 하나 새로 만들어서 도전해봐야겠습니다. 계정을 하나 새로 만들면, 이것저것 마구 설치해도 다른 계정이랑 간섭을 일으키지 않겠죠? ㅎㅎ sudo 만 안 한다면요... 몇 주일 사이에 비쿠나도 나오고 이것저것 많이 나왔으니 해봐야겠습니다.
간섭이나 충돌이 걱정되시면 venv로 가상 환경을 만드셔서 사용하시길 권합니다.
1개의 좋아요
ppApp
(p jung)
5월 17, 2023, 9:24오전
17
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'c:\users\pedro\anaconda3\envs\tensorflow39\lib\site-packages\absl_py-0.13.0.dist-info\METADATA
윈도우에서는 안되나보군요? ㅜㅜ