Commit Graph

33 Commits

Author SHA1 Message Date
Xuehai Pan
267f82b860 [BE] Format .ci/ / .github/ / benchmarks/ / functorch/ / tools/ / torchgen/ with ruff format (#132577)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/132577
Approved by: https://github.com/malfet
2024-10-11 18:30:26 +00:00
Aaron Gokaslan
fd4b649e6c [BE]: Simplify some list comps to generators C419 (#132578)
Simplifies some list comprehensions to generator which is more efficient. Automatically applied diffs for the most part with ruff

Pull Request resolved: https://github.com/pytorch/pytorch/pull/132578
Approved by: https://github.com/ezyang
2024-08-04 17:46:26 +00:00
Xuehai Pan
740fb22966 [BE][Easy][4/19] enforce style for empty lines in import segments in functorch/ (#129755)
See https://github.com/pytorch/pytorch/pull/129751#issue-2380881501. Most changes are auto-generated by linter.

You can review these PRs via:

```bash
git diff --ignore-all-space --ignore-blank-lines HEAD~1
```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/129755
Approved by: https://github.com/zou3519
ghstack dependencies: #129752
2024-07-18 05:08:03 +00:00
Shayekh Bin Islam
e8005781be Softmax in functorch example fixed (#107988)
The output of softmax was overwritten by the output of fc2 in the following line. So, the output of the softmax is never utilized. Now, the final output of the model includes softmax.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/107988
Approved by: https://github.com/zou3519
2023-09-05 17:18:48 +00:00
Alexander Pivovarov
02abbb8109 Fix some typos, mostly "that that" (#106901)
Fix some typos
Pull Request resolved: https://github.com/pytorch/pytorch/pull/106901
Approved by: https://github.com/janeyx99
2023-08-10 19:46:53 +00:00
Edward Z. Yang
e6ec0efaf8 Apply UFMT to all non test/torch files (#106205)
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: https://github.com/pytorch/pytorch/pull/106205
Approved by: https://github.com/albanD
2023-07-29 02:56:24 +00:00
Xuehai Pan
5b1cedacde [BE] [2/3] Rewrite super() calls in functorch and torch (#94588)
Rewrite Python built-in class `super()` calls. Only non-semantic changes should be applied.

- #94587
- #94588
- #94592

Also, methods with only a `super()` call are removed:

```diff
class MyModule(nn.Module):
-   def __init__(self):
-       super().__init__()
-
    def forward(self, ...):
        ...
```

Some cases that change the semantics should be kept unchanged. E.g.:

f152a79be9/caffe2/python/net_printer.py (L184-L190)

f152a79be9/test/test_jit_fuser_te.py (L2628-L2635)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/94588
Approved by: https://github.com/ezyang, https://github.com/albanD
2023-02-10 21:16:33 +00:00
Richard Zou
13ab819356 [functorch] fix AOTAutograd tutorial (#87415)
It was raising asserts previously
Pull Request resolved: https://github.com/pytorch/pytorch/pull/87415
Approved by: https://github.com/Chillee
2022-10-21 01:53:24 +00:00
Richard Zou
eed5f0464c [functorch] fix whirlwind tour ipynb (#85974)
It was missing an "import torch"
Pull Request resolved: https://github.com/pytorch/pytorch/pull/85974
Approved by: https://github.com/samdow
2022-09-30 20:42:32 +00:00
Richard Zou
19c7a6b54b [functorch] Update notebooks for latest release (#85855)
This PR:
- dedups our colab notebooks with the regular functorch notebooks. The
colab notebooks were versions of the reuglar notebooks that had
install instructions. Now that functorch is easier to install, we do not
need those anymore.
- fixes the colab links

Test Plan:
- build docs locally and tested them
Pull Request resolved: https://github.com/pytorch/pytorch/pull/85855
Approved by: https://github.com/samdow
2022-09-29 20:00:34 +00:00
Horace He
0e256c2550 removed compile cache and static argnums (#85783)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/85783
Approved by: https://github.com/wconstab
2022-09-28 08:33:59 +00:00
Horace He
85931eaa6b Rename fake_result to val (#84331)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/84331
Approved by: https://github.com/ezyang
2022-08-31 17:44:18 +00:00
Janosh Riebesell
62d9f1559e Fix model type CNN->MLP in functorch ensembling notebook intro (#83603)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83603
Approved by: https://github.com/albanD, https://github.com/zou3519
2022-08-22 21:42:37 +00:00
Sergii Dymchenko
a0b3854548 Change seperate -> separate (#83056)
One instance was caught by Meta-internal "exact-word-misspell" linter in D38505529.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83056
Approved by: https://github.com/huydhn, https://github.com/seemethere
2022-08-09 23:11:34 +00:00
Richard Zou
f42ed3f98f Turn on linting for functorch (#81987)
Test Plan:
- wait for CI
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81987
Approved by: https://github.com/samdow
2022-07-25 14:36:22 +00:00
Richard Zou
5cb802a63b Delete some no-longer-neccessary debugging output (#81990)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81990
Approved by: https://github.com/Chillee
2022-07-25 14:36:21 +00:00
Geeta Chauhan
c58932ea79 [functorch] Fix link for colab (pytorch/functorch#929)
Fix link to point to correct colab for ensembling example
2022-07-21 13:41:37 -07:00
Roman Novak
e642a34627 [functorch] Add complexities and references for NTK implementations. (pytorch/functorch#907)
* Add complexities and references for NTK implementations.

* Fix result names; rename "outer product" -> "matrix product".

* Fix names
2022-07-21 13:41:36 -07:00
Local State
ff9558a2ea [functorch] Update neural_tangent_kernels.ipynb (pytorch/functorch#788)
Fix a small bug
```python3
    if compute == 'full':
        return result
    if compute == 'trace':
        return torch.einsum('NMKK->NM')        # should be torch.einsum('NMKK->NM', result)
    if compute == 'diagonal':
        return torch.einsum('NMKK->NMK')        # should be torch.einsum('NMKK->NMK', result)
```
2022-07-21 13:41:33 -07:00
Richard Zou
b2f03d7f7d [functorch] Better intro to functorch (pytorch/functorch#688)
For our docs landing page.

Fixes https://github.com/pytorch/functorch/issues/605
2022-07-21 13:41:29 -07:00
Horace He
5472f5ebfd [functorch] made some minor updates to the notebook 2022-07-21 13:41:28 -07:00
Horace He
408b6c14a5 [functorch] Revmoed operator authoring 2022-07-21 13:41:27 -07:00
vfdev
aab0785d6b [functorch] [skip ci] Fix typo in notebook name (pytorch/functorch#549) 2022-07-21 13:41:26 -07:00
Horace He
ee61e3cc76 [functorch] Added minifier example notebook 2022-07-21 13:41:26 -07:00
Richard Zou
8abfc81705 [functorch] Update colab install instructions (pytorch/functorch#590) 2022-07-21 13:41:26 -07:00
Richard Zou
664cd284c5 [functorch] Docs website modification (pytorch/functorch#563)
I modified the docs website:
- It has a new install page which we'll fill out l ater
- It has a new "whirlwind tour" section with is just our README
copy-pasted
- It has a "UX Limitations" section describing arbitrary python
mutation, in-place operations, and control flow.

Please let me know if you think anything else should be here.

Future work:
- I'm going to put up a table of what operators we have support for and
which ones we don't, autogenerated via OpInfo
2022-07-21 13:41:25 -07:00
Richard Zou
3110183992 [functorch] Neural Tangent Kernels tutorial (pytorch/functorch#540) 2022-07-21 13:41:25 -07:00
Richard Zou
9ae520640e [functorch] Update ensembling and per-sample-grad example (pytorch/functorch#556) 2022-07-21 13:41:24 -07:00
Richard Zou
ea1e2906cc [functorch] Synchronize jacobians_hessians tutorial (pytorch/functorch#555) 2022-07-21 13:41:24 -07:00
vfdev
3adc8167c9 [functorch] Updated css to reduce badge size and code-block bottom padding (pytorch/functorch#526)
* Updated css to reduce badge size and code-block bottom padding

* [skip ci] Added new line
2022-07-21 13:41:23 -07:00
Less Wright
cfe8ff227f [functorch] Colab ready tutorials (3 total) with updated colab badge links (pytorch/functorch#519)
* Create readme.md

* colab version, jacobians hessians tutorial

* per sample gradients tutorial in colab

* colab ready tutorial, ensembling

* add colab badge and link to colab ready tutorial

* Delete ensembling_colab.ipynb

* add colab badge and link to colab ready version

* add colab badge and link to colab ready tutorial

* add colab badge and link to colab ready tutorial, add meta-learning mention as addtl use case
2022-07-21 13:41:23 -07:00
Animesh Jain
1a748aeadc [functorch] Aot Autograd tutorial (pytorch/functorch#476) 2022-07-21 13:41:23 -07:00
Richard Zou
fd4d82ee0d [functorch] quick cleanup 2022-07-21 13:41:17 -07:00