Repo for the onboarding and introduction to Simstack II
- Register your account at: https://simstack.int.kit.edu
- Register access to the jupyterhub: https://material-digital.de/
- Go to: https://pyiron.material-digital.de/
Some jupyter instance should pop up
- In the jupyter instance go to "+" and open a terminal
- Install uv https://docs.astral.sh/uv/getting-started/installation/#installation-methods
- Add it to your shell: source $HOME/.local/bin/env
- Clone/fork this repo: git clone https://github.com/simstack/simstack-onboarding.git (fork if you want to commit changes)
- In simstack-onboarding run uv sync --locked
- In the home directory make a directory simstack: mkdir simstack
- go to simstack-onboarding
- create a simstack.toml file (on the left in the jupyter instance, navigate to simstack-onboarding, click on "new file" in the file folder):
- uv run create_model_table --dir private --dir public
- uv run create_node_table --dir private --dir public
- set up local resource in UI, go to tab: Profile, add a resource, name it "local", hostname: "localhost",
- export PYTHONPATH=`pwd` (note the backslash, add to your .bashrc if you want it to be permanent)
- uv run simstack_runner --resource local --no-pull
[parameters]
[parameters.general]
use_db = true
workdir_self = "PATH TO YOUR WORKDIR"
# these are parameters for one user for all hosts
[parameters.db]
database = "USERNAME_data"
test_database = "USERNAME_test"
connection_string="CONNECTION STRING"- in the UI go to submit
- under public / first_steps / simple_operations / add click "favorite"
- select "favorite"
- fill in some numbers for a and b
- click submit worklow
- in the task tabs you should see an entry "add", first yellow, then hopefully green
- click on the green entry and you should see the inputs / outputs / logs of the workflow
- in the jupyter instance lots of log entries should have been printed to the terminal
- go to the jupyter instance and create a new terminal, go to the simstack directory
- you should see a new folder called "add" with an empty directory with the job_id
- inspect the code in the first_steps/simple_operations.py
- copy this file to first_steps/complex_operations.py
- write a function complex_operation which takes three args, adds the first two using the sum node and multiplies the result with the third arg
- test the function in the jupyter instance by adding the following code
import asyncio
from simstack.core.context import context
async def main():
await context.initialize()
arg1 = FloatData(field_name="arg1",value=1)
arg2 = FloatData(field_name="arg2",value=2)
arg3 = FloatData(field_name="arg3",value=3)
result = await complex_operation(arg1,arg2,arg3)
print(result.value)
if __name__ == "__main__":
asyncio.run(main())- open a terminal and set export PYTHONPATH=
pwdrun this code in a terminal as: uv run python public/first_steps/complex_operation.py. You should get an error like this:
2026-02-26 11:33:50 - Context - INFO - context.py : 157 - Database connection to None mongodb://wolfgang-onboarding@simstack.int.kit.edu:27017//None
2026-02-26 11:33:50 - config-reader - INFO - config_reader.py : 75 - toml-file read, use_db_for_init: True
2026-02-26 11:33:50 - init_resource - INFO - init_data_source.py : 18 - Initializing ConfigReader from database, allowed resources: ['local', 'self']
2026-02-26 11:33:50 - init_resource - INFO - init_data_source.py : 32 - ConfigReader resources: ['local', 'self']
2026-02-26 11:33:50 - init_resource - WARNING - init_data_source.py : 44 - Initializing paths from database is not yet implemented
2026-02-26 11:33:50 - config-reader - INFO - config_reader.py : 103 - ConfigReader initialized with workdir: /home/jovyan/simstack
2026-02-26 11:33:50 - config-reader - INFO - config_reader.py : 105 - resource_definition.resource_str: self
2026-02-26 11:33:50 - config-reader - INFO - config_reader.py : 105 - resource_definition.workdir: /home/jovyan/simstack
2026-02-26 11:33:50 - config-reader - INFO - config_reader.py : 105 - resource_definition.hostname: localhost
2026-02-26 11:33:50 - config-reader - INFO - config_reader.py : 105 - resource_definition.python_paths: []
2026-02-26 11:33:50 - config-reader - INFO - config_reader.py : 105 - resource_definition.environment_start: None
2026-02-26 11:33:50 - config-reader - INFO - config_reader.py : 105 - resource_definition.ssh_key: None
2026-02-26 11:33:50 - config-reader - INFO - config_reader.py : 105 - resource_definition.routes: []
2026-02-26 11:33:50 - config-reader - INFO - config_reader.py : 105 - resource_definition.is_default: False
2026-02-26 11:33:50 - config-reader - INFO - config_reader.py : 105 - resource_definition.git_branch: main
2026-02-26 11:33:50 - config-reader - INFO - config_reader.py : 105 - resource_definition.id: 69a02f9edf0b43d7cbef6ef3
2026-02-26 11:33:50 - Node - ERROR - node.py : 183 - Could not find function mapping for name: complex_operation
Traceback (most recent call last):
File "/home/jovyan/simstack-onboarding/public/first_steps/complex_workflow.py", line 21, in <module>
asyncio.run(main())
File "/home/jovyan/simstack-onboarding/.venv/lib/python3.12/site-packages/nest_asyncio.py", line 30, in run
return loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jovyan/simstack-onboarding/.venv/lib/python3.12/site-packages/nest_asyncio.py", line 98, in run_until_complete
return f.result()
^^^^^^^^^^
File "/home/jovyan/.local/share/uv/python/cpython-3.12.12-linux-x86_64-gnu/lib/python3.12/asyncio/futures.py", line 202, in result
raise self._exception.with_traceback(self._exception_tb)
File "/home/jovyan/.local/share/uv/python/cpython-3.12.12-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 314, in __step_run_and_handle_result
result = coro.send(None)
^^^^^^^^^^^^^^^
File "/home/jovyan/simstack-onboarding/public/first_steps/complex_workflow.py", line 17, in main
result = await complex_operation(arg1,arg2,arg3)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jovyan/simstack-onboarding/.venv/lib/python3.12/site-packages/simstack/core/node.py", line 889, in sync_wrapper
status = loop.run_until_complete(execution_node.get_node_registry())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jovyan/simstack-onboarding/.venv/lib/python3.12/site-packages/nest_asyncio.py", line 98, in run_until_complete
return f.result()
^^^^^^^^^^
File "/home/jovyan/.local/share/uv/python/cpython-3.12.12-linux-x86_64-gnu/lib/python3.12/asyncio/futures.py", line 202, in result
raise self._exception.with_traceback(self._exception_tb)
File "/home/jovyan/.local/share/uv/python/cpython-3.12.12-linux-x86_64-gnu/lib/python3.12/asyncio/tasks.py", line 314, in __step_run_and_handle_result
result = coro.send(None)
^^^^^^^^^^^^^^^
File "/home/jovyan/simstack-onboarding/.venv/lib/python3.12/site-packages/simstack/core/node.py", line 267, in get_node_registry
await self.make_registry_entry(function_hash, arg_hash)
File "/home/jovyan/simstack-onboarding/.venv/lib/python3.12/site-packages/simstack/core/node.py", line 184, in make_registry_entry
raise ValueError(f"Could not find function mapping for name: {self.name}")
ValueError: Could not find function mapping for name: complex_operation
the first part tells you that the process started OK, but the second part tells you that the function complex_operation is not registered.
- rerun: uv run create_node_table --dir private --dir public and the program again (should work now)
- go to the UI
- inspect the task tab, click on the little arrow next to the complex_operation task and should see the subtasks
- go to submit: click on the complex_operation task, fill in some values and click submit
- go to the task tab and inspect the results