Git Product home page Git Product logo

snl-starter-kit's Introduction

snl-starter-kit

SNL에 참여하기 위한 starter kit 입니다.

Prerequisite

  • SNL account
  • Docker Engine(엔진이 꼭!! 켜져 있어야 합니다)
    • tested on CentOS, Ubuntu, MacOS
  • openmpi(만약 시스템에 설치되어 있지 않다면) for mpi4py
    • Ubuntu : sudo apt-get install libopenmpi-dev
    • CentOS/RHEL : sudo yum install openmpi-devel
    • Mac : (필요시)(대부분의 경우에 이미 설치되어 있음)brew install mpich
    • 경우에 따라 환경변수 설정 등이 필요할 수도 있기 때문에, 환경에 맞는 설치방법을 구글링하여 설치.
  • 패키지 설치
pip install -r requirements.txt

How-To

Directories

snl-starter-kit/
  /src
  /submit.sh

src 폴더안의 algo에 본인의 에이전트를 구현하시면 됩니다.

  • Agent class에 act method는 꼭 정의되어 있어야 합니다.
  • Agent.act 메소드의 인자로 환경의 observation이 들어옵니다. observation의 디테일은 comment 혹은 https://github.com/kc-ml2/marlenv를 참조 부탁드립니다.
class Agent:
    def __init__(self):
        pass

    def act(self, obs):
        pass
  • Inference(혹은 test) time을 위한 파라미터로, 초기화된 agent instance를 agent_factory 메소드에서 return 해주셔야 합니다.
  • 예를 들어, Epsilon greedy exploration을 하는 agent의 경우, test time에서는 exploration을 원치 않을 때, explore=False
def agent_factory():
    agent = Agent(**kwargs_for_inference)

    return agent
  • 에이전트 제출
# log in with your account info
docker login


# below script will build and push docker image
./submit.sh

# 만약 ./submit.sh가 실행 안될경우
sudo chmod 777 submit.sh

Notes

도커

용량 부족

  • 도커 엔진은 사용할 수 있는 저장공간이 제한되어 있습니다. 이미 엔진에 너무 많은 이미지가 있는 경우, 불필요한 이미지를 정리해주시고 docker system prune실행해 주세요.

메모리 부족

  • 도커 엔진은 사용할 수 있는 메모리공간이 제한되어 있습니다. 이미지를 build 할 때 간혹 메모리가 부족하다고 뜰 경우, 도커 엔진이 사용할 수 있는 메모리를 늘려 주시기 바랍니다.

Window 사용자

Tested on Python 3.7, Docker Engine backed by WSL

PowerShell or git-bash로 submit.sh 실행(관리자 권한 필요 없습니다.) .₩submit.sh 혹은 sub타입후 탭

  • Pycharm등의 IDE terminal에서는 그냥 submit.sh

  • submit.sh 실행 중 권한 요청이 오면 수락

snl-starter-kit's People

Contributors

anthony0727 avatar n1sz avatar yonghakim avatar

Stargazers

Dongjin Seo avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.