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

Surrogate Assisted Causal Testing #250

Merged
merged 60 commits into from
Jan 30, 2024
Merged

Surrogate Assisted Causal Testing #250

merged 60 commits into from
Jan 30, 2024

Conversation

rsomers1998
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Nov 27, 2023

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
⚠️ PYTHON black 29 1 1.05s
✅ PYTHON pylint 29 0 4.47s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@f-allian
Copy link
Contributor

Thanks for this @rsomers1998 - I'm just going to close this PR as it's causing the unit tests to fail. We'll still have access to your branch once we come to it

@f-allian f-allian closed this Nov 27, 2023
Copy link

codecov bot commented Dec 11, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (ed0b97a) 95.32% compared to head (48fd185) 95.69%.
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #250      +/-   ##
==========================================
+ Coverage   95.32%   95.69%   +0.37%     
==========================================
  Files          20       22       +2     
  Lines        1411     1557     +146     
==========================================
+ Hits         1345     1490     +145     
- Misses         66       67       +1     
Files Coverage Δ
causal_testing/specification/causal_dag.py 98.88% <100.00%> (+0.04%) ⬆️
...sal_testing/surrogate/causal_surrogate_assisted.py 100.00% <100.00%> (ø)
...l_testing/surrogate/surrogate_search_algorithms.py 100.00% <100.00%> (ø)
causal_testing/testing/estimators.py 90.28% <95.45%> (+0.44%) ⬆️

Continue to review full report in Codecov by Sentry.

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

@christopher-wild christopher-wild self-requested a review December 12, 2023 11:51
Copy link
Contributor

@christopher-wild christopher-wild left a comment

Choose a reason for hiding this comment

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

I've focused on the files that will become part of the framework, rather than the example specific files. Overall looks really good! Your use of typing, class layouts etc are all great.

Only subject we have to discuss before merging will be the dreaded unit tests

causal_testing/surrogate/causal_surrogate_assisted.py Outdated Show resolved Hide resolved
causal_testing/surrogate/causal_surrogate_assisted.py Outdated Show resolved Hide resolved
causal_testing/surrogate/surrogate_search_algorithms.py Outdated Show resolved Hide resolved
solution_dict[adj] = solution[idx + 1]
solutions.append((solution_dict, fitness, fitness_function.surrogate_model))

return max(
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the purpose of the itemgetter inside this max function? My understanding of itemgetter is that it defines a function which then you can use to get items from an object. But it doesn't appear to be 'getting' from anything

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Solutions is a tuple of (data, fitness, model). I use itemgetter here to tell the max function to use index 1 as the sorting key. Is there a better way of doing this?

Copy link
Contributor

Choose a reason for hiding this comment

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

For me to do

causal_testing/surrogate/surrogate_search_algorithms.py Outdated Show resolved Hide resolved
Copy link
Contributor

@f-allian f-allian left a comment

Choose a reason for hiding this comment

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

@f-allian to create the unit tests for these

Copy link
Contributor

@christopher-wild christopher-wild left a comment

Choose a reason for hiding this comment

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

Done with the linting with only 1 outstanding linting issue 😄

@f-allian f-allian added the enhancement New feature or request label Jan 17, 2024
@christopher-wild christopher-wild marked this pull request as ready for review January 30, 2024 09:07
@rsomers1998 rsomers1998 merged commit 4034519 into main Jan 30, 2024
7 checks passed
@rsomers1998 rsomers1998 deleted the surrogateassisted branch January 30, 2024 12:54
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
Development

Successfully merging this pull request may close these issues.

3 participants