Skip to content

Commit

Permalink
major update, support job chaining and GCP batch mode
Browse files Browse the repository at this point in the history
  • Loading branch information
geyang committed Dec 28, 2021
1 parent 54b0821 commit 25b9303
Show file tree
Hide file tree
Showing 13 changed files with 1,000 additions and 727 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.22
0.8.0
2 changes: 1 addition & 1 deletion jaynes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from . import mounts, runners
from .jaynes import Jaynes, config, run, listen, RUN
from .jaynes import Jaynes, config, add, chain, execute, run, listen, RUN
from .helpers import tag_instance
12 changes: 12 additions & 0 deletions jaynes/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ def n_to_m(yaml_node):
return {k.value: v.value for k, v in yaml_node.value}


def memoize(f):
memo = {}

def wrapper(*args, **kwargs):
key = (*args, *kwargs.keys(), *kwargs.values())
if key not in memo:
memo[key] = f(*args, **kwargs)
return memo[key]

return wrapper


# note: now we properly handle the node types.
def hydrate(Constructor, ctx):
def _fn(_, node):
Expand Down
Loading

0 comments on commit 25b9303

Please sign in to comment.