Buckets:
| <meta charset="utf-8" /><meta name="hf:doc:metadata" content="{"title":"๐ค Transformers์ ๊ธฐ์ฌํ๊ธฐ","local":"contribute-to-transformers","sections":[{"title":"๊ธฐ์ฌํ๋ ๋ฐฉ๋ฒ","local":"ways-to-contribute","sections":[],"depth":2},{"title":"๋ฏธํด๊ฒฐ๋ ๋ฌธ์ ์์ ํ๊ธฐ","local":"fixing-outstanding-issues","sections":[],"depth":2},{"title":"๋ฒ๊ทธ ๊ด๋ จ ์ด์๋ฅผ ์ ๊ธฐํ๊ฑฐ๋ ์๋ก์ด ๊ธฐ๋ฅ ์์ฒญํ๊ธฐ","local":"submitting-a-bugrelated-issue-or-feature-request","sections":[{"title":"๋ฒ๊ทธ๋ฅผ ๋ฐ๊ฒฌํ์ จ๋์?","local":"did-you-find-a-bug","sections":[],"depth":3},{"title":"์๋ก์ด ๊ธฐ๋ฅ์ ์ํ์๋์?","local":"do-you-want-a-new-feature","sections":[],"depth":3}],"depth":2},{"title":"์๋ก์ด ๋ชจ๋ธ์ ๊ตฌํํ๊ณ ์ถ์ผ์ ๊ฐ์?","local":"do-you-want-to-implement-a-new-model","sections":[],"depth":2},{"title":"๋ฌธ์๋ฅผ ์ถ๊ฐํ๊ณ ์ถ์ผ์ ๊ฐ์?","local":"do-you-want-to-add-documentation","sections":[],"depth":2},{"title":"ํ ๋ฆฌํ์คํธ(Pull Request) ์์ฑํ๊ธฐ","local":"create-a-pull-request","sections":[{"title":"Pull Request ์ฒดํฌ๋ฆฌ์คํธ","local":"pull-request-checklist","sections":[],"depth":3},{"title":"ํ ์คํธ","local":"tests","sections":[],"depth":3},{"title":"์คํ์ผ ๊ฐ์ด๋","local":"style-guide","sections":[],"depth":3},{"title":"Windows์์ ๊ฐ๋ฐ","local":"develop-on-windows","sections":[],"depth":3},{"title":"ํฌํฌํ ์ ์ฅ์๋ฅผ ์์ ์๋ณธ ๋ธ๋์น(main)๊ณผ ๋๊ธฐํํ๊ธฐ (Hugging Face ์ ์ฅ์)","local":"sync-a-forked-repository-with-upstream-main-the-hugging-face-repository","sections":[],"depth":3}],"depth":2}],"depth":1}"> | |
| <link href="/docs/transformers/main/ko/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload"> | |
| <link rel="modulepreload" href="/docs/transformers/main/ko/_app/immutable/entry/start.9aa88961.js"> | |
| <link rel="modulepreload" href="/docs/transformers/main/ko/_app/immutable/chunks/scheduler.9bc65507.js"> | |
| <link rel="modulepreload" href="/docs/transformers/main/ko/_app/immutable/chunks/singletons.9eec45c3.js"> | |
| <link rel="modulepreload" href="/docs/transformers/main/ko/_app/immutable/chunks/index.3b203c72.js"> | |
| <link rel="modulepreload" href="/docs/transformers/main/ko/_app/immutable/chunks/paths.566078f7.js"> | |
| <link rel="modulepreload" href="/docs/transformers/main/ko/_app/immutable/entry/app.84fb67c3.js"> | |
| <link rel="modulepreload" href="/docs/transformers/main/ko/_app/immutable/chunks/index.707bf1b6.js"> | |
| <link rel="modulepreload" href="/docs/transformers/main/ko/_app/immutable/nodes/0.1c99376b.js"> | |
| <link rel="modulepreload" href="/docs/transformers/main/ko/_app/immutable/chunks/each.e59479a4.js"> | |
| <link rel="modulepreload" href="/docs/transformers/main/ko/_app/immutable/nodes/11.03f3be6b.js"> | |
| <link rel="modulepreload" href="/docs/transformers/main/ko/_app/immutable/chunks/Tip.c2ecdbf4.js"> | |
| <link rel="modulepreload" href="/docs/transformers/main/ko/_app/immutable/chunks/CodeBlock.54a9f38d.js"> | |
| <link rel="modulepreload" href="/docs/transformers/main/ko/_app/immutable/chunks/EditOnGithub.922df6ba.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{"title":"๐ค Transformers์ ๊ธฐ์ฌํ๊ธฐ","local":"contribute-to-transformers","sections":[{"title":"๊ธฐ์ฌํ๋ ๋ฐฉ๋ฒ","local":"ways-to-contribute","sections":[],"depth":2},{"title":"๋ฏธํด๊ฒฐ๋ ๋ฌธ์ ์์ ํ๊ธฐ","local":"fixing-outstanding-issues","sections":[],"depth":2},{"title":"๋ฒ๊ทธ ๊ด๋ จ ์ด์๋ฅผ ์ ๊ธฐํ๊ฑฐ๋ ์๋ก์ด ๊ธฐ๋ฅ ์์ฒญํ๊ธฐ","local":"submitting-a-bugrelated-issue-or-feature-request","sections":[{"title":"๋ฒ๊ทธ๋ฅผ ๋ฐ๊ฒฌํ์ จ๋์?","local":"did-you-find-a-bug","sections":[],"depth":3},{"title":"์๋ก์ด ๊ธฐ๋ฅ์ ์ํ์๋์?","local":"do-you-want-a-new-feature","sections":[],"depth":3}],"depth":2},{"title":"์๋ก์ด ๋ชจ๋ธ์ ๊ตฌํํ๊ณ ์ถ์ผ์ ๊ฐ์?","local":"do-you-want-to-implement-a-new-model","sections":[],"depth":2},{"title":"๋ฌธ์๋ฅผ ์ถ๊ฐํ๊ณ ์ถ์ผ์ ๊ฐ์?","local":"do-you-want-to-add-documentation","sections":[],"depth":2},{"title":"ํ ๋ฆฌํ์คํธ(Pull Request) ์์ฑํ๊ธฐ","local":"create-a-pull-request","sections":[{"title":"Pull Request ์ฒดํฌ๋ฆฌ์คํธ","local":"pull-request-checklist","sections":[],"depth":3},{"title":"ํ ์คํธ","local":"tests","sections":[],"depth":3},{"title":"์คํ์ผ ๊ฐ์ด๋","local":"style-guide","sections":[],"depth":3},{"title":"Windows์์ ๊ฐ๋ฐ","local":"develop-on-windows","sections":[],"depth":3},{"title":"ํฌํฌํ ์ ์ฅ์๋ฅผ ์์ ์๋ณธ ๋ธ๋์น(main)๊ณผ ๋๊ธฐํํ๊ธฐ (Hugging Face ์ ์ฅ์)","local":"sync-a-forked-repository-with-upstream-main-the-hugging-face-repository","sections":[],"depth":3}],"depth":2}],"depth":1}"><!-- HEAD_svelte-u9bgzb_END --> <p></p> <h1 class="relative group"><a id="contribute-to-transformers" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#contribute-to-transformers"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>๐ค Transformers์ ๊ธฐ์ฌํ๊ธฐ</span></h1> <p data-svelte-h="svelte-11nfihu">๋๊ตฌ๋ ๐ค Transformers์ ๊ธฐ์ฌํ ์ ์์ผ๋ฉฐ, ์ฐ๋ฆฌ๋ ๋ชจ๋ ์ฌ๋์ ๊ธฐ์ฌ๋ฅผ ์์คํ ์๊ฐํฉ๋๋ค. ์ฝ๋ ๊ธฐ์ฌ๋ ์ปค๋ฎค๋ํฐ๋ฅผ ๋๋ ์ ์ผํ ๋ฐฉ๋ฒ์ด ์๋๋๋ค. ์ง๋ฌธ์ ๋ตํ๊ฑฐ๋ ๋ค๋ฅธ ์ฌ๋์ ๋์ ๋ฌธ์๋ฅผ ๊ฐ์ ํ๋ ๊ฒ๋ ๋งค์ฐ ๊ฐ์น๊ฐ ์์ต๋๋ค.</p> <p data-svelte-h="svelte-r37w1m">๐ค Transformers๋ฅผ ๋๋ฆฌ ์๋ฆฌ๋ ๊ฒ๋ ํฐ ๋์์ด ๋ฉ๋๋ค! ๋ฉ์ง ํ๋ก์ ํธ๋ค์ ๊ฐ๋ฅํ๊ฒ ํ ๐ค Transformers ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ๋ํด ๋ธ๋ก๊ทธ ๊ฒ์๊ธ์ ์ธ๊ธํ๊ฑฐ๋, ๋์์ด ๋์์ ๋๋ง๋ค Twitter์ ์๋ฆฌ๊ฑฐ๋, ์ ์ฅ์์ โญ๏ธ ๋ฅผ ํ์ํ์ฌ ๊ฐ์ฌ ์ธ์ฌ๋ฅผ ์ ํด์ฃผ์ธ์.</p> <p data-svelte-h="svelte-1kio56v">์ด๋ค ๋ฐฉ์์ผ๋ก ๊ธฐ์ฌํ๋ <a href="https://github.com/huggingface/transformers/blob/main/CODE_OF_CONDUCT.md" rel="nofollow">ํ๋ ๊ท์น</a>์ ์์งํ๊ณ ์กด์คํด์ฃผ์ธ์.</p> <p data-svelte-h="svelte-19dwg0b"><strong>์ด ์๋ด์๋ ๋ฉ์ง <a href="https://github.com/scikit-learn/scikit-learn/blob/main/CONTRIBUTING.md" rel="nofollow">scikit-learn ๊ธฐ์ฌ ์๋ด์</a>์์ ํฐ ์๊ฐ์ ๋ฐ์์ต๋๋ค.</strong></p> <h2 class="relative group"><a id="ways-to-contribute" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#ways-to-contribute"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>๊ธฐ์ฌํ๋ ๋ฐฉ๋ฒ</span></h2> <p data-svelte-h="svelte-13tqr2i">์ฌ๋ฌ ๊ฐ์ง ๋ฐฉ๋ฒ์ผ๋ก ๐ค Transformers์ ๊ธฐ์ฌํ ์ ์์ต๋๋ค:</p> <ul data-svelte-h="svelte-19qth38"><li>๊ธฐ์กด ์ฝ๋์ ๋ฏธํด๊ฒฐ๋ ๋ฌธ์ ๋ฅผ ์์ ํฉ๋๋ค.</li> <li>๋ฒ๊ทธ ๋๋ ์๋ก ์ถ๊ฐ๋๊ธธ ์ํ๋ ๊ธฐ๋ฅ๊ณผ ๊ด๋ จ๋ ์ด์๋ฅผ ์ ์ถํฉ๋๋ค.</li> <li>์๋ก์ด ๋ชจ๋ธ์ ๊ตฌํํฉ๋๋ค.</li> <li>์์ ๋ ๋ฌธ์์ ๊ธฐ์ฌํฉ๋๋ค.</li></ul> <p data-svelte-h="svelte-xqdnio">์ด๋์๋ถํฐ ์์ํ ์ง ๋ชจ๋ฅด๊ฒ ๋ค๋ฉด, <a href="https://github.com/huggingface/transformers/contribute" rel="nofollow">Good First Issue</a> ๋ชฉ๋ก์ ํ์ธํด๋ณด์ธ์. ์ด ๋ชฉ๋ก์ ์ด๋ณด์๋ ์ฐธ์ฌํ๊ธฐ ์ฌ์ด ์คํ ์ด์ ๋ชฉ๋ก์ ์ ๊ณตํ๋ฉฐ, ๋น์ ์ด ์คํ์์ค์ ์ฒ์์ผ๋ก ๊ธฐ์ฌํ๋ ๋ฐ ํฐ ๋์์ด ๋ ๊ฒ์ ๋๋ค. ๊ทธ์ ์์ ํ๊ณ ์ถ์ ์ด์์ ๋๊ธ๋ง ๋ฌ์์ฃผ๋ฉด ๋ฉ๋๋ค.</p> <p data-svelte-h="svelte-1ngsr3w">์กฐ๊ธ ๋ ๋์ ์ ์ธ ์์ ์ ์ํ๋ค๋ฉด, <a href="https://github.com/huggingface/transformers/labels/Good%20Second%20Issue" rel="nofollow">Good Second Issue</a> ๋ชฉ๋ก๋ ํ์ธํด๋ณด์ธ์. ์ด๋ฏธ ๋น์ ์ด ์ ํ๊ณ ์๋ค๊ณ ์๊ฐ๋๋๋ผ๋, ํ ๋ฒ ์๋ํด๋ณด์ธ์! ์ฐ๋ฆฌ๋ ์ฌ๋ฌ๋ถ์ ๋์ธ ๊ฒ์ ๋๋ค. ๐</p> <blockquote data-svelte-h="svelte-1p1hbjf"><p>์ปค๋ฎค๋ํฐ์ ์ด๋ฃจ์ด์ง๋ ๋ชจ๋ ๊ธฐ์ฌ๋ ๋๊ฐ์ด ์์คํฉ๋๋ค. ๐ฅฐ</p></blockquote> <h2 class="relative group"><a id="fixing-outstanding-issues" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#fixing-outstanding-issues"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>๋ฏธํด๊ฒฐ๋ ๋ฌธ์ ์์ ํ๊ธฐ</span></h2> <p data-svelte-h="svelte-2yvthy">๊ธฐ์กด ์ฝ๋์์ ๋ฐ๊ฒฌํ ๋ฌธ์ ์ ์ ๋ํ ํด๊ฒฐ์ฑ ์ด ๋ ์ค๋ฅธ ๊ฒฝ์ฐ, ์ธ์ ๋ ์ง <a href="https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md/#create-a-pull-request" rel="nofollow">๊ธฐ์ฌ๋ฅผ ์์</a>ํ๊ณ Pull Request๋ฅผ ์์ฑํด์ฃผ์ธ์!</p> <h2 class="relative group"><a id="submitting-a-bugrelated-issue-or-feature-request" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#submitting-a-bugrelated-issue-or-feature-request"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>๋ฒ๊ทธ ๊ด๋ จ ์ด์๋ฅผ ์ ๊ธฐํ๊ฑฐ๋ ์๋ก์ด ๊ธฐ๋ฅ ์์ฒญํ๊ธฐ</span></h2> <p data-svelte-h="svelte-gn5iut">๋ฒ๊ทธ ๊ด๋ จ ์ด์๋ฅผ ์ ๊ธฐํ๊ฑฐ๋ ์๋ก์ด ๊ธฐ๋ฅ์ ์์ฒญํ ๋๋ ๋ค์ ๊ฐ์ด๋๋ผ์ธ์ ์ต๋ํ ์ค์ํด์ฃผ์ธ์. ์ด๋ ๊ฒ ํ๋ฉด ์ข์ ํผ๋๋ฐฑ๊ณผ ํจ๊ป ๋น ๋ฅด๊ฒ ๋ต๋ณํด ๋๋ฆด ์ ์์ต๋๋ค.</p> <h3 class="relative group"><a id="did-you-find-a-bug" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#did-you-find-a-bug"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>๋ฒ๊ทธ๋ฅผ ๋ฐ๊ฒฌํ์ จ๋์?</span></h3> <p data-svelte-h="svelte-1xjzeaz">๐ค Transformers ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ ์ฌ์ฉ ์ค์ ๊ฒช๋ ๋ฌธ์ ๋ฅผ ๋ณด๊ณ ํด์ฃผ๋ ์ฌ์ฉ์๋ค ๋๋ถ์ ๋์ฑ ๊ฒฌ๊ณ ํด์ง๊ณ ์ ๋ขฐํ ์ ์๊ฒ ๋์์ต๋๋ค.</p> <p data-svelte-h="svelte-173grfl">์ด์๋ฅผ ๋ณด๊ณ ํ๊ธฐ ์ ์, ๋ฒ๊ทธ๊ฐ ์ด๋ฏธ <strong>๋ณด๊ณ ๋์ง ์์๋์ง</strong> ํ์ธํด์ฃผ์ธ์. (GitHub์ ์ด์ ํญ ์๋์ ๊ฒ์ ๋ฐ๋ฅผ ์ฌ์ฉํ์ธ์). ์ด์๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์์ฒด์์ ๋ฐ์ํ ๋ฒ๊ทธ์ด์ผ ํ๋ฉฐ, ์ฝ๋์ ๋ค๋ฅธ ๋ถ๋ถ๊ณผ ๊ด๋ จ๋ ๊ฒ์ด ์๋์ด์ผ ํฉ๋๋ค. ๋ฒ๊ทธ๊ฐ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ๋ฌธ์ ๋ก ๋ฐ์ํ์๋์ง ํ์คํ์ง ์์ ๊ฒฝ์ฐ ๋จผ์ <a href="https://discuss.huggingface.co/" rel="nofollow">ํฌ๋ผ</a>์์ ์ง๋ฌธํด ์ฃผ์ธ์. ์ด๋ ๊ฒ ํ๋ฉด ์ผ๋ฐ์ ์ธ ์ง๋ฌธ๋ณด๋ค ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ๊ด๋ จ๋ ๋ฌธ์ ๋ฅผ ๋ ๋น ๋ฅด๊ฒ ํด๊ฒฐํ ์ ์์ต๋๋ค.</p> <p data-svelte-h="svelte-1yz7rpw">๋ฒ๊ทธ๊ฐ ์ด๋ฏธ ๋ณด๊ณ ๋์ง ์์๋ค๋ ๊ฒ์ ํ์ธํ๋ค๋ฉด, ๋ค์ ์ ๋ณด๋ฅผ ํฌํจํ์ฌ ์ด์๋ฅผ ์ ์ถํด ์ฃผ์ธ์. ๊ทธ๋ฌ๋ฉด ์ฐ๋ฆฌ๊ฐ ๋น ๋ฅด๊ฒ ํด๊ฒฐํ ์ ์์ต๋๋ค:</p> <ul data-svelte-h="svelte-q2l31r"><li>์ฌ์ฉ ์ค์ธ <strong>์ด์์ฒด์ ์ข ๋ฅ์ ๋ฒ์ </strong>, ๊ทธ๋ฆฌ๊ณ <strong>Python</strong>, <strong>PyTorch</strong> ๋๋ <strong>TensorFlow</strong> ๋ฒ์ .</li> <li>๋ฒ๊ทธ๋ฅผ 30์ด ์ด๋ด๋ก ์ฌํํ ์ ์๋ ๊ฐ๋จํ๊ณ ๋ ๋ฆฝ์ ์ธ ์ฝ๋ ์ค๋ํซ.</li> <li>์์ธ๊ฐ ๋ฐ์ํ ๊ฒฝ์ฐ <em>์ ์ฒด</em> ํธ๋ ์ด์ค๋ฐฑ.</li> <li>์คํฌ๋ฆฐ์ท๊ณผ ๊ฐ์ด ๋์์ด ๋ ๊ฒ์ผ๋ก ์๊ฐ๋๋ ์ถ๊ฐ ์ ๋ณด๋ฅผ ์ฒจ๋ถํด ์ฃผ์ธ์.</li></ul> <p data-svelte-h="svelte-xict41">์ด์์ฒด์ ์ ์ํํธ์จ์ด ๋ฒ์ ์ ์๋์ผ๋ก ๊ฐ์ ธ์ค๋ ค๋ฉด ๋ค์ ๋ช ๋ น์ ์คํํ์ธ์:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->transformers-cli <span class="hljs-built_in">env</span><!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-8f4flj">์ ์ฅ์์ ๋ฃจํธ ๋๋ ํฐ๋ฆฌ์์๋ ๊ฐ์ ๋ช ๋ น์ ์คํํ ์ ์์ต๋๋ค:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->python src/transformers/commands/transformers_cli.py <span class="hljs-built_in">env</span><!-- HTML_TAG_END --></pre></div> <h3 class="relative group"><a id="do-you-want-a-new-feature" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#do-you-want-a-new-feature"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>์๋ก์ด ๊ธฐ๋ฅ์ ์ํ์๋์?</span></h3> <p data-svelte-h="svelte-vj6r4w">๐ค Transformers์์ ์ฌ์ฉํ๊ณ ์ถ์ ์๋ก์ด ๊ธฐ๋ฅ์ด ์๋ค๋ฉด, ๋ค์ ๋ด์ฉ์ ํฌํจํ์ฌ ์ด์๋ฅผ ์ ์ถํด ์ฃผ์ธ์:</p> <ol data-svelte-h="svelte-d25gvi"><li><p>์ด ๊ธฐ๋ฅ์ด ํ์ํ <em>์ด์ </em>๋ ๋ฌด์์ธ๊ฐ์? ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ๋ํ ๋ฌธ์ ๋ ๋ถ๋ง๊ณผ ๊ด๋ จ์ด ์๋์? ํ๋ก์ ํธ์ ํ์ํ ๊ธฐ๋ฅ์ธ๊ฐ์? ์ปค๋ฎค๋ํฐ์ ๋์์ด ๋ ๋งํ ๊ธฐ๋ฅ์ธ๊ฐ์?</p> <p>์ด๋ค ๋ด์ฉ์ด๋ ์ฌ๋ฌ๋ถ์ ์ด์ผ๊ธฐ๋ฅผ ๋ฃ๊ณ ์ถ์ต๋๋ค!</p></li> <li><p>์์ฒญํ๋ ๊ธฐ๋ฅ์ ์ต๋ํ ์์ธํ ์ค๋ช ํด ์ฃผ์ธ์. ๋ ๋ง์ ์ ๋ณด๋ฅผ ์ ๊ณตํ ์๋ก ๋ ๋์ ๋์์ ๋๋ฆด ์ ์์ต๋๋ค.</p></li> <li><p>ํด๋น ๊ธฐ๋ฅ์ ์ฌ์ฉ๋ฒ์ ๋ณด์ฌ์ฃผ๋ <em>์ฝ๋ ์ค๋ํซ</em>์ ์ ๊ณตํด ์ฃผ์ธ์.</p></li> <li><p>๊ธฐ๋ฅ๊ณผ ๊ด๋ จ๋ ๋ ผ๋ฌธ์ด ์๋ ๊ฒฝ์ฐ ๋งํฌ๋ฅผ ํฌํจํด ์ฃผ์ธ์.</p></li></ol> <p data-svelte-h="svelte-bkjp2g">์ด์๊ฐ ์ ์์ฑ๋์๋ค๋ฉด ์ด์๊ฐ ์์ฑ๋ ์๊ฐ, ์ด๋ฏธ 80% ์ ๋์ ์์ ์ด ์๋ฃ๋ ๊ฒ์ ๋๋ค.</p> <p data-svelte-h="svelte-1x5keh1">์ด์๋ฅผ ์ ๊ธฐํ๋ ๋ฐ ๋์์ด ๋ ๋งํ <a href="https://github.com/huggingface/transformers/tree/main/templates" rel="nofollow">ํ ํ๋ฆฟ</a>๋ ์ค๋น๋์ด ์์ต๋๋ค.</p> <h2 class="relative group"><a id="do-you-want-to-implement-a-new-model" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#do-you-want-to-implement-a-new-model"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>์๋ก์ด ๋ชจ๋ธ์ ๊ตฌํํ๊ณ ์ถ์ผ์ ๊ฐ์?</span></h2> <p data-svelte-h="svelte-tst8bx">์๋ก์ด ๋ชจ๋ธ์ ๊ณ์ํด์ ์ถ์๋ฉ๋๋ค. ๋ง์ฝ ์ฌ๋ฌ๋ถ์ด ์๋ก์ด ๋ชจ๋ธ์ ๊ตฌํํ๊ณ ์ถ๋ค๋ฉด ๋ค์ ์ ๋ณด๋ฅผ ์ ๊ณตํด ์ฃผ์ธ์:</p> <ul data-svelte-h="svelte-r77qgk"><li>๋ชจ๋ธ์ ๋ํ ๊ฐ๋จํ ์ค๋ช ๊ณผ ๋ ผ๋ฌธ ๋งํฌ.</li> <li>๊ตฌํ์ด ๊ณต๊ฐ๋์ด ์๋ค๋ฉด ๊ตฌํ ๋งํฌ.</li> <li>๋ชจ๋ธ ๊ฐ์ค์น๊ฐ ์ฌ์ฉ ๊ฐ๋ฅํ๋ค๋ฉด ๊ฐ์ค์น ๋งํฌ.</li></ul> <p data-svelte-h="svelte-9rnoj5">๋ง์ฝ ๋ชจ๋ธ์ ์ง์ ๊ธฐ์ฌํ๊ณ ์ถ์ผ์๋ค๋ฉด, ์๋ ค์ฃผ์ธ์. ๐ค Transformers์ ์ถ๊ฐํ ์ ์๋๋ก ๋์๋๋ฆฌ๊ฒ ์ต๋๋ค!</p> <p data-svelte-h="svelte-1qblewv"><a href="https://huggingface.co/docs/transformers/add_new_model" rel="nofollow">๐ค Transformers์ ์๋ก์ด ๋ชจ๋ธ์ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ</a>์ ๋ํ ๊ธฐ์ ์ ์ธ ์๋ด์๋ ์์ต๋๋ค.</p> <h2 class="relative group"><a id="do-you-want-to-add-documentation" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#do-you-want-to-add-documentation"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>๋ฌธ์๋ฅผ ์ถ๊ฐํ๊ณ ์ถ์ผ์ ๊ฐ์?</span></h2> <p data-svelte-h="svelte-17po086">์ฐ๋ฆฌ๋ ์ธ์ ๋ ๋ ๋ช ํํ๊ณ ์ ํํ ๋ฌธ์๋ฅผ ์ ๊ณตํ๊ธฐ ์ํ์ฌ ๊ฐ์ ์ ์ ์ฐพ๊ณ ์์ต๋๋ค. ์คํ์๋ ๋ถ์กฑํ ๋ด์ฉ, ๋ถ๋ช ํ์ง ์๊ฑฐ๋ ๋ถ์ ํํ ๋ด์ฉ ๋ฑ์ ์๋ ค์ฃผ์๋ฉด ๊ฐ์ ํ๋ ๋ฐ ๋์์ด ๋ฉ๋๋ค. ๊ด์ฌ์ด ์์ผ์๋ค๋ฉด ๋ณ๊ฒฝํ๊ฑฐ๋ ๊ธฐ์ฌํ์ค ์ ์๋๋ก ๋์๋๋ฆฌ๊ฒ ์ต๋๋ค!</p> <p data-svelte-h="svelte-lc34po">๋ฌธ์๋ฅผ ์์ฑ, ๋น๋ ๋ฐ ์์ฑํ๋ ๋ฐฉ๋ฒ์ ๋ํ ์์ธํ ๋ด์ฉ์ <a href="https://github.com/huggingface/transformers/tree/main/docs" rel="nofollow">README</a> ๋ฌธ์๋ฅผ ํ์ธํด ์ฃผ์ธ์.</p> <h2 class="relative group"><a id="create-a-pull-request" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#create-a-pull-request"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>ํ ๋ฆฌํ์คํธ(Pull Request) ์์ฑํ๊ธฐ</span></h2> <p data-svelte-h="svelte-y0l71i">์ฝ๋๋ฅผ ์์ฑํ๊ธฐ ์ ์ ๊ธฐ์กด์ Pull Request๋ ์ด์๋ฅผ ๊ฒ์ํ์ฌ ๋๊ตฐ๊ฐ ์ด๋ฏธ ๋์ผํ ์์ ์ ํ๊ณ ์๋์ง ํ์ธํ๋ ๊ฒ์ด ์ข์ต๋๋ค. ํ์คํ์ง ์๋ค๋ฉด ํผ๋๋ฐฑ์ ๋ฐ๊ธฐ ์ํด ์ด์๋ฅผ ์ด์ด๋ณด๋ ๊ฒ์ด ์ข์ต๋๋ค.</p> <p data-svelte-h="svelte-jufm85">๐ค Transformers์ ๊ธฐ์ฌํ๊ธฐ ์ํด์๋ ๊ธฐ๋ณธ์ ์ธ <code>git</code> ์ฌ์ฉ ๋ฅ๋ ฅ์ด ํ์ํฉ๋๋ค. <code>git</code>์ ์ฌ์ฉํ๊ธฐ ์ฌ์ด ๋๊ตฌ๋ ์๋์ง๋ง, ๋งค์ฐ ํ๋ฅญํ ๋งค๋ด์ผ์ ์ ๊ณตํฉ๋๋ค. ์(shell)์์ <code>git --help</code>์ ์ ๋ ฅํ์ฌ ํ์ธํด๋ณด์ธ์! ๋ง์ฝ ์ฑ ์ ์ ํธํ๋ค๋ฉด, <a href="https://git-scm.com/book/en/v2" rel="nofollow">Pro Git</a>์ ๋งค์ฐ ์ข์ ์ฐธ๊ณ ์๋ฃ๊ฐ ๋ ๊ฒ์ ๋๋ค.</p> <p data-svelte-h="svelte-1l3hcu4">๐ค Transformers์ ๊ธฐ์ฌํ๋ ค๋ฉด <strong><a href="https://github.com/huggingface/transformers/blob/main/setup.py#L426" rel="nofollow">Python 3.8</a></strong> ์ด์์ ๋ฒ์ ์ด ํ์ํฉ๋๋ค. ๊ธฐ์ฌ๋ฅผ ์์ํ๋ ค๋ฉด ๋ค์ ๋จ๊ณ๋ฅผ ๋ฐ๋ฅด์ธ์:</p> <ol><li data-svelte-h="svelte-ufzf8c"><p>์ ์ฅ์ ํ์ด์ง์์ <strong><a href="https://github.com/huggingface/transformers/fork" rel="nofollow">Fork</a></strong> ๋ฒํผ์ ํด๋ฆญํ์ฌ ์ ์ฅ์๋ฅผ ํฌํฌํ์ธ์. ์ด๋ ๊ฒ ํ๋ฉด ์ฝ๋์ ๋ณต์ฌ๋ณธ์ด ์ฌ๋ฌ๋ถ์ GitHub ์ฌ์ฉ์ ๊ณ์ ์๋์ ์์ฑ๋ฉ๋๋ค.</p></li> <li><p data-svelte-h="svelte-qe8yg8">ํฌํฌํ ์ ์ฅ์๋ฅผ ๋ก์ปฌ ๋์คํฌ๋ก ํด๋ก ํ๊ณ , ๊ธฐ๋ณธ ์ ์ฅ์๋ฅผ ์๊ฒฉ(remote)์ผ๋ก ์ถ๊ฐํ์ธ์:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->git <span class="hljs-built_in">clone</span> git@github.com:<your Github handle>/transformers.git | |
| <span class="hljs-built_in">cd</span> transformers | |
| git remote add upstream https://github.com/huggingface/transformers.git<!-- HTML_TAG_END --></pre></div></li> <li><p data-svelte-h="svelte-cyeaf7">๊ฐ๋ฐ ๋ณ๊ฒฝ ์ฌํญ์ ์ ์ฅํ ์ ๋ธ๋์น๋ฅผ ์์ฑํ์ธ์:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->git checkout -b a-descriptive-name-for-my-changes<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1dxc0lz">๐จ ์ ๋ <code>main</code> ๋ธ๋์น์์ ์์ ํ์ง <strong>๋ง์ธ์!</strong></p></li> <li><p data-svelte-h="svelte-bkbaq9">๊ฐ์ ํ๊ฒฝ์์ ๋ค์ ๋ช ๋ น์ ์คํํ์ฌ ๊ฐ๋ฐ ํ๊ฒฝ์ ์ค์ ํ์ธ์:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->pip install -e <span class="hljs-string">".[dev]"</span><!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1utkfa4">๋ง์ฝ ์ด๋ฏธ ๊ฐ์ ํ๊ฒฝ์ ๐ค Transformers๊ฐ ์ค์น๋์ด ์๋ค๋ฉด, <code>-e</code> ํ๋๊ทธ๋ฅผ ์ฌ์ฉํ์ฌ ์ค์นํ๊ธฐ ์ ์ <code>pip uninstall transformers</code>๋ก ์ ๊ฑฐํด์ฃผ์ธ์.</p> <p data-svelte-h="svelte-1m2jqlv">์ฌ๋ฌ๋ถ์ ์ด์์ฒด์ ์ ๋ฐ๋ผ์, ๊ทธ๋ฆฌ๊ณ ๐ค Transformers์ ์ ํ์ ์์กด์ฑ์ ์๊ฐ ์ฆ๊ฐํ๋ฉด์, ์ด ๋ช ๋ น์ด ์คํจํ ์๋ ์์ต๋๋ค. ๊ทธ๋ด ๊ฒฝ์ฐ ์ฌ์ฉํ๋ ค๋ ๋ฅ๋ฌ๋ ํ๋ ์์ํฌ(PyTorch, TensorFlow, ๊ทธ๋ฆฌ๊ณ /๋๋ Flax)๋ฅผ ์ค์นํ ํ ์๋ ๋ช ๋ น์ ์คํํด์ฃผ์ธ์:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->pip install -e <span class="hljs-string">".[quality]"</span><!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-p5x0ul">๋๋ถ๋ถ์ ๊ฒฝ์ฐ ์ด๊ฒ์ผ๋ก ์ถฉ๋ถํ ๊ฒ์ ๋๋ค.</p></li> <li><p data-svelte-h="svelte-detw1v">๋ธ๋์น์์ ๊ธฐ๋ฅ์ ๊ฐ๋ฐํ์ธ์.</p> <p data-svelte-h="svelte-xe2xsb">์ฝ๋๋ฅผ ์์ ํ๋ ๋์ ํ ์คํธ ์ค์ํธ(test suite)๊ฐ ํต๊ณผํ๋์ง ํ์ธํ์ธ์. ๋ค์๊ณผ ๊ฐ์ด ๋ณ๊ฒฝ ์ฌํญ์ ์ํฅ์ ๋ฐ๋ ํ ์คํธ๋ฅผ ์คํํ์ธ์:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->pytest tests/<TEST_TO_RUN>.py<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-182lj2q">ํ ์คํธ์ ๋ํ ๋ ๋ง์ ์ ๋ณด๋ <a href="https://huggingface.co/docs/transformers/testing" rel="nofollow">ํ ์คํธ</a> ๊ฐ์ด๋๋ฅผ ํ์ธํ์ธ์.</p> <p data-svelte-h="svelte-1swfi9c">๐ค Transformers๋ <code>black</code>๊ณผ <code>ruff</code>๋ฅผ ์ฌ์ฉํ์ฌ ์์ค ์ฝ๋์ ํ์์ ์ผ๊ด๋๊ฒ ์ ์งํฉ๋๋ค. ๋ณ๊ฒฝ ์ฌํญ์ ์ ์ฉํ ํ์๋ ๋ค์ ๋ช ๋ น์ผ๋ก ์๋์ผ๋ก ์คํ์ผ ๊ต์ ๋ฐ ์ฝ๋ ๊ฒ์ฆ์ ์ํํ์ธ์:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->make fixup<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-uc4x2u">์ด๊ฒ์ ๋ํ ์์ ์ค์ธ PR์์ ์์ ํ ํ์ผ์์๋ง ์๋ํ๋๋ก ์ต์ ํ๋์ด ์์ต๋๋ค.</p> <p data-svelte-h="svelte-w9jov3">๊ฒ์ฌ๋ฅผ ํ๋์ฉ ์คํํ๋ ค๋ ๊ฒฝ์ฐ, ๋ค์ ๋ช ๋ น์ผ๋ก ์คํ์ผ ๊ต์ ์ ์ ์ฉํ ์ ์์ต๋๋ค:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->make style<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1mgfm7c">๐ค Transformers๋ ๋ํ <code>ruff</code>์ ๋ช ๊ฐ์ง ์ฌ์ฉ์ ์ ์ ์คํฌ๋ฆฝํธ๋ฅผ ์ฌ์ฉํ์ฌ ์ฝ๋ฉ ์ค์๋ฅผ ํ์ธํฉ๋๋ค. CI๋ฅผ ํตํด ํ์ง ๊ด๋ฆฌ๊ฐ ์ํ๋์ง๋ง, ๋ค์ ๋ช ๋ น์ผ๋ก ๋์ผํ ๊ฒ์ฌ๋ฅผ ์คํํ ์ ์์ต๋๋ค:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->make quality<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1ynt3s3">๋ง์ง๋ง์ผ๋ก, ์ ๋ชจ๋ธ์ ์ถ๊ฐํ ๋ ์ผ๋ถ ํ์ผ์ ์ ๋ฐ์ดํธํ๋ ๊ฒ์ ์์ง ์๋๋ก ํ๊ธฐ ์ํ ๋ง์ ์คํฌ๋ฆฝํธ๊ฐ ์์ต๋๋ค. ๋ค์ ๋ช ๋ น์ผ๋ก ์ด๋ฌํ ์คํฌ๋ฆฝํธ๋ฅผ ์คํํ ์ ์์ต๋๋ค:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->make repo-consistency<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1cucblh">์ด๋ฌํ ๊ฒ์ฌ์ ๋ํด ์์ธํ ์์๋ณด๊ณ ๊ด๋ จ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ๋ฐฉ๋ฒ์ <a href="https://huggingface.co/docs/transformers/pr_checks" rel="nofollow">Pull Request์ ๋ํ ๊ฒ์ฌ</a> ๊ฐ์ด๋๋ฅผ ํ์ธํ์ธ์.</p> <p data-svelte-h="svelte-jzjjj7">๋ง์ฝ <code>docs/source</code> ๋๋ ํฐ๋ฆฌ ์๋์ ๋ฌธ์๋ฅผ ์์ ํ๋ ๊ฒฝ์ฐ, ๋ฌธ์๊ฐ ๋น๋๋ ์ ์๋์ง ํ์ธํ์ธ์. ์ด ๊ฒ์ฌ๋ Pull Request๋ฅผ ์ด ๋๋ CI์์ ์คํ๋ฉ๋๋ค. ๋ก์ปฌ ๊ฒ์ฌ๋ฅผ ์คํํ๋ ค๋ฉด ๋ฌธ์ ๋น๋๋ฅผ ์ค์นํด์ผ ํฉ๋๋ค:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->pip install <span class="hljs-string">".[docs]"</span><!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1cyowt">์ ์ฅ์์ ๋ฃจํธ ๋๋ ํฐ๋ฆฌ์์ ๋ค์ ๋ช ๋ น์ ์คํํ์ธ์:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->doc-builder build transformers docs/source/en --build_dir ~/tmp/test-build<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-50jszl">์ด ๋ช ๋ น์ <code>~/tmp/test-build</code> ํด๋์ ๋ฌธ์๋ฅผ ๋น๋ํ๋ฉฐ, ์์ฑ๋ Markdown ํ์ผ์ ์ ํธํ๋ ํธ์ง๊ธฐ๋ก ํ์ธํ ์ ์์ต๋๋ค. Pull Request๋ฅผ ์ด ๋ GitHub์์ ๋ฌธ์๋ฅผ ๋ฏธ๋ฆฌ ๋ณผ ์๋ ์์ต๋๋ค.</p> <p data-svelte-h="svelte-fdlcpn">๋ณ๊ฒฝ ์ฌํญ์ ๋ง์กฑํ๋ฉด <code>git add</code>๋ก ๋ณ๊ฒฝ๋ ํ์ผ์ ์ถ๊ฐํ๊ณ , <code>git commit</code>์ผ๋ก ๋ณ๊ฒฝ ์ฌํญ์ ๋ก์ปฌ์ ๊ธฐ๋กํ์ธ์:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->git add modified_file.py | |
| git commit<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-xjjr8c"><a href="https://chris.beams.io/posts/git-commit/" rel="nofollow">์ข์ ์ปค๋ฐ ๋ฉ์์ง</a>๋ฅผ ์์ฑํ์ฌ ๋ณ๊ฒฝ ์ฌํญ์ ๋ช ํํ๊ฒ ์ ๋ฌํ์ธ์!</p> <p data-svelte-h="svelte-1u6pjv4">๋ณ๊ฒฝ ์ฌํญ์ ํ๋ก์ ํธ ์๋ณธ ์ ์ฅ์์ ๋๊ธฐํํ๋ ค๋ฉด, PR์ <em>์ด๊ธฐ ์ ์</em> ๋ธ๋์น๋ฅผ <code>upstream/branch</code>๋ก ๋ฆฌ๋ฒ ์ด์ค(rebase)ํ์ธ์. ๋๋ ๊ด๋ฆฌ์์ ์์ฒญ์ ์ด ์์ ์ด ํ์ํ ์ ์์ต๋๋ค:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->git fetch upstream | |
| git rebase upstream/main<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-tq7ups">๋ณ๊ฒฝ ์ฌํญ์ ๋ธ๋์น์ ํธ์ํ์ธ์:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->git push -u origin a-descriptive-name-for-my-changes<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-18jf7v9">์ด๋ฏธ PR์ ์ด์๋ค๋ฉด, <code>--force</code> ํ๋๊ทธ์ ํจ๊ป ๊ฐ์ ํธ์ํด์ผ ํฉ๋๋ค. ์์ง PR์ด ์ด๋ฆฌ์ง ์์๋ค๋ฉด ์ ์์ ์ผ๋ก ๋ณ๊ฒฝ ์ฌํญ์ ํธ์ํ๋ฉด ๋ฉ๋๋ค.</p></li> <li data-svelte-h="svelte-idnekh"><p>์ด์ GitHub์์ ํฌํฌํ ์ ์ฅ์๋ก ์ด๋ํ๊ณ <strong>Pull request(ํ ๋ฆฌํ์คํธ)</strong>๋ฅผ ํด๋ฆญํ์ฌ Pull Request๋ฅผ ์ด ์ ์์ต๋๋ค. ์๋์ <a href="https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md/#pull-request-checklist" rel="nofollow">์ฒดํฌ๋ฆฌ์คํธ</a>์์ ๋ชจ๋ ํญ๋ชฉ์ ์ฒดํฌ ํ์๋ฅผ ํ์ธ์. ์ค๋น๊ฐ ์๋ฃ๋๋ฉด ํ๋ก์ ํธ ๊ด๋ฆฌ์์๊ฒ ๋ณ๊ฒฝ ์ฌํญ์ ๋ณด๋ด ๊ฒํ ๋ฅผ ์์ฒญํ ์ ์์ต๋๋ค.</p></li> <li data-svelte-h="svelte-18cwrwv"><p>๊ด๋ฆฌ์๊ฐ ๋ณ๊ฒฝ ์ฌํญ์ ์์ฒญํด๋ ๊ด์ฐฎ์ต๋๋ค. ํต์ฌ ๊ธฐ์ฌ์๋ค๋ ๋์ผํ ์ํฉ์ ๊ฒช์ต๋๋ค! ๋ชจ๋๊ฐ ๋ณ๊ฒฝ ์ฌํญ์ Pull Request์์ ๋ณผ ์ ์๋๋ก, ๋ก์ปฌ ๋ธ๋์น์์ ์์ ํ๊ณ ๋ณ๊ฒฝ ์ฌํญ์ ํฌํฌํ ์ ์ฅ์๋ก ํธ์ํ์ธ์. ๊ทธ๋ฌ๋ฉด ๋ณ๊ฒฝ ์ฌํญ์ด ์๋์ผ๋ก Pull Request์ ๋ํ๋ฉ๋๋ค.</p></li></ol> <h3 class="relative group"><a id="pull-request-checklist" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#pull-request-checklist"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Pull Request ์ฒดํฌ๋ฆฌ์คํธ</span></h3> <p data-svelte-h="svelte-1mad6v6">โ Pull Request ์ ๋ชฉ์ ๊ธฐ์ฌ ๋ด์ฉ์ ์์ฝํด์ผ ํฉ๋๋ค.<br> | |
| โ Pull Request๊ฐ ์ด์๋ฅผ ํด๊ฒฐํ๋ ๊ฒฝ์ฐ, Pull Request ์ค๋ช ์ ์ด์ ๋ฒํธ๋ฅผ ์ธ๊ธํ์ฌ ์ฐ๊ด๋์ด ์์์ ์๋ ค์ฃผ์ธ์. (์ด์๋ฅผ ํ์ธํ๋ ์ฌ๋๋ค์ด ํด๋น ์ด์์ ๋ํ ์์ ์ด ์งํ ์ค์์ ์ ์ ์๊ฒ ํฉ๋๋ค).<br> | |
| โ ์์ ์ด ์งํ์ค์ด๋ผ๋ฉด ์ ๋ชฉ ์์ <code>[WIP]</code>๋ฅผ ๋ถ์ฌ์ฃผ์ธ์. ์ค๋ณต ์์ ์ ํผํ๊ณ ๋ณํฉํ ์ค๋น๊ฐ ๋ PR๊ณผ ๊ตฌ๋ถํ๊ธฐ์ ์ ์ฉํฉ๋๋ค.<br> | |
| โ ๊ธฐ์กด ํ ์คํธ๋ฅผ ํต๊ณผํ๋์ง ํ์ธํ์ธ์.<br> | |
| โ ์๋ก์ด ๊ธฐ๋ฅ์ ์ถ๊ฐํ๋ ๊ฒฝ์ฐ, ํด๋น ๊ธฐ๋ฅ์ ๋ํ ํ ์คํธ๋ ์ถ๊ฐํ์ธ์.<br></p> <ul data-svelte-h="svelte-huufqk"><li>์ ๋ชจ๋ธ์ ์ถ๊ฐํ๋ ๊ฒฝ์ฐ, <code>ModelTester.all_model_classes = (MyModel, MyModelWithLMHead,...)</code>์ ์ฌ์ฉํ์ฌ ์ผ๋ฐ์ ์ธ ํ ์คํธ๋ฅผ ํ์ฑํํ์ธ์.</li> <li>์ <code>@slow</code> ํ ์คํธ๋ฅผ ์ถ๊ฐํ๋ ๊ฒฝ์ฐ, ๋ค์ ๋ช ๋ น์ผ๋ก ํ ์คํธ๋ฅผ ํต๊ณผํ๋์ง ํ์ธํ์ธ์: <code>RUN_SLOW=1 python -m pytest tests/models/my_new_model/test_my_new_model.py</code>.</li> <li>์ ํ ํฌ๋์ด์ ๋ฅผ ์ถ๊ฐํ๋ ๊ฒฝ์ฐ, ํ ์คํธ๋ฅผ ์์ฑํ๊ณ ๋ค์ ๋ช ๋ น์ผ๋ก ํ ์คํธ๋ฅผ ํต๊ณผํ๋์ง ํ์ธํ์ธ์: <code>RUN_SLOW=1 python -m pytest tests/models/{your_model_name}/test_tokenization_{your_model_name}.py</code>.</li> <li>CircleCI์์๋ ๋๋ฆฐ ํ ์คํธ๋ฅผ ์คํํ์ง ์์ง๋ง, GitHub Actions์์๋ ๋งค์ผ ๋ฐค ์คํ๋ฉ๋๋ค!<br></li></ul> <p data-svelte-h="svelte-lquk2n">โ ๋ชจ๋ ๊ณต๊ฐ ๋ฉ์๋๋ ์ ์ฉํ ๊ธฐ์ ๋ฌธ์๋ฅผ ๊ฐ์ ธ์ผ ํฉ๋๋ค (์๋ฅผ ๋ค์ด <a href="https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py" rel="nofollow"><code>modeling_bert.py</code></a> ์ฐธ์กฐ).<br> | |
| โ ์ ์ฅ์๊ฐ ๋น ๋ฅด๊ฒ ์ฑ์ฅํ๊ณ ์์ผ๋ฏ๋ก ์ ์ฅ์์ ์๋นํ ๋ถ๋ด์ ์ฃผ๋ ์ด๋ฏธ์ง, ๋์์ ๋ฐ ๊ธฐํ ํ ์คํธ๊ฐ ์๋ ํ์ผ์ ์ถ๊ฐํ์ง ๋ง์ธ์. ๋์ <a href="https://huggingface.co/hf-internal-testing" rel="nofollow"><code>hf-internal-testing</code></a>๊ณผ ๊ฐ์ Hub ์ ์ฅ์๋ฅผ ์ฌ์ฉํ์ฌ ์ด๋ฌํ ํ์ผ์ ํธ์คํ ํ๊ณ URL๋ก ์ฐธ์กฐํ์ธ์. ๋ฌธ์์ ๊ด๋ จ๋ ์ด๋ฏธ์ง๋ ๋ค์ ์ ์ฅ์์ ๋ฐฐ์นํ๋ ๊ฒ์ ๊ถ์ฅํฉ๋๋ค: <a href="https://huggingface.co/datasets/huggingface/documentation-images" rel="nofollow">huggingface/documentation-images</a>. ์ด ๋ฐ์ดํฐ์ ์ ์ฅ์์์ PR์ ์ด์ด์ Hugging Face ๋ฉค๋ฒ์๊ฒ ๋ณํฉ์ ์์ฒญํ ์ ์์ต๋๋ค.</p> <p data-svelte-h="svelte-1npzyix">Pull Request์์ ์คํ๋๋ ๊ฒ์ฌ์ ๋ํ ์์ธํ ์ ๋ณด๋ <a href="https://huggingface.co/docs/transformers/pr_checks" rel="nofollow">Pull Request์ ๋ํ ๊ฒ์ฌ</a> ๊ฐ์ด๋๋ฅผ ํ์ธํ์ธ์.</p> <h3 class="relative group"><a id="tests" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#tests"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>ํ ์คํธ</span></h3> <p data-svelte-h="svelte-jcz2od">๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋์๊ณผ ์ฌ๋ฌ ์์ ๋ฅผ ํ ์คํธํ ์ ์๋ ๊ด๋ฒ์ํ ํ ์คํธ ์ค์ํธ๊ฐ ํฌํจ๋์ด ์์ต๋๋ค. ๋ผ์ด๋ธ๋ฌ๋ฆฌ ํ ์คํธ๋ <a href="https://github.com/huggingface/transformers/tree/main/tests" rel="nofollow">tests</a> ํด๋์, ์์ ํ ์คํธ๋ <a href="https://github.com/huggingface/transformers/tree/main/examples" rel="nofollow">examples</a> ํด๋์ ์์ต๋๋ค.</p> <p data-svelte-h="svelte-1aa6hxe">์๋๊ฐ ๋น ๋ฅธ <code>pytest</code>์ <code>pytest-xdist</code>๋ฅผ ์ ํธํฉ๋๋ค. ์ ์ฅ์์ ๋ฃจํธ ๋๋ ํฐ๋ฆฌ์์ ํ ์คํธ๋ฅผ ์คํํ <em>ํ์ ํด๋ ๊ฒฝ๋ก ๋๋ ํ ์คํธ ํ์ผ ๊ฒฝ๋ก</em>๋ฅผ ์ง์ ํ์ธ์:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->python -m pytest -n auto --dist=loadfile -s -v ./tests/models/my_new_model<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-2pk95t">๋ง์ฐฌ๊ฐ์ง๋ก <code>examples</code> ๋๋ ํฐ๋ฆฌ์์๋ <em>ํ์ ํด๋ ๊ฒฝ๋ก ๋๋ ํ ์คํธ ํ์ผ ๊ฒฝ๋ก</em>๋ฅผ ์ง์ ํ์ธ์. ์๋ฅผ ๋ค์ด, ๋ค์ ๋ช ๋ น์ PyTorch <code>examples</code> ๋๋ ํฐ๋ฆฌ์ ํ ์คํธ ๋ถ๋ฅ ํ์ ํด๋๋ฅผ ํ ์คํธํฉ๋๋ค:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->pip install -r examples/xxx/requirements.txt <span class="hljs-comment"># only needed the first time</span> | |
| python -m pytest -n auto --dist=loadfile -s -v ./examples/pytorch/text-classification<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-xeqcgf">์ด๊ฒ์ด ์ค์ ๋ก <code>make test</code> ๋ฐ <code>make test-examples</code> ๋ช ๋ น์ด ๊ตฌํ๋๋ ๋ฐฉ์์ ๋๋ค (<code>pip install</code>์ ์ ์ธํฉ๋๋ค)!</p> <p data-svelte-h="svelte-1jyi2m8">๋ํ ํน์ ๊ธฐ๋ฅ๋ง ํ ์คํธํ๊ธฐ ์ํ ๋ ์์ ํ ์คํธ๋ฅผ ์ง์ ํ ์ ์์ต๋๋ค.</p> <p data-svelte-h="svelte-1upxk5e">๊ธฐ๋ณธ์ ์ผ๋ก ๋๋ฆฐ ํ ์คํธ๋ ๊ฑด๋๋ฐ์ง๋ง <code>RUN_SLOW</code> ํ๊ฒฝ ๋ณ์๋ฅผ <code>yes</code>๋ก ์ค์ ํ์ฌ ์คํํ ์ ์์ต๋๋ค. ์ด๋ ๊ฒ ํ๋ฉด ๋ง์ ๊ธฐ๊ฐ๋ฐ์ดํธ ๋จ์์ ๋ชจ๋ธ์ด ๋ค์ด๋ก๋๋๋ฏ๋ก ์ถฉ๋ถํ ๋์คํฌ ๊ณต๊ฐ, ์ข์ ์ธํฐ๋ท ์ฐ๊ฒฐ๊ณผ ๋ง์ ์ธ๋ด๊ฐ ํ์ํฉ๋๋ค!</p> <div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400"><p data-svelte-h="svelte-1brniq5">ํ ์คํธ๋ฅผ ์คํํ๋ ค๋ฉด <em>ํ์ ํด๋ ๊ฒฝ๋ก ๋๋ ํ ์คํธ ํ์ผ ๊ฒฝ๋ก</em>๋ฅผ ์ง์ ํ์ธ์. ๊ทธ๋ ์ง ์์ผ๋ฉด <code>tests</code> ๋๋ <code>examples</code> ํด๋์ ๋ชจ๋ ํ ์คํธ๋ฅผ ์คํํ๊ฒ ๋์ด ๋งค์ฐ ๊ธด ์๊ฐ์ด ๊ฑธ๋ฆฝ๋๋ค!</p></div> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->RUN_SLOW=<span class="hljs-built_in">yes</span> python -m pytest -n auto --dist=loadfile -s -v ./tests/models/my_new_model | |
| RUN_SLOW=<span class="hljs-built_in">yes</span> python -m pytest -n auto --dist=loadfile -s -v ./examples/pytorch/text-classification<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-3y2r9a">๋๋ฆฐ ํ ์คํธ์ ๋ง์ฐฌ๊ฐ์ง๋ก, ๋ค์๊ณผ ๊ฐ์ด ํ ์คํธ ์ค์ ๊ธฐ๋ณธ์ ์ผ๋ก ํ์ฑํ๋์ง ์๋ ๋ค๋ฅธ ํ๊ฒฝ ๋ณ์๋ ์์ต๋๋ค:</p> <ul data-svelte-h="svelte-1pbtz97"><li><code>RUN_CUSTOM_TOKENIZERS</code>: ์ฌ์ฉ์ ์ ์ ํ ํฌ๋์ด์ ํ ์คํธ๋ฅผ ํ์ฑํํฉ๋๋ค.</li> <li><code>RUN_PT_FLAX_CROSS_TESTS</code>: PyTorch + Flax ํตํฉ ํ ์คํธ๋ฅผ ํ์ฑํํฉ๋๋ค.</li> <li><code>RUN_PT_TF_CROSS_TESTS</code>: TensorFlow + PyTorch ํตํฉ ํ ์คํธ๋ฅผ ํ์ฑํํฉ๋๋ค.</li></ul> <p data-svelte-h="svelte-esvq2s">๋ ๋ง์ ํ๊ฒฝ ๋ณ์์ ์ถ๊ฐ ์ ๋ณด๋ <a href="src/transformers/testing_utils.py">testing_utils.py</a>์์ ์ฐพ์ ์ ์์ต๋๋ค.</p> <p data-svelte-h="svelte-nwuoi3">๐ค Transformers๋ ํ ์คํธ ์คํ๊ธฐ๋ก <code>pytest</code>๋ฅผ ์ฌ์ฉํฉ๋๋ค. ๊ทธ๋ฌ๋ ํ ์คํธ ์ค์ํธ ์์ฒด์์๋ <code>pytest</code> ๊ด๋ จ ๊ธฐ๋ฅ์ ์ฌ์ฉํ์ง ์์ต๋๋ค.</p> <p data-svelte-h="svelte-yg9w17">์ด๊ฒ์ <code>unittest</code>๊ฐ ์์ ํ ์ง์๋๋ค๋ ๊ฒ์ ์๋ฏธํฉ๋๋ค. ๋ค์์ <code>unittest</code>๋ก ํ ์คํธ๋ฅผ ์คํํ๋ ๋ฐฉ๋ฒ์ ๋๋ค:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->python -m unittest discover -s tests -t . -v | |
| python -m unittest discover -s examples -t examples -v<!-- HTML_TAG_END --></pre></div> <h3 class="relative group"><a id="style-guide" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#style-guide"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>์คํ์ผ ๊ฐ์ด๋</span></h3> <p data-svelte-h="svelte-a56hb0">๋ฌธ์๋ <a href="https://google.github.io/styleguide/pyguide.html" rel="nofollow">Google Python ์คํ์ผ ๊ฐ์ด๋</a>๋ฅผ ๋ฐ๋ฆ ๋๋ค. ์์ธํ ์ ๋ณด๋ <a href="https://github.com/huggingface/transformers/tree/main/docs#writing-documentation---specification" rel="nofollow">๋ฌธ์ ์์ฑ ๊ฐ์ด๋</a>๋ฅผ ํ์ธํ์ธ์.</p> <h3 class="relative group"><a id="develop-on-windows" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#develop-on-windows"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Windows์์ ๊ฐ๋ฐ</span></h3> <p data-svelte-h="svelte-dnp3wx">Windows์์ ๊ฐ๋ฐํ ๊ฒฝ์ฐ(<a href="https://learn.microsoft.com/en-us/windows/wsl/" rel="nofollow">Windows Subsystem for Linux</a> ๋๋ WSL์์ ์์ ํ์ง ์๋ ํ) Windows <code>CRLF</code> ์ค ๋ฐ๊ฟ์ Linux <code>LF</code> ์ค ๋ฐ๊ฟ์ผ๋ก ๋ณํํ๋๋ก git์ ๊ตฌ์ฑํด์ผ ํฉ๋๋ค:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->git config core.autocrlf input<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-8ti9y0">Windows์์ <code>make</code> ๋ช ๋ น์ ์คํํ๋ ํ ๊ฐ์ง ๋ฐฉ๋ฒ์ MSYS2๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ ๋๋ค:</p> <ol data-svelte-h="svelte-zho97"><li><a href="https://www.msys2.org/" rel="nofollow">MSYS2</a>๋ฅผ ๋ค์ด๋ก๋ํฉ๋๋ค. <code>C:\msys64</code>์ ์ค์น๋์๋ค๊ณ ๊ฐ์ ํฉ๋๋ค.</li> <li>CLI์์ <code>C:\msys64\msys2.exe</code>๋ฅผ ์ฝ๋๋ค (์์ ๋ฉ๋ด์์ ์ฌ์ฉ ๊ฐ๋ฅํด์ผ ํจ).</li> <li>์์์ ๋ค์์ ์คํํ์ฌ: <code>pacman -Syu</code> ๋ฐ <code>pacman -S make</code>๋ก <code>make</code>๋ฅผ ์ค์นํฉ๋๋ค.</li> <li>ํ๊ฒฝ ๋ณ์ PATH์ <code>C:\msys64\usr\bin</code>์ ์ถ๊ฐํ์ธ์.</li></ol> <p data-svelte-h="svelte-1th9dyw">์ด์ ๋ชจ๋ ํฐ๋ฏธ๋ (PowerShell, cmd.exe ๋ฑ)์์ <code>make</code>๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค! ๐</p> <h3 class="relative group"><a id="sync-a-forked-repository-with-upstream-main-the-hugging-face-repository" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#sync-a-forked-repository-with-upstream-main-the-hugging-face-repository"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>ํฌํฌํ ์ ์ฅ์๋ฅผ ์์ ์๋ณธ ๋ธ๋์น(main)๊ณผ ๋๊ธฐํํ๊ธฐ (Hugging Face ์ ์ฅ์)</span></h3> <p data-svelte-h="svelte-1iwfgdm">ํฌํฌํ ์ ์ฅ์์ main ๋ธ๋์น๋ฅผ ์ ๋ฐ์ดํธํ ๋, ๋ค์ ๋จ๊ณ๋ฅผ ๋ฐ๋ผ ์ํํด์ฃผ์ธ์. ์ด๋ ๊ฒ ํ๋ฉด ๊ฐ upstream PR์ ์ฐธ์กฐ ๋ ธํธ๊ฐ ์ถ๊ฐ๋๋ ๊ฒ์ ํผํ๊ณ ์ด๋ฌํ PR์ ๊ด์ฌํ๋ ๊ฐ๋ฐ์๋ค์๊ฒ ๋ถํ์ํ ์๋ฆผ์ด ์ ์ก๋๋ ๊ฒ์ ๋ฐฉ์งํ ์ ์์ต๋๋ค.</p> <ol><li data-svelte-h="svelte-ied2pz"><p>๊ฐ๋ฅํ๋ฉด ํฌํฌ๋ ์ ์ฅ์์ ๋ธ๋์น ๋ฐ PR์ ์ฌ์ฉํ์ฌ upstream๊ณผ ๋๊ธฐํํ์ง ๋ง์ธ์. ๋์ ํฌํฌ๋ main ์ ์ฅ์์ ์ง์ ๋ณํฉํ์ธ์.</p></li> <li><p data-svelte-h="svelte-1wexaj7">PR์ด ๋ฐ๋์ ํ์ํ ๊ฒฝ์ฐ, ๋ธ๋์น๋ฅผ ํ์ธํ ํ ๋ค์ ๋จ๊ณ๋ฅผ ์ฌ์ฉํ์ธ์:</p> <div class="code-block relative"><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->git checkout -b your-branch-for-syncing | |
| git pull --squash --no-commit upstream main | |
| git commit -m <span class="hljs-string">'<your message without GitHub references>'</span> | |
| git push --set-upstream origin your-branch-for-syncing<!-- HTML_TAG_END --></pre></div></li></ol> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/transformers/blob/main/docs/source/ko/contributing.md" target="_blank"><span data-svelte-h="svelte-1kd6by1"><</span> <span data-svelte-h="svelte-x0xyl0">></span> <span data-svelte-h="svelte-1dajgef"><span class="underline ml-1.5">Update</span> on GitHub</span></a> <p></p> | |
| <script> | |
| { | |
| __sveltekit_1hrx8 = { | |
| assets: "/docs/transformers/main/ko", | |
| base: "/docs/transformers/main/ko", | |
| env: {} | |
| }; | |
| const element = document.currentScript.parentElement; | |
| const data = [null,null]; | |
| Promise.all([ | |
| import("/docs/transformers/main/ko/_app/immutable/entry/start.9aa88961.js"), | |
| import("/docs/transformers/main/ko/_app/immutable/entry/app.84fb67c3.js") | |
| ]).then(([kit, app]) => { | |
| kit.start(app, element, { | |
| node_ids: [0, 11], | |
| data, | |
| form: null, | |
| error: null | |
| }); | |
| }); | |
| } | |
| </script> | |
Xet Storage Details
- Size:
- 75.3 kB
- Xet hash:
- 16ffd22f221e3e763cc6653521227a81cc28b3c4b53b84fe2a77fbd96f1ff836
ยท
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.