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

Overhaul logging and deprecate the compiler_gym.util.logs and compiler_gym.replay_search modules #453

Merged
merged 17 commits into from
Oct 11, 2021

Conversation

ChrisCummins
Copy link
Contributor

@ChrisCummins ChrisCummins commented Oct 6, 2021

  • Replaces the per-object logger instances with a per-module loggers created using logging.getLogger(__name__).
  • Moves the create_logs_dir() function into the compiler_gym.util.runfile_path module so that all of the functions for generating filesystem paths are in the same module. This also improves the implementation by enabling thread safe logging directory generation, and renames the function to create_user_logs_dir() to better communicate the type of logs.
  • Aggregates the random search utility classes and functions into the random_search module.
  • Add more verbose logging when installing new datasets / runtimes, fixes Use more verbose logging when performing one-time downloading / unpacking of datasets #445.

This moves the create_logs_dir() function into the runfile_path module
so that all of the functions for generating filesystem paths are in
the same module. This also improves the implementation by enabling
thread safe logging directory generation, and renames the function to
create_user_logs_dir() to better communicate the type of logs.
@ChrisCummins ChrisCummins added this to the v0.2.1 milestone Oct 6, 2021
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 6, 2021
@ChrisCummins ChrisCummins changed the title Deprecate the compiler_gym.util.logs and compiler_gym.replay_search modules Overhaul logging and deprecate the compiler_gym.util.logs and compiler_gym.replay_search modules Oct 6, 2021
@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2021

Codecov Report

Merging #453 (7594a71) into development (34c0933) will increase coverage by 0.03%.
The diff coverage is 79.81%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #453      +/-   ##
===============================================
+ Coverage        87.53%   87.56%   +0.03%     
===============================================
  Files              109      109              
  Lines             6047     6113      +66     
===============================================
+ Hits              5293     5353      +60     
- Misses             754      760       +6     
Impacted Files Coverage Δ
compiler_gym/bin/random_replay.py 0.00% <0.00%> (ø)
compiler_gym/leaderboard/llvm_instcount.py 92.78% <ø> (-0.08%) ⬇️
compiler_gym/random_replay.py 0.00% <0.00%> (-100.00%) ⬇️
compiler_gym/envs/llvm/datasets/cbench.py 77.44% <20.00%> (-1.71%) ⬇️
compiler_gym/envs/llvm/llvm_benchmark.py 86.57% <33.33%> (-0.50%) ⬇️
compiler_gym/service/connection.py 77.02% <38.09%> (-0.56%) ⬇️
compiler_gym/envs/gcc/datasets/csmith.py 92.04% <50.00%> (+0.09%) ⬆️
compiler_gym/envs/llvm/datasets/csmith.py 88.40% <50.00%> (+0.17%) ⬆️
compiler_gym/envs/llvm/datasets/poj104.py 39.68% <66.66%> (+1.97%) ⬆️
compiler_gym/util/logs.py 90.90% <75.00%> (+28.40%) ⬆️
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34c0933...7594a71. Read the comment docs.

This aggregates the random search utility classes and functions into
the random_search module. This effectively deprecates the
compiler_gym.random_replay and compiler_gym.util.logs modules.
This replaces the per-object instances of loggers with a shared
per-module logger, accessed using logging.getLogger(__name__). The
idea is to improve the consistency of logging.
ChrisCummins added a commit to ChrisCummins/CompilerGym that referenced this pull request Oct 11, 2021
@ChrisCummins ChrisCummins merged commit 4d8e4dd into facebookresearch:development Oct 11, 2021
@ChrisCummins ChrisCummins deleted the logs branch October 11, 2021 22:42
ChrisCummins added a commit that referenced this pull request Nov 8, 2021
This was referenced Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use more verbose logging when performing one-time downloading / unpacking of datasets
3 participants