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

Refactor/ocm/state features param #2323

Merged
merged 258 commits into from
Feb 16, 2022
Merged

Conversation

jdcpni
Copy link
Collaborator

@jdcpni jdcpni commented Feb 16, 2022

• optimizationcontrolmechanism.py:

  • add state_feature_specs as structural Parameter
  • parse state_features in Parameters._parse_state_feature_specs
  • assign specification of state_features arg in constructor to state_feature_specs.spec

jdcpni and others added 30 commits November 4, 2021 11:36
  added feature_input_ports attribute and num_feature_input_ports property
  added feature_input_ports attribute and num_feature_input_ports property

• parameterestimationcomposition.py: fixed misplacement of its Parameters() attribute
  added feature_input_ports attribute and num_feature_input_ports property

• parameterestimationcomposition.py: fixed misplacement of its Parameters() attribute

• optimizationfunctions.py: made num_estimates a Parameter
  - _instantiate_control_signals: random_seeds -> random_seed_mod_values
  - _add_controller:  modifying to instantiate feature_input_ports if none are specified
  - add_controller:  now adds feature_input_ports for Compostion INPUT nodes if not state_features not specified
  - _add_controller:  modifying to instantiate feature_input_ports if none are specified
  - add_controller:  assign simulation_input_ports
  - feature_input_ports -> state_input_ports
  - _instantiate_input_ports():
      state_features only allowed to specifying state_input_ports if
      agent_rep is a CompositionFunctionApproximator (i.e., model-free optimization)

• composition.py:
  - add_controller: adds state_input_ports to shadow INPUT Nodes of Composition
    if controller.agent_rep is Composition (model-based optimziation)
    or state_features have not been specified (for model-free optimizaton)
  _instantiate_input_ports:
     reinstate allowance of state_features specification if agent_rep is a Composition
     (i.e., model-based optimization) as long as they are all INPUT Nodes of agent_rep
  - _gen_llvm_evaluate_function: num_estimates -> num_estimates_per_trial
  - _gen_llvm_evaluate_function: num_estimates -> num_trial_per_estimate
…rincetonUniversity/PsyNeuLink into refactor/ocm/state_input_ports

� Conflicts:
�	psyneulink/core/components/mechanisms/modulatory/control/optimizationcontrolmechanism.py
  - _gen_llvm_evaluate_function: num_estimates -> num_trials_per_estimate
  - correct path ref

• compositioninterfacemechanism.py:
  - docstring fixes
…Link into devel

� Conflicts:
�	psyneulink/core/components/mechanisms/processing/compositioninterfacemechanism.py
  - add state_feature_spec parameter that is assigned value of state_features arg specified in constructor
  - replace self._state_feature_specs_parsed with assignments to self.state_feature_specs Parameter (using .spec for user-assigned values):

Problems:

1) .spec is a copy, so that evaluation of specified objects fails (e.g., determining whether a specified Mechanism is in the list of INPUT node of agent_rep returned by _get_agent_rep_input_nodes(), as in _validate_input_nodes())

2) fails in LLVM, even if state_parameter_specs Parameter is included in blacklist in Component._get_compilation_params
@coveralls
Copy link

Coverage Status

Coverage increased (+0.006%) to 84.365% when pulling 3e7b742 on refactor/ocm/state_features_param into dbe6a4c on devel.

@jdcpni jdcpni merged commit a58b1e5 into devel Feb 16, 2022
@jdcpni jdcpni deleted the refactor/ocm/state_features_param branch February 16, 2022 13:02
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.

None yet

4 participants