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

Move tasks code inside entry files #421

Merged
merged 8 commits into from
Aug 22, 2022
Merged

Move tasks code inside entry files #421

merged 8 commits into from
Aug 22, 2022

Conversation

ashleve
Copy link
Owner

@ashleve ashleve commented Aug 20, 2022

What does this PR do?

Moves tasks code inside entry files. Removes the tasks folder.
Related to #404

Motivation:

  • Each entry file is always paired with task file so the split is redundant.
  • More minimalistic template

Drawbacks:

  • Slower shell tab completion due to no longer existing possibility of nesting imports inside @hydra.main decorated function
  • pyrootutils.setup_root() now gets executed every time the task method is imported in other files (which can happen in tests) because the line must be placed at the beginning of the file. This shouldn't break the tests though as far as I'm aware.

Before submitting

  • Did you make sure title is self-explanatory and the description concisely explains the PR?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you test your PR locally with pytest command?
  • Did you run pre-commit hooks with pre-commit run -a command?

Did you have fun?

Always 🙃

@ashleve ashleve self-assigned this Aug 20, 2022
@ashleve ashleve changed the title Move task code inside entry files Move tasks code inside entry files Aug 20, 2022
@codecov-commenter
Copy link

codecov-commenter commented Aug 20, 2022

Codecov Report

Merging #421 (37e86ce) into main (c4dde48) will increase coverage by 1.68%.
The diff coverage is 94.44%.

@@            Coverage Diff             @@
##             main     #421      +/-   ##
==========================================
+ Coverage   82.90%   84.59%   +1.68%     
==========================================
  Files          11        9       -2     
  Lines         351      344       -7     
==========================================
  Hits          291      291              
+ Misses         60       53       -7     
Impacted Files Coverage Δ
src/eval.py 90.32% <92.85%> (+90.32%) ⬆️
src/train.py 95.83% <95.45%> (-4.17%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ashleve ashleve merged commit 27b1392 into main Aug 22, 2022
@ashleve ashleve deleted the remove-task-folder branch August 22, 2022 11:53
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.

None yet

2 participants