-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* • composition.py - create_cim_ports(): - assign as internal_only input_ports on the input_CIM of a nested Composition that receive projections from Nodes in the enclosing Composition - prune any errant projections to input_CIM - modify check for errant afferents to input_CIM to only include projections in current Composition - add_linear_processing_pathway: - don't implement MappingProjection for ControlMechanism -> next node (and warn about this) - _determine_node_roles: - assign as INPUT Node any Mechanism with no path_afferents (other than ControlMechansisms) - assign as INPUT Node any Mechanism with no path_afferents (other than ControlMechansisms or from input_CIM) (this prevents assignment of ModulatoryProjection from masking role as INPUT Node) - add_linear_processing_pathway(): - use graph.connect_components to assign dependence of receiver on sender before ControlMechanism in pathway - _check_nested_target_mechs(): implement, so can be overridden in autodiffcomposition.py - add graph edge between control mechanisms in pathway • compositioninterfacemechanism.py - add_ports: make adding from command line an error • showgraph.py - fix bug in representation of ControlProjections vs. MappingProjections - assign standard arrow/color to errant MappingProjections from ControlMechanism (to expose them; were previously assigned attributes of ControlProjection) - remove checks for MappingProjection in representation of ControlMechanism efferents (since sometimes, e.g. for projection to parameter_CIM of nested Composition for iconfied nested comp) the should be shown as ControlProjections • autodiffcomposition.py • test_force_two_control_mechanisms_as_OUTPUT(): reinstate assertion that ctl_mech_B is TERMINAL • test_autodiffcomposition.py - test_direct_input_to_nested(): modify to test for successful execution * [skip ci] • composition.py: - add_linear_processing_pathway(): - use graph.connect_components to assign dependence of receiver on sender before ControlMechanism in pathway - _check_nested_target_mechs(): implement, so can be overridden in autodiffcomposition.py - _get_input_receivers(): restrict to Nodes that have direct inputs from outermost Composition (i.e., the "environment") • compositioninterfacemechanism.py - _get_source_node_for_input_CIM(): return None if source is input to outermost Composition (i.e., the "environment") • autodiffcomposition.py - __init__(): deal with assignment of _is_input to pytorch_nodes - _check_nested_target_mechs(): override; not needed since comps with nested comps are flattened • autodiffcomposition.py • composition.py - add_linear_processing_pathway: - if ControlMechanism is first in a pathway, add warning that one after it is now the first - if ControlMechanism is not the first, add MappingProjection from its sender to its receiver and warn - _determine_node_roles: refactor to deal with OUTPUT CYCLE - _check_for_unused_projections: make warning depend on verbosePref==True - additions and mods to source and destination tracking methods. - support direct and indirect pathways to/from nested Compositions - bug fixes for validation of input_dict shapes for nested comps • autodiffcomposition.py - __init__(): deal with assignment of _is_input to pytorch_nodes - learn(): - error for learning with non-Autodiff composition - error for learning with nested in Python mode - additions and mods to source and destination tracking methods. - support direct and indirect pathways to/from nested Compositions - _parse_learning_spec(): override to support inputs dict for flatted Composition - _check_nested_target_mechs(): override; not needed since comps with nested comps are flattened - _parse_learning_spec(): - override to support inputs dict for flatted Composition - docstring mods • test_autodiff_composition.py add test_error_for_running_nested_learning_in_Python_mode - add test_one_time_warning_for_run_with_no_inputs - add test_no_learning_of_spanning_nested_compositions - add test_nested_autodiff_learning_with_input_func - some consolidation in _get_pytorchbackprop_pathway() - test_asymmetric_inputs_to_nested_one_direct_one_via_node_in_outer_comp: PASSES - test_direct_input_to_nested(): modify to test for successful execution • pathway.py update docstring re: handling of ControlMechanism --------- Co-authored-by: jdcpni <pniintel55> Co-authored-by: Katherine Mantel <[email protected]>
- Loading branch information
Showing
23 changed files
with
1,227 additions
and
517 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.