Skip to content

Commit

Permalink
Fix/log/set log conditions bug (#596)
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

* -

* • Component
  - moved value property to Component (from Mechanism, Projection and State)
    (left an override on ControlSignal that needs it for the getter)

* • Log
  - docstring: added hint about using call_before_trial and call_after_trial
    to log values

* • Log
  - fixed failure to call _alias_owner_name in set_log_condtion
  • Loading branch information
jdcpni authored Dec 13, 2017
1 parent 637b697 commit 499eb8c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .idea/runConfigurations/scratch_1.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion psyneulink/globals/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ def assign_log_level(item, level):
raise LogError("\'{0}\' is not a loggable item for {1} (try using \'{1}.log.add_entries()\')".
format(item, self.owner.name))
try:
component = next(c for c in self.loggable_components if c.name == item)
component = next(c for c in self.loggable_components if self._alias_owner_name(c.name) == item)
component.logPref=PreferenceEntry(level, PreferenceLevel.INSTANCE)
except AttributeError:
raise LogError("PROGRAM ERROR: Unable to set LogCondition for {} of {}".format(item, self.owner.name))
Expand Down

0 comments on commit 499eb8c

Please sign in to comment.