-
DescriptionCurrent database, it doesn’t have a direct reference to sub-lattice (in lattices table) and their electrons (in electrons table). ObservationThe parent lattice ID of an electron or sub-lattice refers to the lattice in which each of those is invoked, but the database doesn't have any direct references to sub-lattice and their electrons. Hence, we are facing issues while referring sub lattice to their electron for Graph API. SuggestionWe can introduce new column in electrons, which will refer to the immediate sub-lattice or lattice (in the absents of sub-lattice). Change ImplementationDatabase changes, Data layer changes, Queries
|
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 37 replies
-
Hi @ArunPsiog, with the current schema, one can easily find a sublattice's parent lattice via the Edit: based on today's meeting I see that I misunderstood the initial question |
Beta Was this translation helpful? Give feedback.
-
Regarding your questions:
|
Beta Was this translation helpful? Give feedback.
-
From today's meeting, the main problem is that the |
Beta Was this translation helpful? Give feedback.
-
I tried reproducing the issue with this script: import covalent as ct
@ct.electron
def sub_sub_task(x):
return x**2
@ct.electron
@ct.lattice
def sub_sub_workflow(x):
# 1 -> 0
return sub_sub_task(x)
@ct.electron
@ct.lattice
def sub_workflow(x):
# 1 -> 0
return sub_sub_workflow(x)
@ct.lattice
def workflow(x):
# 1 -> 0
return sub_workflow(x)
dispatch_id = ct.dispatch(workflow)(3)
print(dispatch_id)
print(ct.get_result(dispatch_id, wait=True)) Starting with an empty database, I get the following table entries: Lattices (
Electrons (
The Starting with the top-level lattice ( @ArunPsiog clearly I'm missing something here. Is this example too simple? |
Beta Was this translation helpful? Give feedback.
-
Hi @santoshkumarradha - Got a download of yesterday's between all of you. Want to quickly clarify expectation reg sub-lattices below - 1 2 In the new sub-lattices tab where the list of sub-lattices are expected to be shown, again is the expectation only to show root level sub-lattices or are all nested sub-lattices expected to be shown? If it is the former, then there can be some drill down option for a user to drill into one sub-lattive and see the nested sub-lattices under it. If it is the later, then pls see the explanation below - In the current database, the |
Beta Was this translation helpful? Give feedback.
-
Hi @cjao, Links between,
Are missing in electron_dependency table. I have used this below script to create sub-lattices workflow,
With a empty database. The workflow creates,
Actual,
Expected,
/, \ - Represent links present in electron_dependency table Refer below screenshot for database entries, While adding the new field (root_lattice_id), Can you add this missing links in electron dependency table? |
Beta Was this translation helpful? Give feedback.
-
@cjao There is one expectation to have this below format where the whole graph along with the sublattices need to be shown. With the current schema, do you think this might be a possible option to implement considering we don't have the links in the electron dependecny table as @ArunPsiog had pointed out If not, @santoshkumarradha we might need to think of an alternative to show the sublattices in the graph view. |
Beta Was this translation helpful? Give feedback.
-
Yes indeed that’s the ask, the edge will be connected to a graph (which
when I expanded will be an electron of the sublattice.
On Fri, Aug 26, 2022 at 7:59 PM Casey Jao ***@***.***> wrote:
@Prasy12 <https://github.com/Prasy12> It's possible if you are willing to
enclose the expanded sublattice in a box or some other visual aid to
indicate that the edge from L connects to the original sublattice
*electron* and not to any node in the expanded sublattice graph.
L
/ \
----- P
| SL |
| __ |
—
Reply to this email directly, view it on GitHub
<#1096 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG74SGBYE4VLLZMFPPNNQEDV3DIGHANCNFSM57APJ4YQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Santosh Kumar Radha
Agnostiq Inc.
|
Beta Was this translation helpful? Give feedback.
@cjao There is one expectation to have this below format where the whole graph along with the sublattices need to be shown.
With the current schema, do you think this might be a possible option to implement considering we don't have the links in the electron dependecny table as @ArunPsiog had pointed out
?
If not, @santoshkumarradha we might need to think of an alternative to show the sublattices in the graph view.