How to communicate in a Pull Request?

<p>
<a href="https://cdn-uploads.huggingface.co/production/uploads/608aabf24955d2bfc3cd99c6/oJDsjjFA53jL5AEGUd0Ai.png" rel="nofollow"><img alt="image/png" src="https://cdn-uploads.huggingface.co/production/uploads/608aabf24955d2bfc3cd99c6/oJDsjjFA53jL5AEGUd0Ai.png"/></a></p>
<p>Hi there! I'm Aritra, and let me tell you, I didn't have a clue about Open Source contributions or GitHub until 2018. My first PR to a big repository was a simple typo fix in the TensorFlow documentation (you can check it out <a href="https://github.com/tensorflow/docs/pull/1631" rel="nofollow">here</a>, though it never got in).</p>
<p>Fast forward a few years, and I've been fortunate enough to contribute to some incredible libraries like <a href="https://github.com/huggingface/peft/pulls?q=author%3AariG23498+" rel="nofollow">peft</a>, <a href="https://github.com/huggingface/transformers/pulls?q=author%3AariG23498+" rel="nofollow">transformers</a>, and more. But enough about me — let's talk about something that’s really important when contributing to open source: how to communicate in a pull request (PR).</p>
<ol>
<li>Find or Create an Issue First</li>
</ol>
<p>Before diving into the code, the first thing you should do is search for an <em>existing</em> issue that you’d like to fix. If there isn’t one, create it yourself. This is your first step in engaging with the maintainers, who will likely jump in and brainstorm with you.</p>
<p>Trust me, this part of the process is incredibly rewarding. You get to interact with people who might be a lot smarter than you (I always think of it this way, which helps me stay grounded and not feel overwhelmed). You will most certainly learn a lot about the repository and how things work.</p>
<p>To see an example, <a href="https://github.com/huggingface/peft/issues/1940" rel="nofollow">here</a>'s where I learnt about a new LoRA technique which was mind blowing.</p>
<ol start="2">
<li>Crafting Your PR</li>
</ol>
<p>Once you’ve identified the issue and are ready to create a PR, take your time with the description. This is not just a formality; it’s your chance to clearly communicate what your PR is about. The <strong>title</strong> and <strong>description</strong> should be precise and to the point.</p>
<p>I have never been able to perfect this craft, but I always try. I take immense pride in <a href="https://github.com/keras-team/keras-nlp/pull/1662" rel="nofollow">this PR</a> description and title.</p>
<p>This clarity is crucial for maintainers and others in the community to understand your intentions and join the conversation. Who knows? Your PR might get reviewed by someone you admire, and that’ll make your day!</p>
<p><a href="https://x.com/BenjaminBossan" rel="nofollow">Benjamin</a> says, "My approach is to craft a well written commit message and then re-use it (maybe with a few alterations) as the PR description. That way, the effort to write a good description is rewarded twice, once on GH and once in the git history."</p>
<ol start="3">
<li>Overcommunicate (But in a Good Way)</li>
</ol>
<p>As my friend/mentor <a href="https://sayak.dev" rel="nofollow">Sayak Paul</a> often says, "Overcommunication never hurts; undercommunication always does." Be as detailed as possible in your PR conversation. I’m a bit biased here, but if your PR is related to deep learning or Python, consider including Colab notebooks that reviewers can easily run, or Gradio links to a working model. These small steps can make a huge difference in how your contribution is perceived.</p>
<ol start="4">
<li>Respect Others' Time</li>
</ol>
<p>Always remember that the maintainers and reviewers are busy people. Avoid asking open-ended questions that leave them guessing. Instead, try to solve the problem on your own first. If you get stuck, list out what you’ve already tried and where you’re facing issues. <a href="https://github.com/huggingface/peft/pull/2006#issuecomment-2301701483" rel="nofollow">Isolate</a> the problem and include relevant code snippets in your PR. This shows that you respect their time and effort.</p>
<ol start="5">
<li>Stay Humble and Respectful</li>
</ol>
<p>Finally, be kind and patient, especially when someone asks a "not so mature" question on your PR. This might be their first time contributing to something big, just like you were once. A little empathy goes a long way—offer a helpful hand instead of a harsh word. After all, we’re all here to learn and grow together.</p>
<p>Hope you like it and will follow this in your own Open Source endeavour. I will get it reviewed by my fellow Open Source wizards. I am sure there will be a lot of edits, so come back after a week to get some better tips and tricks!</p>
