무슨 생각을 해 그냥 하는거지

[학습정리] 2021-11-22~2021-11-26 본문

Naver AI Tech 2기/Today I Learned

[학습정리] 2021-11-22~2021-11-26

빛나는콩 2021. 11. 26. 21:55

※ 정보전달이 목적인 포스트가 아니라 개인 학습 기록 및 정리가 목적인 포스트입니다 ※

 

만났던 오류들

Error loading preloads: Could not find renderer

  • VS code에서 jupyter, python, jupyter notebook renderers 라는 extension들이 설치되어있고, ipykernel을 install한 상태인데도 안된다면 VS code 창을 다시 닫고 다시 열어주면 해결된다. 검색해봤을 때 나오는 해결방법들을 다 해봤을 때 안되면 항상 재시작을 해보자(사실 재시작하라는 것도 검색해서 나옴ㅎ)

ImportError: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html

  • conda install -c conda-forge ipywidgets 설치 후에도 안되면 이것도 커널 재시작

 

optuna db (sqlite) 저장하기

import optuna

storage = "sqlite:///dbname.db"
rdb_storage = optuna.storages.RDBStorage(url=storage)

study = optuna.create_study(
        directions=["maximize", "minimize"],
        study_name="study_name",
        sampler=sampler,
        storage=rdb_storage,
        load_if_exists=True,
    )

 

db에서 읽어오기

import optuna

study = optuna.load_study(
  study_name="study_name",
  storage="sqlite:///dbname.db",
)
# 모든 trial dataframe으로 가져오기
study.trials_dataframe()

# best trials 가져오기 -> list
study.best_trials

 

 

tmux 사용하기

1. 세션 만들기

tmux new-session -s 세션이름

 

2. 해당 세션에서 원하는 코드 실행 (python train.py 같은 거)

 

3. 세션 종료 (백그라운드에서 계속 실행됨)

(ctrl+b) 누른 다음 떼고 d

 

4. 실행 중인 세션 확인하기

tmux ls

 

5. 세션으로 복귀

tmux attach -t 세션이름

 

 

'Naver AI Tech 2기 > Today I Learned' 카테고리의 다른 글

[학습정리] 2021-10-25 ~ 2021-10-29  (0) 2021.11.01
[학습정리] 2021-10-22  (2) 2021.10.24
[학습정리] 2021-10-20  (0) 2021.10.21
[학습정리] 2021-10-14  (0) 2021.10.15
[학습정리] 2021-10-13  (0) 2021.10.13