Debug
-
[VS Code/SSH] Local server exit: 15 에러 해결하기Debug 2024. 4. 19. 10:58
가끔 원격 서버에 접속할 때 반복적으로 접근이 안되는 경우가 발생한다. 이럴 때 오류 코드와 에러 메세지를 자세히 살펴보면 에러를 해결하는 데 많은 도움을 받을 수 있다. Local server exit: 15 은 그 중에서도 자주 일어나는 에러이다. 아래에 유효했던 두 가지 해결 방법을 간단히 기록해두었다. 1. 서버의 configuration 폴더를 삭제(백업)해 새롭게 연결을 구성하게 하는 방법 서버에서 아래의 코드를 입력한 후 다시 VS Code로 SSH 연결을 시도한다. mv .vscode-server .vscode-server-backup 2. Disk quota exceeded (거의 대부분의 경우) 서버의 저장공간을 확보해준다.
-
[WSL2/LINUX/UBUNTU] Ubuntu 22.04에 CUDA Toolkit 설치시 liburcu6 Dependency 해결하기Debug 2023. 12. 8. 11:55
Environments 운영체제: Window10 WSL/Ubuntu 용 CUDA Toolkit을 설치하려고 시도 CUDA Toolkit 11.6 Error The following packages have unmet dependencies: libcufile-11-6 : Depends: liburcu6 but it is not installable E: Unable to correct problems, you have held broken packages. Solved Ubuntu 22.04 에서는 liburcu6 라이브러리를 지원하지 않으면서 발생하는 문제인데, ubuntu 포럼에서 같은 문제를 겪은 사람에게 liburcu6의 전달 포트를 제공하면서 해결 할 수 있었다. sudo add-apt-rep..
-
[Git] Fork한 레포지토리 push 및 The requested URL returned error: 403 Push 에러 해결 방법Debug 2023. 11. 30. 13:06
다른 사람의 Git Repository(레포지토리, A) 를 Fork(B) 및 Clone 한 후, (A) 레포지토리에 변경사항을 push하고 싶은 경우 방법에 대해 간략하게 설명하겠습니다. 1. 대상 Repository(레포지토리, A) Clone # HTTPS git clone https://github.com/[ORIG_USERNAME]/[REPOSITORY].git # SSH git clone git@github.com:[ORIG_USERNAME]/[REPOSITORY].git 2. 코드 변경 3. git add & git commit 4-1. 다른사람의 Repository에 push 하고 싶을 때, collaborator 지정 필요 (Settings > Collaborators > Add peop..
-
[Conda/Pytorch] 디버깅 - Solving environment: failed with initial frozen solve. Retrying with flexible solve.Debug 2023. 10. 17. 13:02
문제상황 Cuda 버전을 바꾸면서, 기존에 있던 Pytorch를 삭제하고 새로운 cuda 버전에 맞는 pytorch, torchvision, cudatoolkit 등등을 설치하려고 했을 때, 위와 같은 에러가 발생하였다. 다양한 라이브러리와 compatible 이슈 발생으로 인해 Conflicts 해결을 하겠다는 과정이 1시간 가까지 지속되었지만, 끝날 기미가 보이지 않았다. 관련 이슈에 대해 Git에서 Error Reporting 된 내역: https://github.com/conda/conda/issues/9367 Solving environment: failed with initial frozen solve. Retrying with flexible solve. · Issue #9367 · cond..
-
[Python/Pytorch] 데이터 타입(DataType) 조회하는 방법Debug 2023. 8. 21. 02:56
데이터 타입에 따라 dtype 조회하는 방법이 다르다. List, Int 등 기본 데이터 타입 # 1 a = dict() type(a) # 2 isinstance(a, dict) tensor (torch) 데이터 타입 a = torch.zeros(1, 3) torch.is_tensor(a) tensor.float32 등의 데이터 타입 a = torch.zeros(1, 3) torch.dtype tensor의 데이터 타입 변환시 아래와 같이 코드를 작성하면 된다. 단, torch.float32는 float 타입이지만, torch.float64는 double 타입으로 인식하는 것에 유의하자. a = torch.zeros(1, 3, dtype=torch.int32) b = torch.Tensor([1.3, 2..
-
[Pytorch] tensor로 구성된 list를 tensor로 만드는 방법Debug 2023. 8. 21. 02:47
▶ 현상 List Object를 tensor 타입으로 만들고 싶을 때, 리스트 구성 요소가 tensor일 때 torch.Tensor class를 생성하며 인자로 list를 넘겨주면 에러가 발생한다. import torch a = list(torch.zeros(1, 3)) tensor_a = torch.Tensor(a) # ValueError: only one element tensors can be converted to Python scalars ▶ 발생 에러 ValueError: only one element tensors can be converted to Python scalars ▶ 해결 방법 tensor_a = torch.stack(a, dim=0) # tensor([[0., 0., 0.]])
-
[Pytorch/Pytorch Lightning] RuntimeError: element 0 of tensors does not require grad and does not have a grad_fnDebug 2023. 8. 20. 23:12
환경: CentOS Linux release 7.9.2009 ▶ 에러 메세지 File "~/anaconda3/envs/venv/lib/python3.8/site-packages/pytorch_lightning/core/module.py", line 1419, in backward loss.backward(*args, **kwargs) File "~/anaconda3/envs/venv/lib/python3.8/site-packages/torch/_tensor.py", line 363, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs) ▶ 문제 원인 loss가 requires_grad = ..