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

feat(output): unifying execution of 'live' output handlers #459

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

eledhwen
Copy link
Contributor

@eledhwen eledhwen commented Oct 8, 2023

Following-up on discussion in #458

@eledhwen eledhwen marked this pull request as draft October 8, 2023 11:18
@eledhwen eledhwen changed the title Output: unifying execution of 'live' output handlers feat(output): unifying execution of 'live' output handlers Oct 8, 2023
codecarbon/emissions_tracker.py Outdated Show resolved Hide resolved
@eledhwen eledhwen force-pushed the feature/custom-handler-with-backport branch from 2679dbf to 9bd4bde Compare June 1, 2024 18:39
Copy link
Contributor

@inimaz inimaz left a comment

Choose a reason for hiding this comment

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

Good! I like it thanks!
You might have some conflicts when merging with master, since we have moved all the output_methods in output.py to a its own directory.

codecarbon/emissions_tracker.py Outdated Show resolved Hide resolved
codecarbon/output.py Outdated Show resolved Hide resolved
@eledhwen eledhwen force-pushed the feature/custom-handler-with-backport branch from 9bd4bde to 444d63f Compare June 6, 2024 21:06
@eledhwen
Copy link
Contributor Author

eledhwen commented Jun 6, 2024

Good! I like it thanks! You might have some conflicts when merging with master, since we have moved all the output_methods in output.py to a its own directory.

Indeed, I just rebased from master and re-dispatched the changes to the various output definitions.

@inimaz
Copy link
Contributor

inimaz commented Jun 7, 2024

Seeing the output of the CI ==> There are 2 things @eledhwen :

  1. Run hatch run dev:precommit-install and commit again, this will apply the correct formatting
  2. In file codecarbon/output_methods/base_output.py Change from codecarbon.output import TaskEmissionsData to from codecarbon.output_methods.emissions_data import TaskEmissionsData==> to avoid circular dependencies.

@eledhwen eledhwen force-pushed the feature/custom-handler-with-backport branch from 5f7e615 to 8bfb56a Compare June 7, 2024 19:37
@eledhwen
Copy link
Contributor Author

eledhwen commented Jun 7, 2024

Seeing the output of the CI ==> There are 2 things @eledhwen :

  1. Run hatch run dev:precommit-install and commit again, this will apply the correct formatting
  2. In file codecarbon/output_methods/base_output.py Change from codecarbon.output import TaskEmissionsData to from codecarbon.output_methods.emissions_data import TaskEmissionsData==> to avoid circular dependencies.

Done ✅

@eledhwen eledhwen marked this pull request as ready for review June 7, 2024 19:41
@eledhwen eledhwen requested a review from inimaz June 7, 2024 19:41
@eledhwen eledhwen force-pushed the feature/custom-handler-with-backport branch 2 times, most recently from e9f7a5f to dda2b4f Compare June 10, 2024 20:56
… output management, rework BaseOutput with separate api contracts for live/cold/task calls
@eledhwen eledhwen force-pushed the feature/custom-handler-with-backport branch from dda2b4f to 69758cc Compare June 10, 2024 21:26
@eledhwen
Copy link
Contributor Author

@inimaz I also fixed the impacted tests, it should be good to go now.

@inimaz inimaz merged commit d0ed60b into mlco2:master Jun 12, 2024
8 checks passed
@inimaz
Copy link
Contributor

inimaz commented Jun 12, 2024

@eledhwen Thanks for the feature! Looks good.

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.

2 participants