Skip to content

Go를 활용한 머신 러닝 책을 docker 환경으로 구성하고, pachyderm을 사용하여 pipeline 구축을 실습한다.

License

GzuPark/ml_with_go

Repository files navigation

Machine Learning with Go

  • Go를 활용한 머신 러닝 책을 docker 환경으로 구성하여 실습
  • Pachyderm을 사용하여 pipeline 구축 실습
  • 특히, 버전이 맞지 않아 코드를 그대로 실행하지 못했던 것을 수정

Contents

1장 : 데이터 수집 및 구성
2장 : 행렬, 확률, 통계
3장 : 평가 및 검증
4장 : 회귀분석
5장 : 분류
6장 : 클러스터링
7장 : 시계열 분석 및 이상 감지
8장 : 신경망 및 딥러닝
9장 : 분석 결과 및 모델 배포하기

Environment

  • Docker Desktop >= 2.5.0.1 (Recommended)
  • Docker >= 19.03.8 (Recommended)
  • make (Required)
  • wsl2 (Only Windows) 👉 설치 가이드
    • Use wsl terminal, not CMD or PowerShell on Windows
  • Golang >= 1.15 (In the container)
  • PostgreSQL >= 13.1 (In the container)
  • alpine >= 3.12 (In the container)
  • pachyderm ~= 1.11.7 (only ch09)

How to use

Docker

  • Compose up docker containers
    # Default
    (os)$ make up
    
    # With build go binaries
    (os)$ make up PKGS=1
  • Start and enter the execution mode to the container
    (os)$ make run
  • Stop docker containers
    (os)$ make stop
  • Remove docker compose
    (os)$ make down

Build

(docker)$ cd tutorial_code_location
(docker)$ go build tutorial.go

# example
(docker)$ go build 01_read_csv_file.go

Execution

(docker)$ cd tutorial_code_location
(docker)$ ./tutorial

# example
(docker)$ ./01_read_csv_file

Aumotation

# build in anywhere
(docker)$ $MLGO/automation.sh build

# possible from ch01 to ch08
(docker)$ $MLGO/automation.sh build ch01

# clean up binary files in anywhere
(docker)$ $MLGO/automation.sh clean

# possible from ch01 to ch08 except deep_learning
(docker)$ $MLGO/automation.sh clean ch01

# execute binary files in anywhere
(docker)$ $MLGO/automation.sh run

# possible from ch01 to ch08 except deep_learning
(docker)$ $MLGO/automation.sh run ch01

Reference