-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[pkg] Improve mocked module detection by combining mocked object errors with the rest of the errors in PackageExporter #74315
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
Conversation
…rs with the rest of the errors in PackageExporter [ghstack-poisoned]
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit f7b4555 (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
|
@PaliC has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
CI Flow Status⚛️ CI FlowRuleset - Version:
|
…rs with the rest of the errors in PackageExporter (#74315) Summary: Pull Request resolved: #74315 Now instead of spitting out a NotImplemented Error when the Package Exporter finds an object for a mocked module, it combines these errors with the rest of the Packaging Errors of PackageExporter to get something like ``` torch.package.package_exporter.PackagingError: * Module was mocked out, but is still being used in the package.Please intern or extern the mocked modules if objects are supposed to be inthe package. package_a Context: Object(s) '['PackageASubpackageObject']' from module package_a was mocked out during packaging but is being used in resource - obj.pkl in package obj. package_a.subpackage Context: Object(s) '['PackageASubpackageObject']' from module package_a.subpackage was mocked out during packaging but is being used in resource - obj.pkl in package obj. ``` This makes it significantly easier to fix mocked object errors as they all should appear at once. Test Plan: Imported from OSS Reviewed By: aivanou Differential Revision: D34932200 Pulled By: PaliC fbshipit-source-id: 7f12bd88dbfbad974fd04b5dcaba3203b5c68a04
|
Hey @PaliC. |
|
Sadly, this PR broke lint. I am reverting |
|
GHA had an outage this morning, if you look CI didn't run on this PR at all |
|
This pull request has been reverted by 577bf04. To re-land this change, please open another pull request, assignthe same reviewers, fix the CI failures that caused the revert and make sure that the failing CI runs on the PR by applying the proper ciflow label (e.g., ciflow/trunk). |
…object errors with the rest of the errors in PackageExporter"
Now instead of spitting out a NotImplemented Error when the Package Exporter finds an object for a mocked module, it combines these errors with the rest of the Packaging Errors of PackageExporter to get something like
```
torch.package.package_exporter.PackagingError:
* Module was mocked out, but is still being used in the package.Please intern or extern the mocked modules if objects are supposed to be inthe package.
package_a
Context: Object(s) '['PackageASubpackageObject']' from module package_a was mocked out during packaging but is being used in resource - obj.pkl in package obj.
package_a.subpackage
Context: Object(s) '['PackageASubpackageObject']' from module package_a.subpackage was mocked out during packaging but is being used in resource - obj.pkl in package obj.
```
This makes it significantly easier to fix mocked object errors as they all should appear at once.
[ghstack-poisoned]
|
@PaliC has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
…rs with the rest of the errors in PackageExporter (#74315) Summary: Pull Request resolved: #74315 Now instead of spitting out a NotImplemented Error when the Package Exporter finds an object for a mocked module, it combines these errors with the rest of the Packaging Errors of PackageExporter to get something like ``` torch.package.package_exporter.PackagingError: * Module was mocked out, but is still being used in the package.Please intern or extern the mocked modules if objects are supposed to be inthe package. package_a Context: Object(s) '['PackageASubpackageObject']' from module package_a was mocked out during packaging but is being used in resource - obj.pkl in package obj. package_a.subpackage Context: Object(s) '['PackageASubpackageObject']' from module package_a.subpackage was mocked out during packaging but is being used in resource - obj.pkl in package obj. ``` This makes it significantly easier to fix mocked object errors as they all should appear at once. Test Plan: Imported from OSS Reviewed By: d4l3k Differential Revision: D34951973 Pulled By: PaliC fbshipit-source-id: 01ee4ba3767967ef9a9bcd69ad86362ebc100b2d
|
Hey @PaliC. |
…rs with the rest of the errors in PackageExporter (#74315) Summary: Pull Request resolved: #74315 Now instead of spitting out a NotImplemented Error when the Package Exporter finds an object for a mocked module, it combines these errors with the rest of the Packaging Errors of PackageExporter to get something like ``` torch.package.package_exporter.PackagingError: * Module was mocked out, but is still being used in the package.Please intern or extern the mocked modules if objects are supposed to be inthe package. package_a Context: Object(s) '['PackageASubpackageObject']' from module package_a was mocked out during packaging but is being used in resource - obj.pkl in package obj. package_a.subpackage Context: Object(s) '['PackageASubpackageObject']' from module package_a.subpackage was mocked out during packaging but is being used in resource - obj.pkl in package obj. ``` This makes it significantly easier to fix mocked object errors as they all should appear at once. Test Plan: Imported from OSS Reviewed By: d4l3k Differential Revision: D34951973 Pulled By: PaliC fbshipit-source-id: 01ee4ba3767967ef9a9bcd69ad86362ebc100b2d (cherry picked from commit 900edd2)
Stack from ghstack (oldest at bottom):
Now instead of spitting out a NotImplemented Error when the Package Exporter finds an object for a mocked module, it combines these errors with the rest of the Packaging Errors of PackageExporter to get something like
This makes it significantly easier to fix mocked object errors as they all should appear at once.
Differential Revision: D34951973