Skip to content

update NS for FX tutorial for PyTorch v1.13 #2089

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

Merged
merged 3 commits into from
Oct 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .jenkins/validate_tutorials_built.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"recipes/Captum_Recipe",
"hyperparameter_tuning_tutorial",
"flask_rest_api_tutorial",
"fx_numeric_suite_tutorial", # remove when https://github.com/pytorch/tutorials/pull/2089 is fixed
"ax_multiobjective_nas_tutorial",
]

Expand Down
4 changes: 2 additions & 2 deletions prototype_source/fx_numeric_suite_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ def plot(xdata, ydata, xlabel, ylabel, title):
# Note: quantization APIs are inplace, so we save a copy of the float model for
# later comparison to the quantized model. This is done throughout the
# tutorial.
mobilenetv2_prepared = quantize_fx.prepare_fx(
copy.deepcopy(mobilenetv2_float), qconfig_dict)
datum = torch.randn(1, 3, 224, 224)
mobilenetv2_prepared = quantize_fx.prepare_fx(
copy.deepcopy(mobilenetv2_float), qconfig_dict, (datum,))
mobilenetv2_prepared(datum)
# Note: there is a long standing issue that we cannot copy.deepcopy a
# quantized model. Since quantization APIs are inplace and we need to use
Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ ax-platform
nbformat>=4.2.0
deep_phonemizer==0.0.17

# the following is necessary due to https://github.com/python/importlib_metadata/issues/411
importlib-metadata < 5.0; python_version <= "3.7"
importlib-metadata; python_version > "3.7"

# PyTorch Theme
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme

Expand Down