Skip to content

Fix quantization tutorials (imports, syntax, and style) #1772

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 7 commits into from
Sep 6, 2022
Merged

Conversation

andrewor14
Copy link
Contributor

@andrewor14 andrewor14 commented Dec 20, 2021

Summary: This commit fixes the quantization tutorials such that
they can be run smoothly by the user.

Test Plan: Ran the updated tutorials without problem.

Reviewers: jerryzh168

Subscribers: jerryzh168, supriyar

@netlify
Copy link

netlify bot commented Dec 20, 2021

Deploy Preview for pytorch-tutorials-preview ready!

Name Link
🔨 Latest commit 05dcde9
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-tutorials-preview/deploys/63178b9448a1f2000982d728
😎 Deploy Preview https://deploy-preview-1772--pytorch-tutorials-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@andrewor14 andrewor14 force-pushed the quant-fix branch 2 times, most recently from eb338fb to 0f7c71b Compare December 22, 2021 00:21
Summary: This commit fixes the quantization tutorials such that
they can be run smoothly by the user.

Test Plan: Ran the updated tutorials without problem.

Reviewers: jerryzh168

Subscribers: jerryzh168, supriyar

ghstack-source-id: 196719d
Pull Request resolved: #1763
andrewor14 and others added 2 commits August 31, 2022 08:25
Summary: This commit fixes the quantization tutorials such that
they can be run smoothly by the user.

Test Plan: Ran the updated tutorials without problem.

Reviewers: jerryzh168

Subscribers: jerryzh168, supriyar

ghstack-source-id: 196719d
Pull Request resolved: #1763
Copy link
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks CI, namely because it references non-existing data files

Comment on lines 101 to 103
self.train = self.tokenize(os.path.join(path, 'wiki.train.token'))
self.valid = self.tokenize(os.path.join(path, 'wiki.valid.token'))
self.test = self.tokenize(os.path.join(path, 'wiki.test.token'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you doing those changes? Where those files are supposed to be coming from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were the paths when I downloaded the dataset myself. Without these changes I was not able to run the tutorials. I guess CI downloads the files differently somehow

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To unblock this PR maybe we should just revert these changes and investigate separately. How does that sound @jcaip?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, downloaded from where? For tutorials build, download locations are defined in (plan to move them to json file, but this is where they are for now)

tutorials/Makefile

Lines 93 to 94 in 4918fe4

wget -N https://s3.amazonaws.com/pytorch-tutorial-assets/wikitext-2.zip -P $(DATADIR)
unzip $(ZIPOPTS) $(DATADIR)/wikitext-2.zip -d advanced_source/data/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was using a different wikitext version which has changed the naming convention of those files, which is causing the error. I will update the internal tutorial guide and revert the filepaths, which I think should fix everything. Thanks for the help @malfet!

@jcaip jcaip merged commit cc39b08 into master Sep 6, 2022
@malfet malfet deleted the quant-fix branch December 16, 2022 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants