-
Notifications
You must be signed in to change notification settings - Fork 3
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
Onto codevelopment #162
Merged
Merged
Onto codevelopment #162
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Our first connection between ironflow and pyiron_ontology!
That didn't make any sense, I would have wanted to index 1. Anyhow it worked and I don't even need it because the ontology namespace is already removed in the `name` attribute
Not yet extensible, only works with ontologies that ironflow already knows about in its code base. For now that's ok, we can work out a registration system later.
Need to go work out the onto logic; right now it just always passes.
Output is as output does; if it's got a valid value it's valid regardless who it's connected to.
And kick the can down the road for making sure it's correct in the context of the entire workflow
I'll need to actually add more nodes that use the ontology before this is properly testable, but at least it doesn't break single-jump connections.
They're pyiron_ontology Parameter objects, not just generic owlready2 Things.
pyiron_ontology doesn't exist on pip or conda yet, so tests will fail, but that's ok for now.
Totally unrelated to this PR. Let's just sneak it in and get it done with.
It used to be called model, but it's not HasSession it really is GUI. Name it so.
Pass around the actual ports and not just the otypes. We'll need to do a recursive check that all upstream guys also satisfy their downstream requirements
This doesn't get the job done, but it's getting close for input ports. It is terribly slow, but let's worry about efficiency after it's working.
It still has the chance to make multiple tree construction calls, but this still seems unavoidable to me right now
By using iterators instead of list comprehensions in `any` and `all` calls
Make otype checking more performant
Fix port recommendations
Surface energy
Otype checking itself is actually not terribly un-performant, but the current architecture is trying to do it per-draw, which is a bit crazy.
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the base PR for integrating ontological typing with pyiron_ontology. The ontology module is still under active development and not even available as a dependency on conda forge yet. This will stay as a draft until that dependency is available.
WARNING: the binder link will fail because the
pyiron_ontology
dependency is not yet listed!Since the ontology module is still quite new, I'll be actively developing it together with ironflow until I'm satisfied enough to release it on conda. To get far enough along the ironflow development to really know what I even need from pyiron_ontology would make this a beast of a PR, so I'll use the stacked-PR paradigm again.
In this particular PR, I lay the most fundamental groundwork:
otype
, to track ontological typingand convert input to generic units in outputNote that for now I plan to keep all the type checking with the dtype.
On the one hand, this makes node definitions a bit verbose, as both
dtype
andotype
should be defined.On the other hand...
np.linspace
as user input. There is a field in the ontology for user input, so we could get fancy here at some point, but for now let's keep it simple and let users manually feed in data of the correct dtype if they want.So for the time being I want to keep separate the idea of using ontological typing for workflow construction hints and suggestions, and data typing for workflow connection requirements.
As of this PR, you can send Murnaghan output to the material property node and get it correctly converted to the generic units. When building up the graph, where both input and output are ontologically typed, input validation now also confirms that the ontological type being input matches the ontological conditions, and these conditions are collected by traversing the graph downstream and collecting all downstream conditions. Thus, in the simple graph below, the Lammps structure input is aware that it needs a bulk-like structure.
From here on out we'll make stacked PR's to handle the recommender system. Then hopefully merge and get a release based on a conda-forge version of pyiron_ontology, then extend everything to the surface energy use-case.
Edit: Stacked PRs (to be) merged in