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

Extend configuration space to act as mapping #191

Merged
merged 6 commits into from
Sep 1, 2021

Conversation

eddiebergman
Copy link
Contributor

@eddiebergman eddiebergman commented Sep 1, 2021

This PR extends ConfigurationSpace and Configuration classes to implement the Mapping interface . This makes them behave more like dictionaries, extending their functionality to allow config.items(), config.values() as well as features such as unpacking mydict = {**config}.

This PR also removes an old flake8 package which did not seem to do anything and which has now been replaced with native functionality in flake8.

Lastly, it renames a file that tested an irace writer which no longer seems to exist. This was renamed to that pytest will skip this file during its running.

There are 3 tests added, 2 to test the functionality described for Configuration and ConfigurationSpace and 1 to ensure the order of hyperparemeters for a Config matches those of the ConfigSpace, as advertised in the doc string.

@codecov
Copy link

codecov bot commented Sep 1, 2021

Codecov Report

Merging #191 (170229e) into master (1a23bd5) will increase coverage by 42.21%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #191       +/-   ##
===========================================
+ Coverage   24.11%   66.33%   +42.21%     
===========================================
  Files          17       17               
  Lines        1613     1613               
===========================================
+ Hits          389     1070      +681     
+ Misses       1224      543      -681     
Impacted Files Coverage Δ
ConfigSpace/nx/classes/graph.py 24.17% <0.00%> (+4.96%) ⬆️
ConfigSpace/nx/algorithms/dag.py 45.91% <0.00%> (+5.10%) ⬆️
ConfigSpace/nx/classes/digraph.py 39.57% <0.00%> (+11.06%) ⬆️
ConfigSpace/read_and_write/json.py 86.60% <0.00%> (+66.02%) ⬆️
ConfigSpace/read_and_write/pcs.py 85.47% <0.00%> (+70.95%) ⬆️
ConfigSpace/read_and_write/pcs_new.py 88.00% <0.00%> (+74.76%) ⬆️
...ace/nx/algorithms/components/strongly_connected.py 97.87% <0.00%> (+87.23%) ⬆️
ConfigSpace/nx/algorithms/cycles.py 100.00% <0.00%> (+89.36%) ⬆️

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 1a23bd5...170229e. Read the comment docs.

ConfigSpace/configuration_space.pyx Outdated Show resolved Hide resolved
test/test_configuration_space.py Outdated Show resolved Hide resolved
@mfeurer mfeurer merged commit df0737a into master Sep 1, 2021
@mfeurer mfeurer deleted the extend_configuration_space_to_act_as_mapping branch September 1, 2021 12:24
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