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

Include CodeCarbon to PyExperimenter #120

Closed
5 tasks done
tornede opened this issue Apr 17, 2023 · 2 comments · Fixed by #128
Closed
5 tasks done

Include CodeCarbon to PyExperimenter #120

tornede opened this issue Apr 17, 2023 · 2 comments · Fixed by #128
Assignees
Labels
enhancement New feature or request

Comments

@tornede
Copy link
Owner

tornede commented Apr 17, 2023

The execution of experiment functions should be tracked with CodeCarbon. The configuration of CodeCarbon should be done within the same file than the one for PyExperimenter, but within a new section. Furthermore, the results should be written into a separate table, similar to logtables.

Extend configuration

The experiment configuration will be extended by a section for CodeCarbon.

[PY_EXPERIMENTER]
...

[codecarbon]
... 

Default CodeCarbon configuration

In case no CodeCarbon configuration is given in PyExperimenter experiment configuration file, use the following:

measure_power_secs = 15
tracking_mode = process
log_level = error
save_to_file = true
output_dir = output/CodeCarbon

Offline mode

In case of offline_mode=True and no specified parameters for offline mode, an exception should be raised giving a concrete example of the parameters needed for offline mode, as well as a link to the CodeCarbon Documentation

# Parameters for offline mode
country_iso_code = DEU

Update experimenter execution

  • The execution call of each experiment will be tracked by CodeCarbon, writing the final results into a separate table <table_name>_codecarbon (Note: a single _ to distinguish from logtables)
  • A method to get the CodeCarbon table has to be added: get_codecarbon()
@tornede tornede added the enhancement New feature or request label Apr 17, 2023
@LukasFehring
Copy link
Collaborator

I just started the implementation of this issue

@LukasFehring
Copy link
Collaborator

LukasFehring commented May 19, 2023

I finished the implementation and started to work on the documentation. Note that a few issues remain which will be fixed soon:

  • add codecarbon notebook
  • adapt codecarbon notebooks
  • add codecarbon to documentation
  • adapt documentation
  • test for codecarbon config file structure
  • test for raising offline mode error
  • test delete all tables
  • integration test for codecarbon

@tornede tornede linked a pull request Jun 23, 2023 that will close this issue
@tornede tornede closed this as completed Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants