Skip to content

Maid the changes to the main.py file #1282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 689 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
689 commits
Select commit Hold shift + click to select a range
5baaba8
adding manual libtorch compilation guide
soumyadipghosh Jan 19, 2021
5b38d85
Fix rpc_parameter_server.py unused import, typos, formatting (#874)
pbelevich Jan 22, 2021
5751edd
Fix distributed/rpc/rnn unused import, typos, formatting (#875)
pbelevich Jan 26, 2021
fa59694
[FX] Start fx folder and add native interpreter example
Feb 2, 2021
0bb43c8
Merge pull request #881 from jamesr66a/fx
Feb 3, 2021
94d4e94
[FX] Move examples from pytorch/pytorch
Feb 4, 2021
6e6e0d4
Merge pull request #882 from jamesr66a/fx
Feb 4, 2021
e7d3aa1
Added vmap
Chillee Feb 4, 2021
6a3ca3b
Added NNC lowering example
Chillee Feb 4, 2021
b163b4a
made some small changes
Chillee Feb 4, 2021
745e2a8
Added things
Chillee Feb 4, 2021
ea3d82b
Merge pull request #883 from Chillee/vmap
Feb 4, 2021
30bcf77
Write examples of customizing `Tracer`
Feb 5, 2021
32f26c6
Added high level explanation
Chillee Feb 5, 2021
c6748e5
added newline
Chillee Feb 5, 2021
9c2aae0
Merge pull request #886 from ansley/custom_tracer
Feb 5, 2021
e1d2746
responded to comments
Chillee Feb 6, 2021
1973c3c
Merge pull request #884 from Chillee/nnc
Feb 6, 2021
36441a8
Add README.md for FX examples
Feb 6, 2021
1bed7ea
updated NNC example
Chillee Feb 19, 2021
2e8b5c5
Merge pull request #809 from soumyadipghosh/dist-cpp
osalpekar Feb 19, 2021
c8423c8
Merge pull request #888 from Chillee/master
Chillee Feb 23, 2021
8f3739f
[FX] Add example of tracer that records module qualname for each node
Mar 9, 2021
4db1116
Merge pull request #891 from jamesr66a/fx_module_tracer
Mar 9, 2021
af11138
Increasing the rpc timeout (#894)
pruthvistony Mar 22, 2021
611b453
fix the error of generated code in subgraph rewrite
XiaobingSuper Apr 2, 2021
fc0d686
fix typo
Moh-Yakoub Apr 2, 2021
507493d
Merge pull request #896 from XiaobingSuper/fx
Apr 2, 2021
25530d6
[FX] Add primitive library example
Apr 16, 2021
aef78a5
Merge pull request #899 from jamesr66a/primitive_lib
Apr 16, 2021
b0649dc
Merge pull request #897 from Moh-Yakoub/fix_typo
Chillee Apr 25, 2021
41a7004
Clang-format the code
May 2, 2021
5b528f5
Merge pull request #904 from SciPioneer/patch-1
brianjo May 3, 2021
fba20d5
Replace RRef with RemoteModule
May 7, 2021
3d63fe1
Fix Transformer init_weights
kyox24 May 7, 2021
01539f9
Merge pull request #908 from SciPioneer/patch-3
holly1238 May 10, 2021
95cbc6c
Fix comment to use zero-indexed ranks
May 27, 2021
c002856
Merge pull request #916 from andwgu/master
awgu May 27, 2021
3da6dda
Fix comment to use zero-indexed ranks
May 27, 2021
cbb760d
Merge pull request #917 from andwgu/master
awgu May 27, 2021
6126062
[FX] Fix wrap output example
Jun 11, 2021
2639cf0
Merge pull request #919 from jamesr66a/fix_wrap
Jun 11, 2021
5c47bb1
Example code fix for https://github.com/pytorch/tutorials/pull/1619
bowangbj Jul 27, 2021
cedca77
Merge pull request #924 from pytorch/gh/bowangbj/1/head
brianjo Jul 28, 2021
38c9c9c
Add profiling tracer example
Sep 16, 2021
3970e06
Merge pull request #931 from jamesr66a/profiling_tracer
Sep 16, 2021
0fa0589
word_language_model/generate.py reads a model file trained with CUDA,…
kaiidams Oct 26, 2021
0e6f883
Print avg acc after each epoch using ProgressMeter
mostafaelhoushi Nov 19, 2021
151944e
Merge pull request #939 from mostafaelhoushi/patch-1
mostafaelhoushi Nov 24, 2021
25c8ebd
change torchtext to torchtext.legacy
Dec 26, 2021
54da13e
Updating retracing examples to handle n-ary operators
zephirefaith Dec 29, 2021
b9071ca
updated inline_function.py
zephirefaith Jan 10, 2022
a50d7eb
Merge pull request #945 from zephirefaith/master
Jan 10, 2022
3647717
Fix CI Job Report when a test fail #943
Kord96 Jan 14, 2022
a43ab79
Delete workspace.xml
Kord96 Jan 14, 2022
578287b
test CI flag
Kord96 Jan 16, 2022
c3155b4
Merge branch 'master' of github.com:Kord96/examples
Kord96 Jan 16, 2022
ed4be99
Merge pull request #944 from yorkville101/master
mostafaelhoushi Jan 16, 2022
00ea159
Merge pull request #947 from Kord96/master
mostafaelhoushi Jan 16, 2022
96f3b83
Fix typos & supplement descriptions
Yulv-git Jan 20, 2022
afd5af8
Update Readme.
Yulv-git Jan 26, 2022
067d89e
#71844 Migrate default branch to main.
musebc Feb 8, 2022
c2987b7
Merge pull request #948 from Yulv-git/master
mostafaelhoushi Feb 12, 2022
58645a1
Merge pull request #935 from kaiidams/kaiidams/cudacpu
mostafaelhoushi Feb 12, 2022
21c240b
Merge pull request #909 from kyox24/master
mostafaelhoushi Feb 12, 2022
8fef201
Update requirements.txt
EmilPi Feb 21, 2022
1aa2eec
Merge pull request #949 from pytorch/71844_migrate_master_branch_to_main
musebc Mar 1, 2022
e5f075f
Merge pull request #953 from EmilPi/master
mostafaelhoushi Mar 7, 2022
07421e3
Merge pull request #694 from pytorch/automated_fixup_code_of_conduct_…
msaroufim Mar 9, 2022
eaf7133
Update CONTRIBUTING.md
msaroufim Mar 9, 2022
3ef46d5
Merge pull request #693 from pytorch/automated_fixup_contributing_fil…
msaroufim Mar 9, 2022
4aee9d0
Merge pull request #860 from SamuelMarks/args-for-google-style-docstr…
msaroufim Mar 9, 2022
41ae197
Merge branch 'main' into RL-loss-normalized
msaroufim Mar 9, 2022
886b74e
Merge pull request #386 from r-aristov/RL-loss-normalized
msaroufim Mar 9, 2022
6a0582a
updated dcgan docs
msaroufim Mar 9, 2022
1ff11db
Merge pull request #970 from pytorch/ndf
msaroufim Mar 9, 2022
c6441cd
Revert "Normalized loss in actor-critic and REINFORCE examples."
msaroufim Mar 9, 2022
3fe399d
Merge pull request #971 from pytorch/revert-386-RL-loss-normalized
msaroufim Mar 9, 2022
6b9b184
added contributing.md and updated README explaining what repo is about
msaroufim Mar 10, 2022
4f97a2f
pushed new templates
msaroufim Mar 10, 2022
d1f22d1
added good first issue tag
msaroufim Mar 10, 2022
3661448
only import StepLR
developer0hye Mar 10, 2022
1551d72
push
msaroufim Mar 10, 2022
a0dbc76
dependencies
msaroufim Mar 10, 2022
e3e09e1
diamond fixes
msaroufim Mar 10, 2022
c1a7307
Merge pull request #972 from pytorch/readme
msaroufim Mar 10, 2022
41144d0
Update README.md
msaroufim Mar 10, 2022
d2acb06
Update run_python_examples.sh
msaroufim Mar 10, 2022
0352380
Merge pull request #974 from pytorch/msaroufim-patch-1
msaroufim Mar 10, 2022
97b5cc6
add default imagenet directory
MaxVanDijck Mar 11, 2022
740fbd6
change imagenet data script
MaxVanDijck Mar 11, 2022
b729188
Create extract_ILSVRC.sh
MaxVanDijck Mar 11, 2022
0b8fe3e
update link to bash script
MaxVanDijck Mar 11, 2022
2db1328
updated CartPole-v0 to CartPole-v1
nitesh4146 Mar 12, 2022
4067a39
Closes #771. Fix vague description on batch size calculation in image…
yzs981130 Mar 17, 2022
8016876
Merge pull request #982 from yzs981130/fix_batch_size_comment
msaroufim Mar 17, 2022
15a638f
Merge pull request #864 from kleinicke/master
msaroufim Mar 17, 2022
fa95844
Merge pull request #859 from developer0hye/patch-5
msaroufim Mar 17, 2022
8ed9925
add notes to shell script
MaxVanDijck Mar 17, 2022
973f322
typo
MaxVanDijck Mar 17, 2022
0cb38eb
Merge pull request #977 from MaxVanDijck/main
msaroufim Mar 17, 2022
c3a9cc1
added codeowners
msaroufim Mar 21, 2022
b7f4c8a
fixed typo
msaroufim Mar 21, 2022
8365ba5
Merge branch 'pytorch:main' into main
nitesh4146 Mar 22, 2022
cffa97d
added test for actor_critic
nitesh4146 Mar 22, 2022
42a079f
Update RPC link, etc.
Yulv-git Mar 29, 2022
fcf8f94
Merge pull request #986 from Yulv-git/master
msaroufim Mar 30, 2022
0b27607
Update CODEOWNERS
msaroufim Apr 11, 2022
823d055
Merge pull request #985 from pytorch/owner
msaroufim Apr 11, 2022
6733871
requirements upgrades and clarification in CONTRIBUTING
veekaybee Apr 12, 2022
349c08e
Merge pull request #978 from nitesh4146/main
msaroufim Apr 14, 2022
7f98915
added fx tests
msaroufim Apr 15, 2022
2d75c5b
disable some fx tests
msaroufim Apr 15, 2022
4054fd8
disabled nnc
msaroufim Apr 15, 2022
d12bed5
deleted vmap and nnc compile from fx
msaroufim Apr 15, 2022
fa6a763
Merge pull request #990 from pytorch/fxtest
msaroufim Apr 15, 2022
348ed0f
updating CONTRIBUTING instructions
veekaybee Apr 19, 2022
004ccee
reverting ddp_rpc torch requirements to 1.6
veekaybee Apr 21, 2022
18fdae1
Merge pull request #988 from veekaybee/ISSUE-976
msaroufim Apr 21, 2022
6db0f77
publish examples site 2
Apr 22, 2022
dbcd905
Merge pull request #993 from pytorch/publish-examples2
msaroufim Apr 22, 2022
1b0133a
Separate doc build to avoid publising docs on PR
Apr 22, 2022
74abf23
Update .github/workflows/doc-build.yml
Apr 22, 2022
d5fc6b5
Merge pull request #994 from pytorch/update-publishing-yml
msaroufim Apr 22, 2022
66868ec
Add Google Analytics code
Apr 25, 2022
1fa891e
Merge pull request #996 from pytorch/add-google-analytics
msaroufim Apr 27, 2022
ede1d54
Adding runtime.txt for Netlify
Apr 27, 2022
91f5e02
Merge pull request #997 from pytorch/add-runtimetxt
Apr 27, 2022
ab42c48
Update README.md
msaroufim Apr 28, 2022
648c0bd
Update README.md
msaroufim Apr 29, 2022
933d976
add siamese network example
ma7dev May 5, 2022
aec9e70
update README
ma7dev May 5, 2022
11cb38f
Updated based on PR's feedback
ma7dev May 8, 2022
57903ba
included siamese network example to docs
ma7dev May 8, 2022
7cb4788
Fixed a typo to run sphinx locally
ma7dev May 8, 2022
8c17275
fix typos
ma7dev May 8, 2022
332e138
better description
ma7dev May 8, 2022
41b035f
Merge pull request #1003 from sudomaze/feat/add_siamese_network_example
msaroufim May 10, 2022
9ba53df
Gh/fduwjj/2/base (#1007)
fduwjj May 23, 2022
09ae1f9
Revert "Gh/fduwjj/2/base (#1007)" (#1009)
fduwjj May 23, 2022
2bf23f1
[PT-D] Add an example for Megatron-LM style example (#1008)
fduwjj May 23, 2022
d547876
If the dataset is not exactly divisible by world_size, the validation…
siaimes Jun 9, 2022
a6ec11e
Update a few punctuations in CONTRIBUTING.md (#1016)
ifunanyaScript Jul 1, 2022
78acb79
[PT-D] Add TP and DDP into the example run script (#1014)
fduwjj Jul 1, 2022
91ccd7a
env.seed is deprecated, change to env.reset (#1017)
rogerioagjr Jul 7, 2022
7ed7ac7
[parameter_server] fix deadlock in multiprocessing by using spawn (#1…
hudeven Jul 18, 2022
bcb5667
Grammer and language (#1024)
ArshErgon Jul 28, 2022
b20db76
refine imagenet dummy part of #1011 (#1028)
KimBioInfoStudio Aug 10, 2022
200cc47
Fix for NCCL backend, all_reduce performed on GPU when available (#1034)
jataylo Aug 17, 2022
92f8d67
Fix flaky dcgan test: use fake data
hudeven Aug 23, 2022
9a78ff1
Revert "Fix flaky dcgan test: use fake data"
hudeven Aug 23, 2022
dbbb034
fix: prevent "context has already been set" error in mnist_hogwild ex…
ShiboXing Aug 23, 2022
32f0c1e
Fix flaky dcgan test by using fake data (#1044)
hudeven Aug 24, 2022
dc51eb1
Update (#1058)
Sep 13, 2022
8428996
Fixed RL examples to work with new gym API (#1051)
vfdev-5 Sep 14, 2022
d5d9de6
Update actor_critic.py typo (#1048)
BeBraveBeCurious Sep 14, 2022
32c15f2
fix imagenet nondeterminism when seed is set (#1056) (#1057)
yzs981130 Sep 14, 2022
71a545a
Fix the wrong link in issues-template (#1045)
hudeven Sep 14, 2022
616caed
Add mps device (#1018)
YuliyaPylypiv Sep 14, 2022
5a06e9c
Revert "Add mps device" (#1061)
msaroufim Sep 15, 2022
f82f562
Add mps device (#1064)
YuliyaPylypiv Sep 20, 2022
517eb80
Mac enhancement .gitignore to ignore .DS_* (#1066)
VatsalSy Sep 21, 2022
f45e418
Add code for DDP tutorial series [PR 1 / 3] (#1067)
subramen Sep 22, 2022
84b7588
Add code for DDP tutorial series [PR 2 / 3] (#1068)
subramen Sep 22, 2022
d91085d
Add code for DDP tutorial series [PR 3 / 3] (#1069)
subramen Sep 26, 2022
35eb814
Added mps option in generate.py (#1070)
AvisP Sep 29, 2022
f5bb60f
Fix device mismatch issue in #1071 (#1073)
hudeven Sep 30, 2022
2ee8d43
Add set_epoch and fix args in DDP-series example (#1076)
subramen Oct 3, 2022
ca1bd91
Add map_location parameter in DDP-series example (pytorch#1078) (#1079)
lianchengmingjue Oct 8, 2022
74a70e1
Speed-up to O(1) from O(N) of the computation of each return in REIN…
Chris1nexus Oct 17, 2022
a8cf0b8
Add map_location when loading model checkpoint (#1084)
subramen Oct 18, 2022
5d4b584
Example of MNIST using RNN (#752)
rakesh-malviya Oct 27, 2022
9aad148
add mnist_rnn to test script for CI (#1086)
hudeven Oct 27, 2022
d304b0d
[fix CI] replace assert_allclose with assert_close (#1091)
hudeven Nov 4, 2022
e6cba0a
Remove unused code from /cpp/transfer-learning/classify.cpp (#1092)
yncxcw Nov 10, 2022
1b36393
Update trainer.py (#1098)
subramen Nov 29, 2022
387ce7b
Update main.py (#1095)
daming-lu Nov 29, 2022
50f5570
[PT-D][Tensor Parallel] Update the example for TP to use the new TP A…
fduwjj Dec 2, 2022
63fc276
Fix CI error in example (#1100)
fduwjj Dec 2, 2022
f8401e9
Fix exception causes in word_language_model/model.py (#1102)
cool-RR Dec 13, 2022
47ac714
word language model on Jetson NX (#1103)
IdiosyncraticDragon Dec 14, 2022
244e4ee
set type of batch_size argument to int in ddp-tutorial-series (#1104)
ConradStack Dec 20, 2022
4028977
Update requirements.txt for minGPT ddp example (#1106)
kurman Jan 5, 2023
d8456a3
Update CONTRIBUTING.md (#1107)
princengare Feb 2, 2023
e4e8da8
fix: fixed local device name in multinode example.
fjosw Feb 12, 2023
0252bda
Remove reference to non-existing `--model` argument (#1110)
sopotc Feb 22, 2023
a1271e8
Removes warnings displayed on running main.py (#1117)
DeepC004 Feb 26, 2023
9d17ef8
Fixes #1111 : Added Forward-Forward Algorithm (#1114)
viveks-codes Feb 26, 2023
76f0120
Change ninp to nhid (#1109)
avinashsai Feb 26, 2023
7ec911c
Revert "Change ninp to nhid" (#1124)
msaroufim Mar 5, 2023
54f4572
Typo (#1126)
viveks-codes Mar 9, 2023
33cbdfd
Implemented Vision Transformer in PyTorch (#1141)
niyarrbarman Apr 26, 2023
c9ef23f
Fix typo in README.md (#1145)
subramen May 2, 2023
6a64939
Add Sequence parallel and 2D parallel examples (#1149)
fduwjj May 10, 2023
79ef786
Adds torch.cuda.set_device calls to DDP examples (#1142)
subramen May 15, 2023
7b7c708
FSDP example (#1019)
HamidShojanazeri May 24, 2023
55c663f
Update imports (#1155)
subramen May 25, 2023
8c16e96
Fix 2D example to pass in data parallel pg (#1160)
fduwjj Jun 5, 2023
7f7c222
Graph Convolutional Network (#1163)
JoseLuisC99 Jun 12, 2023
92790cd
📝🎯 Added README for SNLI Classifier Training (#1173)
kadirnar Jul 22, 2023
0676c07
Fix import in minGPT example (#1169)
henrysecond1 Jul 22, 2023
6fc19c7
fix zero_grad default parameter (#1172)
Officium Jul 22, 2023
741de70
Fixed default num_classes to 10 for CIFAR10 (#1176)
niyarrbarman Jul 28, 2023
4440841
Added Graph Attention Network example (#1174)
ebrahimpichka Aug 8, 2023
508743b
fix a typo in the FSDP example (#1159)
Separius Aug 8, 2023
1dd0f46
Use gymnasium and reflect new API (#1152)
trducng Aug 8, 2023
2095514
Bugfix in vision transformer example - change lr datatype to float (#…
siddharth9820 Aug 8, 2023
001d493
Update TransformerModel using nn.Transformer module (#1138)
tairenpiao Aug 8, 2023
13009ef
fix the broken link about minGPT-DDP (#1156)
xffxff Aug 20, 2023
cead596
Added the --save_model arg for `mnist_hogwild` example (#1189)
pranavvp16 Sep 3, 2023
c67bbab
[TorchFix] Update deprecated TorchVision pretrained parameters (#1193)
kit1980 Oct 6, 2023
f0d6fc9
Update CXX compiler from 14 to 17
malfet Nov 10, 2023
c4dc481
[T170073014] Rewrite distributed examples for Tensor Parallel, Sequen…
lessw2020 Nov 22, 2023
c0b889d
simpler subsequent mask generator (#1198)
hoosierEE Nov 27, 2023
30b310a
[2D] Update 2d example to use get_local_rank (#1203)
wz337 Dec 8, 2023
bdb948c
Fix the DCGAN C++ shape warning (#1207)
lancerts Jan 12, 2024
5a3b333
update-minimum-cmake-version to version 3.5 (#1206)
lancerts Jan 12, 2024
de85c09
Bugfix in vision transformer - save class token and pos embedding (#1…
ManukyanD Jan 12, 2024
3e56db2
Add MPS device (#1197)
chmjkb Jan 12, 2024
5921fc1
Fix args description (#1209)
MichaelMonashev Jan 12, 2024
97adea1
Update the readme and fix bugs in custom-dataset example (#1214)
lancerts Jan 13, 2024
814f047
Include the CI for cpp/autograd (#1217)
lancerts Jan 22, 2024
42b3bda
Include a CI job for cpp/custom-dataset (#1219)
lancerts Jan 23, 2024
b2832cc
Ensure the const-ness of the data member in cpp/custom-dataset (#1215)
lancerts Jan 23, 2024
d78cff0
Add CI jobs for cpp/mnist and cpp/regression (#1220)
lancerts Jan 23, 2024
b88d805
Add a CI job for cpp/dcgan (#1221)
lancerts Jan 24, 2024
a537659
Improve code readability and make number of epochs a command line arg…
lancerts Jan 25, 2024
76cd9d0
Improve readme for cpp/custom-dataset and cpp/dcgan (#1223)
lancerts Jan 25, 2024
a848347
Fixes in Imagenet training script (#1224)
Jaiaid Jan 30, 2024
ec8a172
Revert "Fixes in Imagenet training script" (#1225)
msaroufim Jan 30, 2024
8c246ba
warning added for single GPU and NCCL (#1226)
Jaiaid Feb 3, 2024
83ff2f5
Minor improvement of the GCN doc (#1231)
lancerts Feb 13, 2024
2d725b6
fix minor typo in README.md (#1234)
ghlrobin Feb 19, 2024
7df10c2
Language translation example added (#1131) (#1240)
NoahSchiro Apr 2, 2024
ecd951d
Update TP examples to align with tutorials (#1243)
wanchaol Apr 11, 2024
89396d1
chore: remove repetitive words (#1244)
hugehope Apr 14, 2024
d22a29f
Update doc-build.yml
msaroufim Apr 16, 2024
61e266f
Update run_cpp_examples.sh
msaroufim Apr 30, 2024
911816c
Update main_cpp.yml (#1251)
msaroufim Apr 30, 2024
c49554c
Update distributed example tests in `run_python_examples.sh` (#1250)
sirutBuasai May 3, 2024
e48aaeb
Update run_cpp_examples.sh
msaroufim May 3, 2024
851c4cf
Fix the MNIST dataset url (#1256)
lancerts May 11, 2024
cd29c12
[Tensor Parallel] update examples to simplify embedding + first trans…
tianyu-l May 16, 2024
e8a38cc
Remove Vision Transformer Example (#1258)
msaroufim May 25, 2024
102beb0
Update index.rst
msaroufim May 25, 2024
37a1866
Remove the unused import in MNIST example (#1261)
lancerts May 26, 2024
86591de
Update run_python_examples.sh (#1269)
msaroufim Jun 8, 2024
a38cbfc
docs: added copyright holder to license file (#1266)
david-pa Jun 11, 2024
26de419
Fix AC in T5 example (#1273)
msaroufim Jun 29, 2024
f1c918d
Made changes toh the main.py
doshi-kevin Aug 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help us improve

---

Your issue may already be reported!
Please search on the [issue tracker](https://github.com/pytorch/examples/issues) before creating one.

## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
* Pytorch version:
* Operating System and version:

## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Installed using source? [yes/no]:
* Are you planning to deploy it using docker container? [yes/no]:
* Is it a CPU or GPU environment?:
* Which example are you using:
* Link to code or data to repro [if any]:

## Expected Behavior
<!--- If you're describing a bug, tell us what should happen -->

## Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->

## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug -->

## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
...

## Failure Logs [if any]
<!--- Provide any relevant log snippets or files here. -->

9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/doc_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: "\U0001F4DA Documentation"
about: Report a documentation related issue

---

## 📚 Documentation

<!-- A clear and concise description of what content in any of the README.md files is an issues
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: "\U0001F680 Feature request"
about: Suggest a new example or an improvement to the repo

---

<!--
Thank you for suggesting an idea to improve pytorch/examples

Please fill in as much of the template below as you're able.
-->

## Is your feature request related to a problem? Please describe.
<!-- Please describe the problem you are trying to solve. -->

## Describe the solution
<!-- Please describe the desired behavior. -->

## Describe alternatives solution
<!-- Please describe alternative solutions or features you have considered. -->
41 changes: 41 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: "\U0001F41B Pull Request"
about: Fix a bug or create new example

---

## Description

Please include a summary of the newly proposed example or issue being fixed. Please also include relevant motivation, context.

If this is a new example, how is your example different enough from the remaining examples in the repo.

If this is a bug fix please link the issue you are fixing. Fixes #(issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New Example (new example contribution)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## Feature/Issue validation/testing

Please describe the tests [UT/IT] that you ran to verify your changes and relevant result summary. If this is a bug fix please run `run_python_examples.sh` before and after your change locally to make sure it works and add the logs here.

- [ ] Logs before change
- [ ] Logs after change

- Logs

If this is a new example please add a corresponding test in `run_python_examples.sh`

- [ ] Test Added

## Checklist:

- [ ] Have you added tests that prove your fix is effective or that this example works?
- [ ] Has code been commented, particularly in hard-to-understand areas?
- [ ] Have you made corresponding changes to the documentation?
41 changes: 41 additions & 0 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Doc Build

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build_docs_job:
runs-on: ubuntu-latest
# Grant write permission here so that the doc can be pushed to gh-pages branch
permissions:
contents: write
strategy:
matrix:
python-version: [3.9]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Dependencies
run: |
echo `python3 --version`
sudo apt-get install -y python-setuptools
sudo apt-get install -y python3-sphinx
python3 -m pip install --upgrade pip
python3 -m pip install setuptools
id: build
- name: Build the docset
run: |
cd docs
pip install -r requirements.txt
make html
- name: Get output time
run: echo "The time was ${{ steps.build.outputs.time }}"
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: ./docs/build/html # The folder the action should deploy.
55 changes: 55 additions & 0 deletions .github/workflows/main_cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Run CPP Examples

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
# Every day at 3:00am
- cron: '0 3 * * *'


jobs:
test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install Cmake, Make, g++, MKL
run: |
sudo apt update && sudo apt upgrade
sudo apt install cmake g++ make
sudo apt-get -y install intel-mkl
- name: Install OpenCV
run: |
sudo apt -y install libtbb-dev
sudo apt install libopencv-dev
- name: Install argparse
run: |
git clone https://github.com/p-ranav/argparse
cd argparse
mkdir build
cd build
cmake -DARGPARSE_BUILD_SAMPLES=off -DARGPARSE_BUILD_TESTS=off ..
sudo make install
# Alternatively, you can install OpenCV from source
# - name: Install OpenCV from source
# run: |
# wget -O opencv.zip https://github.com/opencv/opencv/archive/4.x.zip
# unzip opencv.zip
# mkdir -p build && cd build
# cmake ../opencv-4.x
# cmake --build .
# sudo make install

- name: Run Cpp Tests
run: |
chmod +x ./run_cpp_examples.sh
./run_cpp_examples.sh "get_libtorch,run_all,clean"
38 changes: 38 additions & 0 deletions .github/workflows/main_distributed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run Distributed Examples

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
# Every day at 3:00am
- cron: '0 3 * * *'


jobs:
test:

runs-on: 4-core-ubuntu-gpu-t4

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install PyTorch
run: |
python -m pip install --upgrade pip
pip install --pre torch -f https://download.pytorch.org/whl/nightly/cu118/torch_nightly.html
- name: Run Tests
run: |
./run_distributed_examples.sh "run_all,clean"
- name: Open issue on failure
if: ${{ failure() && github.event_name == 'schedule' }}
uses: rishabhgupta/git-action-issue@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: Daily CI failed
body: Commit ${{ github.sha }} daily scheduled [CI run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed, please check why
assignees: ''
41 changes: 41 additions & 0 deletions .github/workflows/main_python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Run Python Examples

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
# Every day at 3:00am
- cron: '0 3 * * *'


jobs:
test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install PyTorch
run: |
python -m pip install --upgrade pip
# Install CPU-based pytorch
pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
# Maybe use the CUDA 10.2 version instead?
# pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu102/torch_nightly.html
- name: Run Tests
run: |
./run_python_examples.sh "install_deps,run_all,clean"
- name: Open issue on failure
if: ${{ failure() && github.event_name == 'schedule' }}
uses: rishabhgupta/git-action-issue@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: Daily CI failed
body: Commit ${{ github.sha }} daily scheduled [CI run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed, please check why
assignees: ''
26 changes: 24 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
mnist/data
VAE/data
dcgan/data
data
*.pyc
OpenNMT/data
cpp/mnist/build
cpp/dcgan/build
dcgan/*.png
dcgan/*.pth
snli/.data
snli/.vector_cache
snli/results
word_language_model/model.pt
fast_neural_style/saved_models
fast_neural_style/saved_models.zip
gcn/cora/
gat/cora/
docs/build
docs/venv

# vi backups
*~

# development
.vscode
**/.DS_Store
30 changes: 30 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.

# Github Actions, tests and CI
./github/ @msaroufim
run_python_examples.sh @msaroufim

# Distributed examples
# Can also add the distributed oncall
./distributed/ @mrshenli @pritamdamania87 @rohan-varma @H-Huang
./mnist_hogwild/ @mrshenli @pritamdamania87 @rohan-varma @H-Huang

# FX examples
./fx/ @jamesr66a @Chillee

# Domain Examples
./reinforcement_learning/ @msaroufim
./word_language_model/ @msaroufim

# Need an owner
./regression/
./mnist/
./imagenet/
./super_resolution/
./time_sequence_prediction/
./vae/

# Legacy examples
./cpp/
./legacy/snli/
Loading