-
Notifications
You must be signed in to change notification settings - Fork 113
[DRAFT] Abstract Class for PopMember #440
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
base: master
Are you sure you want to change the base?
Conversation
This commit introduces a new abstract type () for Population Members. This allows us to track additional information for each PopMember item. For instance, if we want to track the type of mutation that contributes most to each PopMember's performance.
…l into extend-popmember
…tPopMember around. Long-term fix seems to be to move information in the metadata field of expression instead.
Benchmark Results
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
Sounds good to me!
Hm. There's probably a way to fix this.
I think we should just pick whatever is most semantically correct, and make it work. For So with this in mind, I guess |
) where {D<:Dataset} | ||
_validate_options(datasets, ropt, options) | ||
state = _create_workers(datasets, ropt, options) | ||
state = _create_workers(PopMember, datasets, ropt, options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. This might be why its unstable. This should probably be the fully parametrized type. Like PopMember{T,L,N}
or whatever.
I would actually recommend storing the pop member type in options
, then you can just get it directly from there without needing to pass it around. So you would write this as options.popmember_type{T,L,E}
or whatever.
Though ideally you would have a dedicated function that turns PopMember
into PopMember{T,L,N}
like with_type_parameters{::Type{<:AbstractPopMember}, options, dataset, ropt)
so that if someone's type has additional type parameters, they can override the behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. This is similar to how node_type
and expresison_type
are passed around. I can rework the code with this in mind.
Sounds good. I'll make the necessary changes and push again. I wasn't impressed with the benchmarking results either so I definitely need to rework this to remove the |
Ping on this; want any help just let me know |
Hey sorry for the delay on this. I'm going to restart work in this and hope to have it in a merge-able state end of the week. |
@MilesCranmer . Apologies but I don't think I'll have the bandwidth to finish this PR until the end of September (hopefully in time for v2.1, if I can't make v2.0). |
This adds an abstract type
AbstractPopMember
. Right now, there is no clean way to store additional metadata that is relevant for calculating statistics of how each population is evolving. This PR serves as a first step towards a provenance framework. It enables subtyping the pop-member object to track additional information about each population member node.Some issues (this PR should NOT be merged until we have concrete answers for these questions)
AbstractPopMember
: Is this functionality desired in SR.jl?get_pareto_frontier
,extract_from_worker
, etc.). I've marked them as unstable right now. I'm hoping they don't have a big hit in benchmarking but if they do, then we'll need to take a closer look.metadata
entry inSymbolicExpression
objects instead. This is slightly unwieldy as I'll need to unpack and repack the PopMember objects during themutate!
calls when the metadata is updated. I want to consider this before moving forward.