Skip to content

Commit 8073b9e

Browse files
committed
Site updated: 2025-09-03 00:40:46
1 parent e7efcad commit 8073b9e

File tree

5 files changed

+19
-16
lines changed

5 files changed

+19
-16
lines changed

2025/06/10/A0-onboarding/first.jpg

62.9 KB
Loading

2025/06/10/A0-onboarding/index.html

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,23 @@
2020
var CONFIG = {"hostname":"njudeepengine.github.io","root":"/LLM-Blog/","scheme":"Pisces","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
2121
</script>
2222

23-
<meta name="description" content="本作业旨在帮助你熟悉编程环境、提交流程以及基本的 PyTorch 编程。通过完成它,你将确保开发环境配置正确,理解如何提交未来的作业,并加强 PyTorch 编程技能。 Environment SetupOption 1: Local Setup Python: 3.10 或更高版本 Packages: 推荐通过以下命令安装所有必要的依赖项: 1pip install -r requirem">
23+
<meta name="description" content="本作业旨在帮助你熟悉编程环境、提交流程以及基本的 PyTorch 编程。通过完成它,你将确保开发环境配置正确,理解如何提交未来的作业,并加强 PyTorch 编程技能。注意,作业通过 github classroom 发布,创建仓库的链接会在群公告中发布,请注意选择自己的学号加入 classroom,否则会影响成绩统计,如果没有出现你的学号,请联系助教。 Environment SetupOpti">
2424
<meta property="og:type" content="article">
2525
<meta property="og:title" content="A0 Onboarding">
2626
<meta property="og:url" content="https://njudeepengine.github.io/2025/06/10/A0-onboarding/index.html">
2727
<meta property="og:site_name" content="LLM-Assignment-Doc">
28-
<meta property="og:description" content="本作业旨在帮助你熟悉编程环境、提交流程以及基本的 PyTorch 编程。通过完成它,你将确保开发环境配置正确,理解如何提交未来的作业,并加强 PyTorch 编程技能。 Environment SetupOption 1: Local Setup Python: 3.10 或更高版本 Packages: 推荐通过以下命令安装所有必要的依赖项: 1pip install -r requirem">
28+
<meta property="og:description" content="本作业旨在帮助你熟悉编程环境、提交流程以及基本的 PyTorch 编程。通过完成它,你将确保开发环境配置正确,理解如何提交未来的作业,并加强 PyTorch 编程技能。注意,作业通过 github classroom 发布,创建仓库的链接会在群公告中发布,请注意选择自己的学号加入 classroom,否则会影响成绩统计,如果没有出现你的学号,请联系助教。 Environment SetupOpti">
2929
<meta property="og:locale" content="zh_CN">
30+
<meta property="og:image" content="https://github.com/user-attachments/assets/10b56a7c-0770-4cb8-95c2-8799966b8a08">
31+
<meta property="og:image" content="https://njudeepengine.github.io/2025/06/10/A0-onboarding/first.jpg">
32+
<meta property="og:image" content="https://github.com/user-attachments/assets/85a65574-b0c1-46df-9f57-d279a545f636">
33+
<meta property="og:image" content="https://njudeepengine.github.io/2025/06/10/A0-onboarding/second.jpg">
3034
<meta property="article:published_time" content="2025-06-10T08:54:20.000Z">
31-
<meta property="article:modified_time" content="2025-06-29T13:51:36.393Z">
35+
<meta property="article:modified_time" content="2025-09-02T16:39:13.893Z">
3236
<meta property="article:author" content="DeepEngine">
3337
<meta property="article:tag" content="Environment">
3438
<meta name="twitter:card" content="summary">
39+
<meta name="twitter:image" content="https://github.com/user-attachments/assets/10b56a7c-0770-4cb8-95c2-8799966b8a08">
3540

3641
<link rel="canonical" href="https://njudeepengine.github.io/2025/06/10/A0-onboarding/">
3742

@@ -186,7 +191,7 @@ <h1 class="post-title" itemprop="name headline">
186191
<i class="far fa-calendar-check"></i>
187192
</span>
188193
<span class="post-meta-item-text">更新于</span>
189-
<time title="修改时间:2025-06-29 21:51:36" itemprop="dateModified" datetime="2025-06-29T21:51:36+08:00">2025-06-29</time>
194+
<time title="修改时间:2025-09-03 00:39:13" itemprop="dateModified" datetime="2025-09-03T00:39:13+08:00">2025-09-03</time>
190195
</span>
191196
<span class="post-meta-item">
192197
<span class="post-meta-item-icon">
@@ -209,7 +214,7 @@ <h1 class="post-title" itemprop="name headline">
209214
<div class="post-body" itemprop="articleBody">
210215

211216

212-
<p>本作业旨在帮助你熟悉编程环境、提交流程以及基本的 PyTorch 编程。通过完成它,你将确保开发环境配置正确,理解如何提交未来的作业,并加强 PyTorch 编程技能。</p>
217+
<p>本作业旨在帮助你熟悉编程环境、提交流程以及基本的 PyTorch 编程。通过完成它,你将确保开发环境配置正确,理解如何提交未来的作业,并加强 PyTorch 编程技能。注意,作业<strong>通过 github classroom 发布</strong>,创建仓库的链接会在群公告中发布,请注意选择自己的学号加入 classroom,否则会影响成绩统计,如果没有出现你的学号,请联系助教。</p>
213218
<h1 id="Environment-Setup"><a href="#Environment-Setup" class="headerlink" title="Environment Setup"></a>Environment Setup</h1><h2 id="Option-1-Local-Setup"><a href="#Option-1-Local-Setup" class="headerlink" title="Option 1: Local Setup"></a>Option 1: Local Setup</h2><ul>
214219
<li><strong>Python</strong>: 3.10 或更高版本 </li>
215220
<li><strong>Packages</strong>: 推荐通过以下命令安装所有必要的依赖项: <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pip install -r requirements.txt</span><br></pre></td></tr></table></figure></li>
@@ -219,7 +224,6 @@ <h1 id="Environment-Setup"><a href="#Environment-Setup" class="headerlink" title
219224
<p><strong>注意</strong>:不同作业的 requirements.txt 可能略有差异</p>
220225
</div>
221226
<h2 id="Option-2-Docker-Setup"><a href="#Option-2-Docker-Setup" class="headerlink" title="Option 2: Docker Setup"></a>Option 2: Docker Setup</h2><p>强烈建议使用来自 <a target="_blank" rel="noopener" href="https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/index.html">Nvidia PyTorch Release</a> 的 Docker 镜像(例如 <a target="_blank" rel="noopener" href="https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-23-10.html#rel-23-10">23.10</a> 或更新的版本)作为基础环境,以避免依赖冲突。</p>
222-
<p>TODO: 完善</p>
223227
<h1 id="Code-and-Debug"><a href="#Code-and-Debug" class="headerlink" title="Code and Debug"></a>Code and Debug</h1><h2 id="Coding"><a href="#Coding" class="headerlink" title="Coding"></a>Coding</h2><p>所有完成 Tasks 所需的文件都位于 <code>src/</code> 目录下,该目录是<strong>唯一</strong>会被作为 Python 模块导入的目录。因此,你需要注意以下几点:</p>
224228
<ul>
225229
<li><code>__init__.py</code> 文件对于 Python 模块来说是必不可少的,我们已经在 <code>src/</code> 中为你初始化好了所有必要的 <code>__init__.py</code> 文件,因此如果你出于个人目的需要修改它们,请务必小心。</li>
@@ -304,8 +308,8 @@ <h3 id="Naive-Debug-Mode"><a href="#Naive-Debug-Mode" class="headerlink" title="
304308
</ul>
305309
<h3 id="Deep-Debug-Mode"><a href="#Deep-Debug-Mode" class="headerlink" title="Deep Debug Mode"></a>Deep Debug Mode</h3><ul>
306310
<li>根据 <code>test_toy.py</code>,我们提供了另一个测试文件 <code>test_with_ref.py</code>,其中会导入一个闭源的参考包 ref(结构与 src 相同,例如 <code>from ref import ...</code><code>from ref.modeling import ...</code>)。因此,你可以在基础的 toy 测试之外,自行创建测试用例,并与参考实现进行比较。</li>
307-
<li>在我们提供的 <code>a&#123;x&#125;_env_v&#123;y&#125;.tar</code>(基于 NGC PyTorch)或 <code>a&#123;x&#125;_env_light_v&#123;y&#125;.tar</code>(基于 Ubuntu)的 Docker 镜像 tar 文件中,已传到到 NJU Box,你可以将任意一个下载到你的环境中使用</li>
308-
<li>然后按照下面的示例命令一步一步操作:<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># step0. assumming that the tar file &quot;a&#123;x&#125;_env_light_v&#123;y&#125;.tar&quot; is already downloaded into your private repo</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># step1. run the given script to load the docker image (default the light one) and execute the container</span></span><br><span class="line">bash run_docker.sh <span class="comment"># or maybe you need run it with sudo</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># step2. get into the repo path mounted into the container</span></span><br><span class="line"><span class="built_in">cd</span> a&#123;x&#125;_repo</span><br><span class="line"></span><br><span class="line"><span class="comment"># step3. run the test_with_ref.py</span></span><br><span class="line">pytest test_with_ref.py</span><br></pre></td></tr></table></figure></li>
311+
<li>我们提供<code>a_env_light_v&#123;y&#125;.tar</code>(基于 Ubuntu)的 Docker 镜像 tar 文件,已传到到 NJU Box(链接会在群公告中展示),你可以下载到你的环境中使用</li>
312+
<li>然后按照下面的示例命令一步一步操作:<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># step0. assumming that the tar file &quot;a_env_light_v&#123;y&#125;.tar&quot; is already downloaded into your private repo</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># step1. run the given script to load the docker image (default the light one) and execute the container</span></span><br><span class="line">bash run_docker.sh <span class="comment"># or maybe you need run it with sudo</span></span><br><span class="line"><span class="comment">#this script assume that your machine has an avaliable nvidia gpu.If not,you should to change the option in it ,and change the fixed device in test_with_ref.py.</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># step2. get into the repo path mounted into the container</span></span><br><span class="line"><span class="built_in">cd</span> a&#123;x&#125;_repo</span><br><span class="line"></span><br><span class="line"><span class="comment"># step3. run the test_with_ref.py</span></span><br><span class="line">pytest test_with_ref.py</span><br></pre></td></tr></table></figure></li>
309313
<li>对于 Windows,如果你已经安装了 Docker,可以从 <code>run_docker.sh</code> 中提取核心的 Docker 命令并自行运行;或者你也可以使用一些技巧,比如 <a target="_blank" rel="noopener" href="https://learn.microsoft.com/en-us/windows/wsl/about">WSL</a><a target="_blank" rel="noopener" href="https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/">DinD</a>,来模拟类 Unix 的环境。</li>
310314
</ul>
311315
<div class="note warning">
@@ -317,7 +321,7 @@ <h1 id="Submission"><a href="#Submission" class="headerlink" title="Submission">
317321
<li>如果你因为一些特殊问题错过了截止时间,请直接联系老师(见 <a href="#Contact">Contact</a>)。</li>
318322
</ul>
319323
<div class="note info">
320-
<p>我们会尽可能频繁地对你的中间提交进行预测试,以用于最终提交的评分参考。<br>每次预测试后,我们<strong>只会提供 score feedback</strong>(见 <a href="#Feedback">Feedback</a> 部分),以便你在 <strong>ddl</strong> 之前改进代码,争取更高的分数。</p>
324+
<p>我们提供了自动测试服务,但需要你在自己的作业仓库中更改一些设置。</p><!-- 1.<img width="1614" height="755" alt="9c1f681e4a1cd64ebdddcffae0db7937" src="https://github.com/user-attachments/assets/10b56a7c-0770-4cb8-95c2-8799966b8a08" /> --><p>首先:</p><p><img src="first.jpg" style="width: 80%; height: auto;"></p><!-- 2.<img width="1024" height="940" alt="f89c15a89e690bf2dfd8f48aae3682ad" src="https://github.com/user-attachments/assets/85a65574-b0c1-46df-9f57-d279a545f636" /> --><p>然后:</p><p><img src="second.jpg" style="width: 80%; height: auto;"></p><p>按照上图操作,对应的 <strong>url 我们会在群公告中给出</strong>,注意查收。完成该操作后,当你进行 <code>git push</code> 时,我们的测试机器会自动完成测试,并创建 <code>score-feedback</code> 分支返回你的分数,这可能会消耗一定时间,随实验难度不确定,请耐心等待,如果出现问题,请寻求助教的帮助。</p><p>每次测试后,我们<strong>会提供 score feedback</strong>(见 <a href="#Feedback">Feedback</a> 部分),以便你在 <strong>ddl</strong> 之前改进代码,争取更高的分数。</p>
321325
</div>
322326
<h1 id="Scoring"><a href="#Scoring" class="headerlink" title="Scoring"></a>Scoring</h1><p>每个作业将根据评分范围 0~100 分进行评定。我们会下载你的代码,并通过运行 <code>test_script.sh</code> 脚本来执行 <code>test_score.py</code> 文件(该文件对你来说是不可见的空文件),在我们的本地机器上导入 Tasks 中指定的文件并运行一些测试用例。</p>
323327
<ul>
68.3 KB
Loading

css/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ pre .javascript .function {
11681168
}
11691169
.links-of-author a::before,
11701170
.links-of-author span.exturl::before {
1171-
background: #bfffa1;
1171+
background: #f1dfe5;
11721172
border-radius: 50%;
11731173
content: ' ';
11741174
display: inline-block;

0 commit comments

Comments
 (0)