Skip to content

Commit

Permalink
๐ŸŒ [i18n-KO] Translated git_vs_http.md to Korean (#1862)
Browse files Browse the repository at this point in the history
* docs: ko:git_vs_http

* feat: chatgpt draft

* fix: manual edits

* Update docs/source/ko/concepts/git_vs_http.md

๋” ํŽธ์•ˆํ•˜๋„ค์š” :)

Co-authored-by: Sohyun Sim <96299403+sim-so@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Sohyun Sim <96299403+sim-so@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Sohyun Sim <96299403+sim-so@users.noreply.github.com>

* Apply suggestions from code review

fix: resolve suggestions

Co-authored-by: Sohyun Sim <96299403+sim-so@users.noreply.github.com>

* Apply suggestions from code review

---------

Co-authored-by: Sohyun Sim <96299403+sim-so@users.noreply.github.com>
Co-authored-by: Lucain <lucainp@gmail.com>
  • Loading branch information
3 people authored Dec 18, 2023
1 parent c4ddfc7 commit f860cf8
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/source/ko/_toctree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
title: (๋ฒˆ์—ญ ์ค‘) Webhooks server
- title: "(๋ฒˆ์—ญ ์ค‘) ๊ฐœ๋… ๊ฐ€์ด๋“œ"
sections:
- local: in_translation
title: (๋ฒˆ์—ญ ์ค‘) Git vs HTTP paradigm
- local: concepts/git_vs_http
title: Git ๋Œ€ HTTP ํŒจ๋Ÿฌ๋‹ค์ž„
- title: "(๋ฒˆ์—ญ ์ค‘) ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋ ˆํผ๋Ÿฐ์Šค"
sections:
- local: in_translation
Expand Down
53 changes: 53 additions & 0 deletions docs/source/ko/concepts/git_vs_http.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!--โš ๏ธ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
rendered properly in your Markdown viewer.
-->

# Git ๋Œ€ HTTP ํŒจ๋Ÿฌ๋‹ค์ž„

`huggingface_hub` ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” git ๊ธฐ๋ฐ˜์˜ ์ €์žฅ์†Œ(Models, Datasets ๋˜๋Š” Spaces)๋กœ ๊ตฌ์„ฑ๋œ Hugging Face Hub๊ณผ ์ƒํ˜ธ ์ž‘์šฉํ•˜๊ธฐ ์œ„ํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ž…๋‹ˆ๋‹ค.
`huggingface_hub`๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ Hub์— ์ ‘๊ทผํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ํฌ๊ฒŒ ๋‘ ๊ฐ€์ง€์ž…๋‹ˆ๋‹ค.

์ฒซ ๋ฒˆ์งธ ์ ‘๊ทผ ๋ฐฉ์‹์ธ ์†Œ์œ„ "git ๊ธฐ๋ฐ˜" ์ ‘๊ทผ ๋ฐฉ์‹์€ [`Repository`] ํด๋ž˜์Šค๊ฐ€ ์ฃผ๋„ํ•ฉ๋‹ˆ๋‹ค.
์ด ๋ฐฉ๋ฒ•์€ ํ—ˆ๋ธŒ์™€ ์ƒํ˜ธ ์ž‘์šฉํ•˜๋„๋ก ํŠน๋ณ„ํžˆ ์„ค๊ณ„๋œ ์ถ”๊ฐ€ ๊ธฐ๋Šฅ์ด ์žˆ๋Š” `git` ๋ช…๋ น์— ๋žฉํผ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
๋‘ ๋ฒˆ์งธ ๋ฐฉ๋ฒ•์€ "HTTP ๊ธฐ๋ฐ˜" ์ ‘๊ทผ ๋ฐฉ์‹์ด๋ฉฐ, [`HfApi`] ํด๋ผ์ด์–ธํŠธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ HTTP ์š”์ฒญ์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.
๊ฐ ๋ฐฉ๋ฒ•์˜ ์žฅ๋‹จ์ ์„ ์‚ดํŽด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

## Repository: ์—ญ์‚ฌ์ ์ธ Git ๊ธฐ๋ฐ˜ ์ ‘๊ทผ ๋ฐฉ์‹

๋จผ์ €, `huggingface_hub`๋Š” ์ฃผ๋กœ [`Repository`] ํด๋ž˜์Šค๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ตฌ์ถ•๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
์ด ํด๋ž˜์Šค๋Š” `"git add"`, `"git commit"`, `"git push"`, `"git tag"`, `"git checkout"` ๋“ฑ๊ณผ ๊ฐ™์€ ์ผ๋ฐ˜์ ์ธ `git` ๋ช…๋ น์— ๋Œ€ํ•œ Python ๋žฉํผ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” ๋จธ์‹ ๋Ÿฌ๋‹ ์ €์žฅ์†Œ์—์„œ ์ž์ฃผ ์‚ฌ์šฉ๋˜๋Š” ํฐ ํŒŒ์ผ์„ ์ถ”์ ํ•˜๊ณ  ์ž๊ฒฉ ์ฆ๋ช…์„ ์„ค์ •ํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค.
๋˜ํ•œ, ์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” ๋ฐฑ๊ทธ๋ผ์šด๋“œ์—์„œ ๋ฉ”์†Œ๋“œ๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์–ด, ํ›ˆ๋ จ ์ค‘์— ๋ฐ์ดํ„ฐ๋ฅผ ์—…๋กœ๋“œํ•  ๋•Œ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.

๋กœ์ปฌ ๋จธ์‹ ์— ์ „์ฒด ์ €์žฅ์†Œ์˜ ๋กœ์ปฌ ๋ณต์‚ฌ๋ณธ์„ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์€ [`Repository`]๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฐ€์žฅ ํฐ ์žฅ์ ์ž…๋‹ˆ๋‹ค.
ํ•˜์ง€๋งŒ ๋™์‹œ์— ๋กœ์ปฌ ๋ณต์‚ฌ๋ณธ์„ ์ง€์†์ ์œผ๋กœ ์—…๋ฐ์ดํŠธํ•˜๊ณ  ์œ ์ง€ํ•ด์•ผ ํ•œ๋‹ค๋Š” ๋‹จ์ ์ด ๋  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
์ด๋Š” ๊ฐ ๊ฐœ๋ฐœ์ž๊ฐ€ ์ž์ฒด ๋กœ์ปฌ ๋ณต์‚ฌ๋ณธ์„ ์œ ์ง€ํ•˜๊ณ  ๊ธฐ๋Šฅ์„ ๊ฐœ๋ฐœํ•  ๋•Œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ pushํ•˜๋Š” ์ „ํ†ต์ ์ธ ์†Œํ”„ํŠธ์›จ์–ด ๊ฐœ๋ฐœ๊ณผ ์œ ์‚ฌํ•ฉ๋‹ˆ๋‹ค.
๊ทธ๋Ÿฌ๋‚˜ ๋จธ์‹ ๋Ÿฌ๋‹์˜ ๊ฒฝ์šฐ, ์‚ฌ์šฉ์ž๊ฐ€ ์ „์ฒด ์ €์žฅ์†Œ๋ฅผ ๋ณต์ œํ•  ํ•„์š” ์—†์ด ์ถ”๋ก ์„ ์œ„ํ•ด ๊ฐ€์ค‘์น˜๋งŒ ๋‹ค์šด๋กœ๋“œํ•˜๊ฑฐ๋‚˜ ๊ฐ€์ค‘์น˜๋ฅผ ํ•œ ํ˜•์‹์—์„œ ๋‹ค๋ฅธ ํ˜•์‹์œผ๋กœ ๋ณ€ํ™˜ํ•˜๊ธฐ๋งŒ ํ•˜๋ฉด ๋˜๊ธฐ ๋•Œ๋ฌธ์— ์ด๋Ÿฐ ๋ฐฉ์‹์ด ํ•ญ์ƒ ํ•„์š”ํ•œ ๊ฒƒ์€ ์•„๋‹™๋‹ˆ๋‹ค.

<Tip warning={true}>

[`Repository`]๋Š” ์ง€์›์ด ์ค‘๋‹จ๋  ์˜ˆ์ •์ด๋ฏ€๋กœ HTTP ๊ธฐ๋ฐ˜ ๋Œ€์•ˆ์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ์กด ์ฝ”๋“œ์—์„œ ๋„๋ฆฌ ์‚ฌ์šฉ๋˜๊ธฐ ๋•Œ๋ฌธ์— [`Repository`]์˜ ์™„์ „ํ•œ ์ œ๊ฑฐ๋Š” ๋ฆด๋ฆฌ์Šค `v1.0`์—์„œ ์ด๋ฃจ์–ด์งˆ ์˜ˆ์ •์ž…๋‹ˆ๋‹ค.

</Tip>

## HfApi: ์œ ์—ฐํ•˜๊ณ  ํŽธ๋ฆฌํ•œ HTTP ํด๋ผ์ด์–ธํŠธ

[`HfApi`] ํด๋ž˜์Šค๋Š” ํŠนํžˆ ํฐ ๋ชจ๋ธ์ด๋‚˜ ๋ฐ์ดํ„ฐ์…‹์„ ์ฒ˜๋ฆฌํ•  ๋•Œ ์œ ์ง€ํ•˜๊ธฐ ์–ด๋ ค์šด ๋กœ์ปฌ git ์ €์žฅ์†Œ์˜ ๋Œ€์•ˆ์œผ๋กœ ๊ฐœ๋ฐœ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
[`HfApi`] ํด๋ž˜์Šค๋Š” ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ ๋ฐ push, ๋ธŒ๋žœ์น˜ ๋ฐ ํƒœ๊ทธ ์ƒ์„ฑ๊ณผ ๊ฐ™์€ git ๊ธฐ๋ฐ˜ ์ ‘๊ทผ ๋ฐฉ์‹๊ณผ ๋™์ผํ•œ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜์ง€๋งŒ, ๋™๊ธฐํ™” ์ƒํƒœ๋ฅผ ์œ ์ง€ํ•ด์•ผ ํ•˜๋Š” ๋กœ์ปฌ ํด๋”๊ฐ€ ํ•„์š”ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

[`HfApi`] ํด๋ž˜์Šค๋Š” `git`์ด ์ œ๊ณตํ•˜๋Š” ๊ธฐ๋Šฅ ์™ธ์—๋„ ์ถ”๊ฐ€์ ์ธ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
์ €์žฅ์†Œ๋ฅผ ๊ด€๋ฆฌํ•˜๊ณ , ํšจ์œจ์ ์ธ ์žฌ์‚ฌ์šฉ์„ ์œ„ํ•ด ์บ์‹ฑ์„ ์‚ฌ์šฉํ•˜์—ฌ ํŒŒ์ผ์„ ๋‹ค์šด๋กœ๋“œํ•˜๊ณ , Hub์—์„œ ์ €์žฅ์†Œ ๋ฐ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋ฅผ ๊ฒ€์ƒ‰ํ•˜๊ณ , ํ† ๋ก , PR ๋ฐ ์ฝ”๋ฉ˜ํŠธ์™€ ๊ฐ™์€ ์ปค๋ฎค๋‹ˆํ‹ฐ ๊ธฐ๋Šฅ์— ์ ‘๊ทผํ•˜๊ณ , Spaces ํ•˜๋“œ์›จ์–ด ๋ฐ ์‹œํฌ๋ฆฟ์„ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

## ๋ฌด์—‡์„ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋‚˜์š”? ์–ธ์ œ ์‚ฌ์šฉํ•˜๋‚˜์š”?

์ „๋ฐ˜์ ์œผ๋กœ, **HTTP ๊ธฐ๋ฐ˜ ์ ‘๊ทผ ๋ฐฉ์‹์€ ๋ชจ๋“  ๊ฒฝ์šฐ์—** `huggingface_hub`๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.
[`HfApi`]๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ pullํ•˜๊ณ  pushํ•˜๊ณ , PR, ํƒœ๊ทธ ๋ฐ ๋ธŒ๋žœ์น˜๋กœ ์ž‘์—…ํ•˜๊ณ , ํ† ๋ก ๊ณผ ์ƒํ˜ธ ์ž‘์šฉํ•˜๋Š” ๋“ฑ์˜ ์ž‘์—…์„ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
`0.16` ๋ฆด๋ฆฌ์Šค๋ถ€ํ„ฐ๋Š” [`Repository`] ํด๋ž˜์Šค์˜ ๋งˆ์ง€๋ง‰ ์ฃผ์š” ์žฅ์ ์ด์—ˆ๋˜ http ๊ธฐ๋ฐ˜ ๋ฉ”์†Œ๋“œ๋„ ๋ฐฑ๊ทธ๋ผ์šด๋“œ์—์„œ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ทธ๋Ÿฌ๋‚˜ ๋ชจ๋“  git ๋ช…๋ น์ด [`HfApi`]๋ฅผ ํ†ตํ•ด ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๊ฒƒ์€ ์•„๋‹™๋‹ˆ๋‹ค. ์ผ๋ถ€๋Š” ๊ตฌํ˜„๋˜์ง€ ์•Š์„ ์ˆ˜๋„ ์žˆ์ง€๋งŒ, ์ €ํฌ๋Š” ํ•ญ์ƒ ๊ฐœ์„ ํ•˜๊ณ  ๊ฒฉ์ฐจ๋ฅผ ์ค„์ด๊ธฐ ์œ„ํ•ด ๋…ธ๋ ฅํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
์‚ฌ์šฉ ์‚ฌ๋ก€์— ํ•ด๋‹น๋˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ, [Github์—์„œ ์ด์Šˆ](https://github.com/huggingface/huggingface_hub)๋ฅผ ๊ฐœ์„คํ•ด ์ฃผ์„ธ์š”!
์‚ฌ์šฉ์ž์™€ ํ•จ๊ป˜, ์‚ฌ์šฉ์ž๋ฅผ ์œ„ํ•œ ๐Ÿค— ์ƒํƒœ๊ณ„๋ฅผ ๊ตฌ์ถ•ํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋˜๋Š” ํ”ผ๋“œ๋ฐฑ์„ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค.

git ๊ธฐ๋ฐ˜ [`Repository`]๋ณด๋‹ค http ๊ธฐ๋ฐ˜ [`HfApi`]๋ฅผ ์„ ํ˜ธํ•œ๋‹ค๊ณ  ํ•ด์„œ Hugging Face Hub์—์„œ git ๋ฒ„์ „ ๊ด€๋ฆฌ๊ฐ€ ๋ฐ”๋กœ ์‚ฌ๋ผ์ง€๋Š” ๊ฒƒ์€ ์•„๋‹™๋‹ˆ๋‹ค.
์›Œํฌํ”Œ๋กœ์šฐ ์ƒ ํ•ฉ๋‹นํ•˜๋‹ค๋ฉด ์–ธ์ œ๋“  ๋กœ์ปฌ์—์„œ `git` ๋ช…๋ น์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

0 comments on commit f860cf8

Please sign in to comment.