DEV Community

Cover image for How to Set up IVY and Create PR on IVY.
Muhammad Ishaque Nizamani
Muhammad Ishaque Nizamani

Posted on

How to Set up IVY and Create PR on IVY.

ڀلي ڪري آيا
welcome

I am writing this article to provide a step-by-step guide on how to raise a pull request on the IVY (ML repo) on GitHub. This article is specifically targeted towards newcomers to GitHub.
To follow along with this guide, you will need to have Visual Studio Code (VScode) installed on your system. If you don't have VScode, you can download it from the following link:
https://code.visualstudio.com/download

Additionally, we will be using a Conda environment for this process. If you don't have Anaconda installed, you can download it from the following link:
https://www.anaconda.com/download

Make sure to choose the Anaconda version that is compatible with your operating system.

Lastly, it is essential to have Git installed on your system and have a GitHub account.

By the end of this article, you will have a clear understanding of how to raise a pull request on the IVY (ML repo) on GitHub, enabling you to contribute effectively to the project.

if you have all the necessary prerequisites, you can proceed with setting up Ivy by following these steps:

1: Create a Conda virtual environment with Python version 3.10.x. Open your terminal and run the following command:
conda create -n your_environment_name python=3.10

Replace your_environment_name with the desired name for your environment.

2: Activate the environment using the following command:
conda activate your_environment_name
3: Go to the Ivy repository on GitHub at https://github.com/unifyai/ivy.

4: Fork the repository by clicking on the "Fork" button, as shown in the image below:

Image description

5: Open your terminal and navigate to the desired directory where you want to clone the Ivy repository.

6: Clone the repository by running the following command:
git clone https://github.com/your-github-username/ivy.git
Replace your-github-username with your GitHub username.

7: Change into the ivy directory by running the following command:
cd ivy
8: Write the following line to install requirements
pip install -r requirements/requirements.txt
9: one more last things you have install pre-commit
Run python3 -m pip install pre-commit
Enter into your cloned ivy folder, for example cd ~/ivy
Run pre-commit install

if all above step work then you are all set to create your first pull request.
Let's do it !!!!
first you have to go to the issue and find issue who has label ToDo and front-end and following link content issue like
https://github.com/unifyai/ivy/issues/15115
and above link will show to following list

Image description
In the image above, the items in the list represent functions that are supposed to be added to the file ivy/functional/frontends/paddle/tensor/tensor.py. The items in green indicate that someone is currently working on them, and the purple items indicate that they have already been completed, so there's no need to work on them.

You can choose any of the items in the list that are not marked. Select one that you are interested in and create an issue for it by following these steps:

  1. Click on the "New Issue" button in the repository's issue tab.
  2. Fill in the necessary details for the issue, including a descriptive title and a detailed description of the task you will be working on.
  3. Once the issue is created, it will be assigned a number. Take note of this number, as you will need it in the next step.

Image description

Next, comment on the link you provided, which is https://github.com/unifyai/ivy/issues/15115. In the comment, mention the number of the issue you created and any additional information or questions you may have.

Now, you can start coding in the file ivy/functional/frontends/paddle/tensor/tensor.py.If you find it difficult to understand the code, you can refer to the math.py file in the same folder for guidance. Additionally, you can copy and paste the code into the chatgpt for an explanation or if you need further assistance mention me in IVY server. I will help.
After adding a function in ivy/functional/frontends/paddle/tensor/tensor.py, you need to create a test function in the file ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py.

Once you have completed the coding, you should commit the code in your forked repository. After committing the code, go to your forked repository on GitHub. You will see a banner that says "Compare & pull request." Click on it to create a pull request.

The pull request URL will look similar to this: https://github.com/unifyai/ivy/pull/16040. After creating the pull request, it will be assigned to a reviewer. The reviewer may provide feedback or merge your pull request into the main branch.

Once your pull request is merged, you can copy the URL of the merged pull request. Send this link to the mentioned email address, as shown in the following image.

Image description

Then your coding challenge will be complete
.
Note: Please be aware that you may encounter various issues while working on a real-world project. The complexity and nature of the project can lead to unexpected challenges. Don't get discouraged if you face difficulties along the way. Remember to seek help from the project community, consult documentation, and use available resources to overcome any obstacles you encounter. Stay persistent and keep learning throughout the process. here is link of IVY server https://discord.gg/dhaMPrcC
پڙهڻ لاءِ مهرباني
ختم ٿيو
Thanks for reading
The End

Top comments (0)