Skip to content

What is an example of a workflow that generates an attribute_name in a node? #789

Answered by kessler-frost
scottwn asked this question in Q&A
Discussion options

You must be logged in to vote

Example workflow for attribute node:

import covalent as ct

class Test:
    def __init__(self):
        self.exampling = 210

@ct.electron
def task_1():
    return Test()

@ct.electron
def task_2(x):
    return x * 2

@ct.lattice
def workflow():

    res_1 = task_1()
    res_2 = task_2(res_1.exampling)

    return res_2

result = ct.dispatch_sync(workflow)()
print(result)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kessler-frost
Comment options

Answer selected by kessler-frost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants