Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • E ewokscore
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • workflow
  • ewoks
  • ewokscore
  • Merge requests
  • !20

Hdf5 persistence

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Wout De Nolf requested to merge hdf5_persistency into main Jul 29, 2021
  • Overview 3
  • Commits 6
  • Pipelines 25
  • Changes 18

Variables have a "dtype":

from ewokscore.variable import Variable

varinfo = {"root_uri": "/tmp/mydata", "dtype": "nexus"}

var1 = Variable(varinfo=varinfo)
var1.value = [1, 2, 3]
var1.dump()

var2 = Variable(uhash=var1.uhash, varinfo=varinfo)
assert var2.value.tolist() == var1.value

The "dtype" of task outputs can be specified for all tasks or for each task individually:

from ewokscore import load_graph


def add(*args):
    return sum(args)


nodes = [
    {
        "id": f"task{i}",
        "method": "__main__.add",
        "inputs": {0: 1},
        "varinfo": {"dtype": "nexus"},
    }
    for i in range(4)
]
links = [
    {"source": f"task{i}", "target": f"task{i+1}", "arguments": {1: "return_value"}}
    for i in range(3)
]

graph = load_graph({"nodes": nodes, "links": links})
varinfo = {"root_uri": "dataset.nx::/scan", "dtype": "json"}
graph.execute(varinfo=varinfo)
Edited Aug 03, 2021 by Wout De Nolf
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: hdf5_persistency