> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

> Integrate W&B with OpenAI Gym to track reinforcement learning experiments and record episode performance videos.

# OpenAI Gym

<Note>
  "2021년부터 Gym을 유지 관리해 온 팀은 향후 모든 개발을 Gym을 그대로 대체할 수 있는 [Gymnasium](https://github.com/Farama-Foundation/Gymnasium)(import gymnasium as gym)으로 이전했으며, Gym은 앞으로 더 이상 업데이트되지 않습니다." ([출처](https://github.com/openai/gym#the-team-that-has-been-maintaining-gym-since-2021-has-moved-all-future-development-to-gymnasium-a-drop-in-replacement-for-gym-import-gymnasium-as-gym-and-gym-will-not-be-receiving-any-future-updates-please-switch-over-to-gymnasium-as-soon-as-youre-able-to-do-so-if-youd-like-to-read-more-about-the-story-behind-this-switch-please-check-out-this-blog-post))

  Gym은 더 이상 유지 관리되지 않으므로 Gymnasium 인테그레이션을 사용해 보세요.
</Note>

이 페이지에서는 W\&B와 [OpenAI Gym](https://github.com/openai/gym)을 함께 사용하여 강화 학습 환경의 비디오를 자동으로 캡처하는 방법을 설명합니다. 캡처한 비디오를 통해 W\&B에서 실험 메트릭과 함께 에이전트의 동작을 확인할 수 있습니다.

OpenAI Gym을 사용하면 W\&B가 `gym.wrappers.Monitor`로 생성된 환경 비디오를 자동으로 로깅합니다. 이 기능을 활성화하려면 [`wandb.init()`](/ko/products/wandb/ref/python/functions/init)의 `monitor_gym` 키워드 인수를 `True`로 설정하거나 `wandb.gym.monitor()`를 호출하세요.

gym 인테그레이션은 간단하게 동작합니다. `gym`에서 로깅되는 [비디오 파일의 이름을 확인](https://github.com/wandb/wandb/blob/master/wandb/integration/gym/__init__.py#L15)하여 그 이름을 그대로 사용하고, 일치하는 항목이 없으면 기본값인 `"videos"`를 사용합니다. 더 세밀하게 제어하려면 [비디오를 직접 로깅](/ko/products/wandb/track/log/media)하세요.

[CleanRL](https://github.com/vwxyzjn/cleanrl)의 [OpenRL Benchmark](https://wandb.me/openrl-benchmark-report)는 OpenAI Gym 예시에서 이 인테그레이션을 사용합니다. gym과 W\&B를 함께 사용하는 방법을 보여 주는 소스 코드([특정 run에 사용된 코드](https://forge.coreweave.com/wandb/cleanrl/cleanrl.benchmark/runs/2jrqfugg/code?workspace=user-costa-huang) 포함)를 참고하세요.

<Frame>
  <img src="https://mintcdn.com/coreweave-dbfa0e8d/3Dv_sw2eg8feUJlx/products/wandb/_media/open_ai_report_example.png?fit=max&auto=format&n=3Dv_sw2eg8feUJlx&q=85&s=ae0ce3cdf2081211ac8cce80c68a1900" alt="OpenAI Gym 대시보드" width="1048" height="815" data-path="products/wandb/_media/open_ai_report_example.png" />
</Frame>


## Related topics

- [OpenAI](/ko/products/wandb/weave/guides/integrations/openai.md)
