-
Notifications
You must be signed in to change notification settings - Fork 211
update pystiche dependency #642
update pystiche dependency #642
Conversation
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## master #642 +/- ##
==========================================
- Coverage 90.63% 90.63% -0.01%
==========================================
Files 173 173
Lines 9182 9179 -3
==========================================
- Hits 8322 8319 -3
Misses 860 860
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Two problems here:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @pmeier I fixed the issues:
- It wasn't pystiche getting cached, the error was just cause by the use of pystiche components in the type annotation despite pystiche not being installed
- Regarding JIT, we don't try to jit the loss, only the forward. The issue seems to be that JIT.trace first recurses over all callable attributes of the model to see if they have been marked for export. When it hits loss.encoder, that throws a runtime error which is then not caught. I think the
Multiple enocder attributes
error in pystiche could be replaced with an AttributeError rather than a RuntimeError in order to fix this. For now I have just removed the loss_fn and perceptual_loss attributes before jitting in the test.
Thanks for the input.
Oh, I see. Wouldn't it make a lot more sense to quote the annotations instead of providing mock modules? That way there is no runtime effect in case
That is a valid point. I'll go and fix this there and send a new patch here. |
What does this PR do?
This upgrades a couple of things regarding the
pystiche
dependency:pystiche==1.0.0
was released and now follows semantic versioning. Thus, It is reasonable to pin it to the current stable release.pystiche.ops
is deprecated in favor ofpystiche.loss
. Although everything should work as expected as is, without change the code will now emit deprecation warnings. All occurrences ofpystiche.ops
were replaced.pystiche
's default branch was changed frommaster
tomain
. A link was updated to reflect this.pystiche
should be written with a lowerp
. All occurrences in the documentation that did not do this were updated.Fixes # (issue)
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃