Skip to content

Commit

Permalink
Merge pull request #160 from pyiron/simple_storage
Browse files Browse the repository at this point in the history
A first pass at storage
  • Loading branch information
liamhuber authored Feb 17, 2024
2 parents 63d9288 + 2a887dc commit 7fcae5f
Show file tree
Hide file tree
Showing 32 changed files with 2,576 additions and 529 deletions.
5 changes: 4 additions & 1 deletion .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ dependencies:
- bidict =0.22.1
- cloudpickle =3.0.0
- graphviz =8.1.0
- h5io =0.2.2
- h5io_browser =0.0.9
- matplotlib =3.8.2
- pyiron_contrib =0.1.15
- pympipool =0.7.13
- python-graphviz =0.20.1
- toposort =1.10
Expand All @@ -15,6 +18,6 @@ dependencies:
- atomistics =0.1.23
- lammps
- phonopy =2.21.0
- pyiron_atomistics =0.4.14
- pyiron_atomistics =0.4.15
- pyiron-data =0.0.27
- numpy =1.26.4
2 changes: 1 addition & 1 deletion .ci_support/environment-notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ dependencies:
- atomistics =0.1.23
- lammps
- phonopy =2.21.0
- pyiron_atomistics =0.4.14
- pyiron_atomistics =0.4.15
- pyiron-data =0.0.27
- numpy =1.26.4
3 changes: 3 additions & 0 deletions .ci_support/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ dependencies:
- bidict =0.22.1
- cloudpickle =3.0.0
- graphviz =8.1.0
- h5io =0.2.2
- h5io_browser =0.0.9
- matplotlib =3.8.2
- pyiron_contrib =0.1.15
- pympipool =0.7.13
- python-graphviz =0.20.1
- toposort =1.10
Expand Down
4 changes: 3 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ Individual node computations can be shipped off to parallel processes for scalab

Once you're happy with a workflow, it can be easily turned it into a macro for use in other workflows. This allows the clean construction of increasingly complex computation graphs by composing simpler graphs.

Nodes (including macros) can be stored in plain text, and registered by future workflows for easy access. This encourages and supports an ecosystem of useful nodes, so you don't need to re-invent the wheel. (This is an alpha-feature, with full support of [FAIR](https://en.wikipedia.org/wiki/FAIR_data) principles for node packages planned.)
Nodes (including macros) can be stored in plain text, and registered by future workflows for easy access. This encourages and supports an ecosystem of useful nodes, so you don't need to re-invent the wheel. (This is a beta-feature, with full support of [FAIR](https://en.wikipedia.org/wiki/FAIR_data) principles for node packages planned.)

Executed or partially-executed graphs can be stored to file, either by explicit call or automatically after running. When creating a new node(/macro/workflow), the working directory is automatically inspected for a save-file and the node will try to reload itself if one is found. (This is an alpha-feature, so it is currently only possible to save entire graphs at once and not individual nodes within a graph, all the child nodes in a saved graph must have been instantiated by `Workflow.create` (or equivalent, i.e. their code lives in a `.py` file that has been registered), and there are no safety rails to protect you from changing the node source code between saving and loading (which may cause errors/inconsistencies depending on the nature of the changes).)

## Example

Expand Down
3 changes: 3 additions & 0 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ dependencies:
- bidict =0.22.1
- cloudpickle =3.0.0
- graphviz =8.1.0
- h5io =0.2.2
- h5io_browser =0.0.9
- matplotlib =3.8.2
- pyiron_contrib =0.1.15
- pympipool =0.7.13
- python-graphviz =0.20.1
- toposort =1.10
Expand Down
12 changes: 6 additions & 6 deletions notebooks/atomistics_nodes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,18 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/huber/work/pyiron/pyiron_workflow/pyiron_workflow/channels.py:166: UserWarning: The channel accumulate_and_run was not connected to ran, andthus could not disconnect from it.\n",
"/Users/huber/work/pyiron/pyiron_workflow/pyiron_workflow/channels.py:168: UserWarning: The channel ran was not connected to accumulate_and_run, andthus could not disconnect from it.\n",
" warn(\n",
"/Users/huber/work/pyiron/pyiron_workflow/pyiron_workflow/channels.py:166: UserWarning: The channel ran was not connected to accumulate_and_run, andthus could not disconnect from it.\n",
"/Users/huber/work/pyiron/pyiron_workflow/pyiron_workflow/channels.py:168: UserWarning: The channel accumulate_and_run was not connected to ran, andthus could not disconnect from it.\n",
" warn(\n",
"/Users/huber/work/pyiron/pyiron_workflow/pyiron_workflow/channels.py:166: UserWarning: The channel run was not connected to ran, andthus could not disconnect from it.\n",
"/Users/huber/work/pyiron/pyiron_workflow/pyiron_workflow/channels.py:168: UserWarning: The channel run was not connected to ran, andthus could not disconnect from it.\n",
" warn(\n"
]
},
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x14bcc6250>"
"<matplotlib.collections.PathCollection at 0x1300e1350>"
]
},
"execution_count": 4,
Expand Down Expand Up @@ -168,7 +168,7 @@
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x14bdc2f10>"
"<matplotlib.collections.PathCollection at 0x14027d1d0>"
]
},
"execution_count": 6,
Expand Down Expand Up @@ -207,7 +207,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.11.7"
}
},
"nbformat": 4,
Expand Down
556 changes: 368 additions & 188 deletions notebooks/deepdive.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 7fcae5f

Please sign in to comment.