-
Notifications
You must be signed in to change notification settings - Fork 31
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
Learning resources #2918
Comments
Thanks for your interest. The Scripts does indeed have quite a few outdated scripts (there for reference / legacy, useful as part of the development process… probably should be thinned out!). The best way to get initially familiarized is to read through the Basic and Primer<https://princetonuniversity.github.io/PsyNeuLink/BasicsAndPrimer.html#> in the docs<https://princetonuniversity.github.io/PsyNeuLink/>. You can also run the tutorial that can be accessed from the main PsyNeuLink landing page<http://psyneulink.org/>, user the tutorial tab<http://www.psyneuln.deptcpanel.princeton.edu/tutorial/>. Please let us know if you have any problem accessing or interacting with these items. Best.
jdc
On Feb 22, 2024, at 4:41 AM, JackCaster ***@***.***> wrote:
Hi, I stumbled upon this repo and I got excited by the opportunities in using it. I have no formal cognitive modelling training, so I am trying to get up and running by reading some of the examples you shared in the Scripts folder. Unfortunately, most of them do not run. Reasons include missing function, API changes, ... Can you recommend some resources (tutorials, simple implementations) to learn about Psyneulink?
—
Reply to this email directly, view it on GitHub<#2918>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACSHKGFZRMNTKTBATL5TQ3LYU4HEJAVCNFSM6AAAAABDUTAPXWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2DQNRTGYZTANQ>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
I tried the tutorial but that seems outdated too. For example, in the section "Organizing into Processes" I get:
I'll try with the Primer in the doc now. |
Thanks! We will look into that error in the tutorial.
jdc
On Feb 27, 2024, at 8:12 AM, JackCaster ***@***.***> wrote:
I tried the tutorial but that seems outdated too. For example, in the section "Organizing into Processes" I get:
Traceback (most recent call last):
File "/workspaces/accumulate/scrapbook/psyneulink/hello-world.py", line 18, in <module>
linear_transfer_process = pnl.Process(pathway=[linear_transfer_mechanism])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/project/lib/python3.11/site-packages/psyneulink/__init__.py", line 107, in Process
show_warning_sys_and_proc_warning()
File "/opt/conda/envs/project/lib/python3.11/site-packages/psyneulink/__init__.py", line 110, in show_warning_sys_and_proc_warning
raise ComponentError(f"'System' and 'Process' are no longer supported in PsyNeuLink; "
psyneulink.core.components.component.ComponentError: 'System' and 'Process' are no longer supported in PsyNeuLink; use 'Composition' and/or 'Pathway' instead
(project) ***@***.***:/workspaces/accumulate#
I'll try with the Primer in the doc now.
—
Reply to this email directly, view it on GitHub<#2918 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACSHKGGQFZWFIB4RYJ7QEWTYVXLSJAVCNFSM6AAAAABDUTAPXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRWGUYTOOBXGA>.
You are receiving this because you commented.Message ID: ***@***.***>
|
I am going through the Basics and primer but got stuck at Dynamics of Execution: # Modify consruction of decision Mechanism:
decision = DDM(name='DECISION',
input_format=ARRAY,
reset_stateful_function_when=AtTrialStart(),
function=DriftDiffusionIntegrator(noise=0.5, threshold=20)
)
Stroop_model.run(inputs={color_input:red, word_input:green, task_input:color},
termination_processing={TimeScale.TRIAL: WhenFinished(decision)}
)
print (Stroop_model.results) but received the error:
Would you be able to help? |
Sorry for all the sticking points, but appreciate your taking the time to work through the materials. I will try to look at this later today.
jdc
On Feb 28, 2024, at 4:53 AM, JackCaster ***@***.***> wrote:
I am going through the Basics and primer but got stuck at Dynamics of Execution<https://princetonuniversity.github.io/PsyNeuLink/BasicsAndPrimer.html#dynamics-of-execution>:
# Modify consruction of decision Mechanism:
decision = DDM(name='DECISION',
input_format=ARRAY,
reset_stateful_function_when=AtTrialStart(),
function=DriftDiffusionIntegrator(noise=0.5, threshold=20)
)
Stroop_model.run(inputs={color_input:red, word_input:green, task_input:color},
termination_processing={TimeScale.TRIAL: WhenFinished(decision)}
)
print (Stroop_model.results)
but received the error:
Traceback (most recent call last):
File "/workspaces/accumulate/scrapbook/psyneulink/hello-world.py", line 96, in <module>
Stroop_model.run(
File "/opt/conda/envs/project/lib/python3.11/site-packages/psyneulink/core/globals/context.py", line 749, in wrapper
raise e
File "/opt/conda/envs/project/lib/python3.11/site-packages/psyneulink/core/globals/context.py", line 742, in wrapper
return func(*args, context=context, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/project/lib/python3.11/site-packages/psyneulink/core/compositions/composition.py", line 11332, in run
trial_output = self.execute(inputs=execution_stimuli,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/project/lib/python3.11/site-packages/psyneulink/core/globals/context.py", line 749, in wrapper
raise e
File "/opt/conda/envs/project/lib/python3.11/site-packages/psyneulink/core/globals/context.py", line 742, in wrapper
return func(*args, context=context, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/project/lib/python3.11/site-packages/psyneulink/core/compositions/composition.py", line 12102, in execute
for next_execution_set in execution_sets:
File "/opt/conda/envs/project/lib/python3.11/site-packages/psyneulink/core/scheduling/scheduler.py", line 160, in run
yield from super().run(
File "/opt/conda/envs/project/lib/python3.11/site-packages/graph_scheduler/scheduler.py", line 913, in run
not termination_conds[TimeScale.ENVIRONMENT_STATE_UPDATE].is_satisfied(**is_satisfied_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/project/lib/python3.11/site-packages/psyneulink/core/globals/context.py", line 749, in wrapper
raise e
File "/opt/conda/envs/project/lib/python3.11/site-packages/psyneulink/core/globals/context.py", line 742, in wrapper
return func(*args, context=context, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/project/lib/python3.11/site-packages/psyneulink/core/scheduling/condition.py", line 113, in is_satisfied
return super().is_satisfied(
^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/project/lib/python3.11/site-packages/graph_scheduler/condition.py", line 1008, in is_satisfied
return call_with_pruned_args(
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/project/lib/python3.11/site-packages/graph_scheduler/utilities.py", line 103, in call_with_pruned_args
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/project/lib/python3.11/site-packages/graph_scheduler/condition.py", line 2249, in func
return dependency.is_finished(execution_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/project/lib/python3.11/site-packages/psyneulink/core/globals/context.py", line 751, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/project/lib/python3.11/site-packages/psyneulink/library/components/mechanisms/processing/integrator/ddm.py", line 1237, in is_finished
abs(single_value) >= self.function._get_current_parameter_value(THRESHOLD, context)
^^^^^^^^^^^^^^^^^
TypeError: bad operand type for abs(): 'NoneType'
Would you be able to help?
—
Reply to this email directly, view it on GitHub<#2918 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACSHKGBJQO5LLR2U3ATR7M3YV35CZAVCNFSM6AAAAABDUTAPXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRYGYYTMNJQG4>.
You are receiving this because you commented.Message ID: ***@***.***>
|
The blocks of code on the primer page are less like a sequence of things to run and more like chunks of a script. So
should replace
in a script which is then rerun. Otherwise, the new DDM isn't added to the composition and pathways, it's just created on its own. This is the cause of the error above. About the tutorial - it shouldn't be outdated to the point of not functioning. I can't find "Organizing into Processes," and processes are an old construction that we haven't used for a while. I'm interested in where you found that. The binder link is a third party service and maybe isn't working well, but locally using jupyter, the tutorial seems to be fine for me, following the steps at https://github.com/PrincetonUniversity/PsyNeuLink/?tab=readme-ov-file#tutorial. |
@JackCaster Just to make sure, check the version of psyneulink you have installed with
The current master branch is at version |
Hi, I stumbled upon this repo and I got excited by the opportunities in using it. I have no formal cognitive modelling training, so I am trying to get up and running by reading some of the examples you shared in the
Scripts
folder. Unfortunately, most of them do not run. Reasons include missing function, API changes, ... Can you recommend some resources (tutorials, simple implementations) to learn aboutPsyneulink
?The text was updated successfully, but these errors were encountered: