Databricks 설정
-
클러스터에 wandb 설치
클러스터 설정으로 이동해 클러스터를 선택한 다음 Libraries를 클릭합니다. Install New를 클릭하고 PyPI를 선택한 후
wandb패키지를 추가합니다. -
인증 설정
W&B 계정을 인증하려면 노트북에서 조회할 수 있도록 Databricks 시크릿을 추가하면 됩니다.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Help us improve these docs. Take our quick survey.
Spark 클러스터에서 실험 추적, 메트릭 로깅, Model Management를 위해 W&B를 Databricks와 통합하세요.
wandb 패키지를 추가합니다.
# Databricks CLI 설치
pip install databricks-cli
# Databricks UI에서 토큰 생성
databricks configure --token
# 두 명령 중 하나로 scope 생성(Databricks에서 보안 기능이 활성화되어 있는지에 따라 다름):
# 보안 추가 기능 사용
databricks secrets create-scope --scope wandb
# 보안 추가 기능 미사용
databricks secrets create-scope --scope wandb --initial-manage-principal users
# https://wandb.ai/settings 에서 API 키 생성
databricks secrets put --scope wandb --key api_key
import os
import wandb
api_key = dbutils.secrets.get("wandb", "api_key")
wandb.login(key=api_key)
with wandb.init() as run:
run.log({"foo": 1})
import os
# 향후에는 이 설정이 필요하지 않을 예정입니다
os.environ["WANDB_ENTITY"] = "my-entity"
os.environ["WANDB_PROJECT"] = "my-project-that-exists"
Was this page helpful?