Skip to content

Commit

Permalink
Add CONTRIBUTING.md (#6924)
Browse files Browse the repository at this point in the history
  • Loading branch information
qihqi authored Apr 17, 2024
1 parent 6e34bbe commit aee1d37
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
2 changes: 1 addition & 1 deletion experimental/torch_xla2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ source my_venv/bin/activate
#### 1.1 Install torch CPU, even if your device has GPU or TPU:

```bash
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
```

Or, follow official instructions in [pytorch.org](https://pytorch.org/get-started/locally/) to install for your OS.
Expand Down
6 changes: 3 additions & 3 deletions experimental/torch_xla2/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ dependencies = [
# "torch",
]

[tool.pytest.ini_options]
addopts="-n auto"

requires-python = ">=3.10"
license = {file = "LICENSE"}

[tool.pytest.ini_options]
addopts="-n auto"
38 changes: 38 additions & 0 deletions experimental/torch_xla2/torch_xla2/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Contributing to TorchXLA2

We appreciate all contributions. If you are planning to contribute a bug fix for an open issue, please comment on the thread and we're happy to provide any guidance. You are very welcome to pick issues from good first issue and help wanted labels.

If you plan to contribute new features, utility functions or extensions to the core, please first open an issue and discuss the feature with us. Sending a PR without discussion might end up resulting in a rejected PR, because we might be taking the core in a different direction than you might be aware of.


# Developer setup

## Mac setup:
@qihqi

I am able to develop directly on mac (m1) laptop for most of parts. Using steps
in README.md works. The condensed version for easy copy & paste:

```bash
conda create --name <your_name> python=3.10
conda activate <your_name>
pip install --upgrade "jax[cpu]" torch
pip install -r test_requirements.txt
pip install -e .
pytest test
```

### VSCode

I use vscode on my Mac. I loosely followed instruction in
https://code.visualstudio.com/docs/python/python-tutorial
to setup a proper python environment.

The plugins I installed (a subset of the ones listed above) are:
* VSCode's official Python plugin
* Ruff formatter
* Python Debugger

I also changed Python interpreter to point at the one in my conda env.
That is all the changes I have.

0 comments on commit aee1d37

Please sign in to comment.