Skip to content
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

Guard Symbol and ShapeGuardPrinter behind HAS_SYMPY #90704

Closed
wants to merge 1 commit into from

Conversation

seemethere
Copy link
Member

@seemethere seemethere commented Dec 12, 2022

Signed-off-by: Eli Uriegas eliuriegas@meta.com

Follow up to #90528

Fixes #90696

Signed-off-by: Eli Uriegas <eliuriegas@meta.com>
@pytorch-bot pytorch-bot bot added the release notes: fx release notes category label Dec 12, 2022
@pytorch-bot
Copy link

pytorch-bot bot commented Dec 12, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/90704

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 Failures

As of commit a6cd8e2:

The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@seemethere seemethere requested review from ezyang and a team December 12, 2022 17:42
Copy link
Contributor

@weiwangmeta weiwangmeta left a comment

Choose a reason for hiding this comment

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

LGTM

assert isinstance(expr, Symbol), str(type(expr))
assert expr in self.symbol_to_source, f"{expr} (could be from {expr.snames}) not in {self.symbol_to_source}"
return self.symbol_to_source[expr][0]
if HAS_SYMPY:
Copy link
Contributor

Choose a reason for hiding this comment

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

is this system env variable ?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's declared at the top of the file near the sympy import

Copy link
Member Author

Choose a reason for hiding this comment

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

try:
import sympy # type: ignore[import]
from sympy.printing.precedence import precedence # type: ignore[import]
from sympy.printing.str import StrPrinter # type: ignore[import]
HAS_SYMPY = True
except ImportError:
HAS_SYMPY = False

Copy link
Contributor

@atalman atalman left a comment

Choose a reason for hiding this comment

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

LGTM

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.

LGTM, but considering that SYMPY is now a mandatory dep, should we really have this guard?

@seemethere
Copy link
Member Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Dec 13, 2022
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 2 additional jobs have failed, first few of them are: trunk ,trunk / linux-bionic-cuda11.7-py3.10-gcc7 / test (distributed, 1, 3, linux.8xlarge.nvidia.gpu)

Details for Dev Infra team Raised by workflow job

@seemethere
Copy link
Member Author

@pytorchbot merge -f"flaky failure for distributed tests, #73315"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: fx release notes category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pytorch nightly conda builds for Linux and Windows failing
5 participants