Skip to content

Commit

Permalink
Docs/log/log clean up (#592)
Browse files Browse the repository at this point in the history
* • System
  - show_graph():
    fixed bug producing empty image for graphs with just one Mechanism
    added auto-recurrent projections

* • Log
  - added numpy_array output method

* -

* -

* -

* -

* -

* -

* -

* -

* -

* -

* -

* -

* -

* • Log
  - fixed bugs preventing logging during INITIALIZATION

* • Log
  - fixed bugs preventing logging during INITIALIZATION

* -

* -

* -

* -

* -

* • Log
  - logged_item, print_entries:  corrected to use 'value' rather than owner's name in reports

* • Log
  - logged_item, print_entries:  corrected to use 'value' rather than owner's name in reports

• Tests
  test_log:  added test_log_initialization

* • Log
  - _alias_owner_name:  added to used 'value' rather than owner's name in reports
  - nparray: bug fix to handle None values

• Tests
  test_log:  added test_log_initialization

* • Log
  - log_value: added

• Tests
  - test_multilayer: added test of log_value

* • Log
  - log_value: implemented
  - logged_item, print_entries:  corrected to use 'value' rather than owner's name in reports

• Tests
  - test_multilayer: added test of log_value

* • Log
  - log_value: implemented
  - logged_item, print_entries:  corrected to use 'value' rather than owner's name in reports

• Tests
  - test_multilayer: added test of log_value

* -

* • Log
  nparray(): fixed bug in which crashed if no log_entries

* • Log
  nparray(): fixed bug in reporting time in nparray output

* • Log
  docstring: fixed examples to reflect implementation of time field

* -

* -

* -

* -

* • Log
  - nparray(): fixed bug in handling of duplicate of time values
  - docstrings: examples updated for print_entries, csv and nparray outputs

* • Log
  - nparray(): fixed bug in handling of duplicate of time values
  - docstrings: examples updated for print_entries, csv and nparray outputs

* • Log
  - LogCondition.CONTROL can now be used

* • Log
  - LogCondition.CONTROL can now be used

* -
  • Loading branch information
jdcpni authored Dec 12, 2017
1 parent b0f3828 commit 9cff8ef
Show file tree
Hide file tree
Showing 5 changed files with 4,134 additions and 27 deletions.
16 changes: 5 additions & 11 deletions Scripts/Examples/EVC-Gratton.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@
import psyneulink as pnl


def test_search_function(controller=None, **kwargs):
result = np.array(controller.allocationPolicy).reshape(len(controller.allocationPolicy), -1)
return result


def test_outcome_function(**kwargs):
result = np.array([0])
return result


# Preferences:
mechanism_prefs = pnl.ComponentPreferenceSet(
prefs={
Expand Down Expand Up @@ -152,7 +142,7 @@ def test_outcome_function(**kwargs):
# Show characteristics of system:
mySystem.show()
mySystem.controller.show()
mySystem.show_graph(show_control=pnl.ALL, show_dimensions=pnl.ALL)
# mySystem.show_graph(show_control=pnl.ALL, show_dimensions=pnl.ALL)

# configure EVC components
mySystem.controller.control_signals[0].intensity_cost_function = pnl.Exponential(rate=0.8046).function
Expand Down Expand Up @@ -199,8 +189,12 @@ def test_outcome_function(**kwargs):

mySystem.controller.reportOutputPref = True

Flanker_Rep.set_log_conditions((pnl.SLOPE, pnl.LogCondition.CONTROL))

mySystem.run(
num_trials=nTrials,
inputs=stim_list_dict,
)

Flanker_Rep.log.print_entries()

Loading

0 comments on commit 9cff8ef

Please sign in to comment.