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 Dependency Caching #1239

Merged
merged 23 commits into from
Mar 23, 2023
Merged

🧰♻️ Add Dependency Caching #1239

merged 23 commits into from
Mar 23, 2023

Conversation

mberr
Copy link
Member

@mberr mberr commented Mar 16, 2023

This PR enables caching for dependencies installed via pip, cf. https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows

It also updates the code to be torch 2.0 compliant.

@mberr mberr marked this pull request as ready for review March 16, 2023 20:11
@mberr mberr marked this pull request as draft March 16, 2023 20:28
@mberr mberr marked this pull request as ready for review March 16, 2023 20:28
@mberr mberr marked this pull request as draft March 16, 2023 21:27
@mberr mberr marked this pull request as ready for review March 16, 2023 21:27
@mberr mberr marked this pull request as draft March 20, 2023 19:13
@mberr mberr marked this pull request as ready for review March 20, 2023 19:13
@mberr mberr marked this pull request as draft March 20, 2023 19:59
@mberr mberr marked this pull request as ready for review March 20, 2023 19:59
@mberr mberr requested a review from cthoyt March 22, 2023 20:13
@mberr mberr marked this pull request as draft March 22, 2023 20:38
@mberr mberr marked this pull request as ready for review March 22, 2023 20:38
@mberr mberr marked this pull request as draft March 22, 2023 20:39
@mberr mberr marked this pull request as ready for review March 22, 2023 20:39
Comment on lines +37 to +38
# fixme: bring this upstream to class_resolver.contrib?
lr_scheduler_resolver = ClassResolver.from_subclasses(LRScheduler, default=ExponentialLR, suffix="LR")
Copy link
Member Author

Choose a reason for hiding this comment

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

@cthoyt this could be fixed in class-resolver upstream; we could also think about adding some logic to make this work in torch>=2.0 and torch < 2, though I am not sure whether to do that.

Copy link
Member

Choose a reason for hiding this comment

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

i like the idea of adding more contrib to class-resolver. If it's no so hard to make compatibility, then great, otherwise we should aim for only supporting the latest version

Comment on lines +14 to +15
# fixme: find reason / enforce single-thread
@unittest.skipIf(condition=True, reason="Problems with multi-processing")
Copy link
Member Author

Choose a reason for hiding this comment

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

I couldn't resolve this issue, and this PR/test case failure seems to block others.

Copy link
Member

Choose a reason for hiding this comment

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

this is fine for me

.github/workflows/common.yml Show resolved Hide resolved
Comment on lines +37 to +38
# - name: Check RST format
# run: tox -e doclint
Copy link
Member Author

Choose a reason for hiding this comment

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

defined in tox, but not used in CI

Copy link
Member

@cthoyt cthoyt left a comment

Choose a reason for hiding this comment

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

Good enough for now, thanks for looking into all of these corner cases

@cthoyt cthoyt marked this pull request as draft March 22, 2023 22:35
@cthoyt cthoyt marked this pull request as ready for review March 22, 2023 22:35
@cthoyt
Copy link
Member

cthoyt commented Mar 22, 2023

@mberr we can do follow-up to fix the class-resolver contrib. We might also have to change the "required" tests configuration for the protections on the master branch, but then this is good from my side to merge.

@mberr mberr merged commit b253678 into master Mar 23, 2023
@mberr mberr deleted the caching-package-deps branch March 23, 2023 08:26
cthoyt pushed a commit to cthoyt/class-resolver that referenced this pull request Mar 23, 2023
With torch 2.0, the (private) `_LRScheduler` class has been transformed
to a public `LRScheduler` class.

cf. pykeen/pykeen#1239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants