본문으로 건너뛰기
버전: docs v25.02

Appendix : ALO-v3 CLI 명령어 가이드

Updated 2025.02.20

ALO v3에서 제공하는 CLI 명령어 리스트에 대한 설명입니다.

1. alo example

alo example 명령어는 quick run을 위해 간단한 예제를 제공합니다. 이 예제는 titanic data를 활용하여 생존자 수를 예측하는 간단한 코드이며, AI Solution 등록에 필요한 모든 파일들을 제공합니다. 이를 활용하여 사용자는 손쉽게 AIC에 AI Solution을 등록해볼 수 있습니다. 실행 방법은 아래와 같습니다.

alo example

2. alo run

alo run 명령어는 사용자가 작성한 코드를 alo 형태로 변환하는 CLI 입니다. 이 CLI는 사용자가 작성한 .py 파일과 experimental_plan.yaml이 존재하는 경로에서 실행하면 됩니다. alo run을 실행하며 변경할 수 있는 인자들은 아래와 같습니다.

Args. NameTypeDefaultPossible ValuesDescription
namestr--Name of the solution
modestrall['train', 'inference', 'all']ALO mode: 'train', 'inference', 'all'
loop---Loop (no attribute specified)
computingstrlocal['local', 'daemon']Training resource
configstr--Path of experimental_plan.yaml
systemstr--Path of solution_metadata.yaml
log_levelstrERROR['NOTSET', 'DEBUG', 'INFO', 'WARNING', 'ERROR']Log level
alo run --log_level INFO

3. alo history

alo history 명령어는 사용자가 지금까지 실험한 기록들에 대해서 터미널 창에서 간단하게 확인하는 기능을 제공합니다. 이 과정에서 지금까지 작성된 코드의 성능과 변경된 파라미터 등 다양한 정보를 제공합니다 alo history를 실행할 때 변경할 수 있는 인자들은 아래와 같습니다.

Args. NameTypeDefaultPossible ValuesDescription
configstr--Path of experimental_plan.yaml
headint--Output the last part of history
modestr['train', 'inference']['train', 'inference']Selection of mode
tailint--Output the first part of history
alo history --head 5 --mode train

4. alo register

alo register 명령어는 alo 형태로 작성된 코드와 experimental_plan.yaml 및 infra 정보들을 이용하여 AIC에 등록하는 과정을 수행합니다. CLI 명령어와 AIC ID 및 password를 인자로 입력하면됩니다. 작성 예시는 아래와 같습니다.

Constraints:

  • 영어 대문자, 스페이스, 특수 문자, 한글은 미지원하며 50자까지 가능합니다.
  • AI Solution 이름은 영어 소문자, dash ( - ), 숫자만 입력 가능합니다.
alo register --id gildong.hong --password gildong.hong

5. alo update

alo update 명령어는 동일한 이름을 갖고 있는 AI Solution이 AIC에 있다면, 간단하게 업데이트할 수 있는 기능을 제공합니다. CLI 명령어 실행 시 AIC ID와 password가 요구됩니다. 작성 예시는 아래와 같습니다.

alo update --id gildong.hong --password gildong.hong

6. alo delete

alo delete 명령어는 사용자가 등록한 AI Soltuion을 간편하게 삭제할 수 있습니다. CLI 명령어 실행 시 AIC ID와 password가 필요합니다. 작성 예시는 아래와 같습니다.

alo delete --id gildong.hong --password gildong.hong

7. alo docker

alo docker 명령어는 사용자가 docker file을 수정해야하는 경우에 사용됩니다. 본 명령어를 실행하면 사용자의 현재 경로에 docker file이 생성됩니다. docker 파일이 있는 경로에서 alo run을 실행하면 현 경로의 docker file을 기반으로 실행됩니다.

alo docker

gpu를 사용하고자 하는 경우, --gpu 인자를 추가합니다.

alo docker --gpu

생성된 docker file의 cuda 버전을 변경하는 부분은 아래와 같습니다.

## torch >= 2.1.0
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
ARG CUDA_VER=11.8
...