Skip to content

Conversation

@suo
Copy link
Member

@suo suo commented Feb 9, 2021

Stack from ghstack:

See comments in code.

Differential Revision: D26340592

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Feb 9, 2021

💊 CI failures summary and remediations

As of commit 1bf3670 (more details on the Dr. CI page):


  • 5/5 failures possibly* introduced in this PR
    • 3/5 non-scanned failure(s)

🕵️ 2 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See CircleCI build pytorch_linux_xenial_py3_clang7_onnx_ort_test1 (1/2)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

Error: No such container:path: d36760ab16b7c2078caa57594303a4007696cc14a8f633e29e4ee39acfaae8c8:/var/lib/jenkins/workspace/test/.coverage
Feb 19 01:22:58     * d903106bad          0 reports
Feb 19 01:22:58     * 3978ffb37a          0 reports
Feb 19 01:22:58     |
Feb 19 01:22:58     :
Feb 19 01:22:58 
Feb 19 01:22:58 Removed  (across    0 suites)     0 tests, totaling     0.00s
Feb 19 01:22:58 Modified (across    0 suites)     0 tests, totaling     0.00s
Feb 19 01:22:58 Added    (across    0 suites)     0 tests, totaling     0.00s
Retrieving test reports
Retrieving Python coverage report
Error: No such container:path: d36760ab16b7c2078caa57594303a4007696cc14a8f633e29e4ee39acfaae8c8:/var/lib/jenkins/workspace/test/.coverage


Exited with code exit status 1

See CircleCI build pytorch_linux_xenial_py3_clang7_onnx_ort_test2 (2/2)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

Error: No such container:path: f30409a1a803c24de381ca21e58966b04e152a781be1d6355e5165c587010e1d:/var/lib/jenkins/workspace/test/.coverage
Feb 19 01:22:19     * d903106bad          0 reports
Feb 19 01:22:19     * 3978ffb37a          0 reports
Feb 19 01:22:19     |
Feb 19 01:22:19     :
Feb 19 01:22:19 
Feb 19 01:22:19 Removed  (across    0 suites)     0 tests, totaling     0.00s
Feb 19 01:22:19 Modified (across    0 suites)     0 tests, totaling     0.00s
Feb 19 01:22:19 Added    (across    0 suites)     0 tests, totaling     0.00s
Retrieving test reports
Retrieving Python coverage report
Error: No such container:path: f30409a1a803c24de381ca21e58966b04e152a781be1d6355e5165c587010e1d:/var/lib/jenkins/workspace/test/.coverage


Exited with code exit status 1


ci.pytorch.org: 2 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

@suo suo requested a review from zdevito February 9, 2021 16:31
suo added 3 commits February 9, 2021 09:10
…ollisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
…ollisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
…ollisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
Copy link
Contributor

@zdevito zdevito left a comment

Choose a reason for hiding this comment

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

I have a bunch of somewhat disparate minor comments to try to clean up the API.

@suo suo requested a review from zdevito February 11, 2021 18:01
suo added 5 commits February 12, 2021 09:28
…ollisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
…ollisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
…ollisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
…ollisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
…e collisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
@suo suo changed the title [package] Introduce ModuleEnv to manage module namespace collisions. [package] Introduce BaseImporter to manage module namespace collisions. Feb 16, 2021
@suo suo changed the title [package] Introduce BaseImporter to manage module namespace collisions. [package] Introduce Importer to manage module namespace collisions. Feb 16, 2021
…e collisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
@suo suo changed the title [package] Introduce Importer to manage module namespace collisions. [package] Introduce BaseImporter to manage module namespace collisions. Feb 16, 2021
@suo suo changed the title [package] Introduce BaseImporter to manage module namespace collisions. [package] Introduce Importer to manage module namespace collisions. Feb 16, 2021
…e collisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
@suo suo changed the title [package] Introduce Importer to manage module namespace collisions. [package] Introduce BaseImporter to manage module namespace collisions. Feb 16, 2021
suo added 3 commits February 16, 2021 12:39
…e collisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
…e collisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
…e collisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
@suo suo changed the title [package] Introduce BaseImporter to manage module namespace collisions. [package] Introduce Importer to manage module namespace collisions. Feb 16, 2021
Copy link
Contributor

@zdevito zdevito left a comment

Choose a reason for hiding this comment

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

Cool! Just a couple minor things inline.

ObjNotFoundError: we couldn't retrieve `obj by name.
ObjMisMatchError: we found a different object with the same name as `obj`.
"""
if name is None and obj and _Pickler.dispatch.get(type(obj)) is None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Because this is the start of this function, and because it is only called in one place from our custom pickler, I think it should go in that function and not here. I can see this accidentally firing for weird objects in other places.

Copy link
Contributor

Choose a reason for hiding this comment

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

Does that make sense or am I not understanding what the string version of reduce does?

Copy link
Member Author

Choose a reason for hiding this comment

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

afaict we need this here, because __reduce__ -> str is one way that objects can signal that they want to be global'd as a different name than what the pickler might infer. I ran across this when trying to package references to typing.List and friends in FX.

We can put equivalent logic in the import string formatter in GraphModule, but it made more sense to put it here and leave clients of the code unaware of this detail.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, I get it now. Given that definition of what it does, then it is in the right place.

return importer.get_name(obj, name)
except ObjNotFoundError as err:
last_err = err

Copy link
Contributor

Choose a reason for hiding this comment

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

we don't need it for this patch, but if you catch a ObjMismatchError here, then you can keep looking for the object, and if you succeed, you can report that the earlier importer shadowed the importer that you needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah good idea. Right now we use the package mangling as an implementation detail to give a good message, but it would be better to do it without that knowledge.

…e collisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
@suo suo changed the title [package] Introduce Importer to manage module namespace collisions. [package] Introduce BaseImporter to manage module namespace collisions. Feb 16, 2021
suo added 6 commits February 17, 2021 14:25
…e collisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
…e collisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
…e collisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
…e collisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
…e collisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
…e collisions."

See comments in code.

Differential Revision: [D26340592](https://our.internmc.facebook.com/intern/diff/D26340592)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

@suo merged this pull request in d5ac929.

@facebook-github-bot facebook-github-bot deleted the gh/suo/401/head branch February 23, 2021 15:16
iramazanli pushed a commit to iramazanli/pytorch that referenced this pull request Feb 23, 2021
…ytorch#51975)

Summary:
Pull Request resolved: pytorch#51975

See comments in code.

Test Plan: Imported from OSS

Reviewed By: zdevito

Differential Revision: D26340592

Pulled By: suo

fbshipit-source-id: 61b16bafad15e19060710ad2d8487c776d672847
aocsa pushed a commit to Quansight/pytorch that referenced this pull request Mar 15, 2021
…ytorch#51975)

Summary:
Pull Request resolved: pytorch#51975

See comments in code.

Test Plan: Imported from OSS

Reviewed By: zdevito

Differential Revision: D26340592

Pulled By: suo

fbshipit-source-id: 61b16bafad15e19060710ad2d8487c776d672847
xsacha pushed a commit to xsacha/pytorch that referenced this pull request Mar 31, 2021
…ytorch#51975)

Summary:
Pull Request resolved: pytorch#51975

See comments in code.

Test Plan: Imported from OSS

Reviewed By: zdevito

Differential Revision: D26340592

Pulled By: suo

fbshipit-source-id: 61b16bafad15e19060710ad2d8487c776d672847
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.

3 participants