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

Add optional strict argument to Type.is_valid_value #995

Merged

Conversation

brandonwillard
Copy link
Member

This PR fixes the RandomType by making RandomType.is_valid_value depend on RandomType.filter, as the base Type implementation does. It also adds some typing information to RandomType.

Closes #992

@brandonwillard brandonwillard self-assigned this Jun 14, 2022
@brandonwillard brandonwillard added bug Something isn't working important random variables Involves random variables and/or sampling typing Work related to type checking labels Jun 14, 2022
@brandonwillard brandonwillard changed the title Add optional strict to Type.is_valid_value Add optional strict argument to Type.is_valid_value Jun 14, 2022
@codecov
Copy link

codecov bot commented Jun 14, 2022

Codecov Report

Merging #995 (a2e37ab) into main (174117f) will decrease coverage by 0.00%.
The diff coverage is 93.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #995      +/-   ##
==========================================
- Coverage   79.27%   79.26%   -0.01%     
==========================================
  Files         152      152              
  Lines       47937    47932       -5     
  Branches    10915    10914       -1     
==========================================
- Hits        38000    37995       -5     
  Misses       7429     7429              
  Partials     2508     2508              
Impacted Files Coverage Δ
aesara/tensor/random/type.py 90.62% <93.33%> (-0.47%) ⬇️
aesara/graph/type.py 93.75% <100.00%> (ø)

@brandonwillard brandonwillard merged commit 08c97f3 into aesara-devs:main Jun 14, 2022
@brandonwillard brandonwillard deleted the fix-random-type-is_valid_value branch June 14, 2022 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working important random variables Involves random variables and/or sampling typing Work related to type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error w/ deepcopy of pymc v4 model
2 participants