Skip to content

Commit 8a02b18

Browse files
committed
docs: minor fix
1 parent 75c6712 commit 8a02b18

File tree

1 file changed

+3
-30
lines changed

1 file changed

+3
-30
lines changed

docs/python/configuration.md

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -119,49 +119,22 @@ logger.info(rich.pretty.pretty_repr(config))
119119
pydantic 사용법은 공식 문서를 참고하세요.
120120

121121

122-
## typer를 이용한 방법
122+
## cyclopts를 이용한 방법
123123

124-
Typer는 argparse보다 장점이 많습니다.
124+
cyclopts는 argparse보다 장점이 많습니다.
125125

126126
1. typing을 이용해 명확하게 parameter를 정의할 수 있음.
127127
2. command line 프로그램이 쉽게 API로 노출됨.
128128
- 예: `my-program run --batch-size 32``import my_program; my_program.run(batch_size=32)`로 사용 가능
129129
3. shell completion도 쉽게 설치해 사용 가능.
130130

131-
복잡한 config 대신 typer를 이용해 command line argument로 사용하는 것도 좋은 방법입니다. 특히 다음과 같은 경우에 유용합니다.
131+
복잡한 config 대신 cyclopts를 이용해 command line argument로 사용하는 것도 좋은 방법입니다. 특히 다음과 같은 경우에 유용합니다.
132132

133133
1. 변수 개수가 몇 개 없는 경우
134134

135135

136136
## dataclass과 환경변수를 이용한 방법
137137

138-
사용법을 먼저 보여드리자면,
139-
140-
### ::: ml_project.utils.config._ExampleConfig
141-
options:
142-
show_docstring_description: true
143-
show_docstring_examples: false
144-
members: false
145-
show_bases: false
146-
show_source: true
147-
148-
### ::: ml_project.utils.config._ExampleConfig
149-
options:
150-
show_docstring_description: false
151-
show_docstring_examples: true
152-
members: false
153-
show_bases: false
154-
show_source: false
155-
156-
BaseConfig 소스코드:
157-
### ::: ml_project.utils.config.BaseConfig
158-
options:
159-
show_docstring_description: false
160-
show_docstring_examples: false
161-
members: false
162-
show_bases: false
163-
show_source: true
164-
165138
### 장점
166139

167140
1. 간단 명료한 dataclass를 만들어 typing 및 default 값 pylance의 go to definition 기능으로 확인하기 좋음.

0 commit comments

Comments
 (0)