From 91b9cdfae5191b55979b8153826bdb1c49daa11b Mon Sep 17 00:00:00 2001 From: Yusef Napora Date: Mon, 22 Jun 2020 18:10:37 -0400 Subject: [PATCH] make sure each group gets its own param objects --- composer/app/composition.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/composer/app/composition.py b/composer/app/composition.py index d9db2b305..f12034f8c 100644 --- a/composer/app/composition.py +++ b/composer/app/composition.py @@ -85,7 +85,6 @@ def str_param(pdef): class Base(param.Parameterized): - @classmethod def from_dict(cls, d): return cls(**d) @@ -166,7 +165,7 @@ class Build(Base): class Run(Base): artifact = param.String(allow_None=True) - test_params = param.Parameter() + test_params = param.Parameter(instantiate=True) def __init__(self, params_class=None, **params): super().__init__(**params) @@ -186,10 +185,10 @@ class Run(Base): class Group(Base): id = param.String() - instances = param.Parameter(Instances(), precedence=-1) - resources = param.Parameter(Resources(), allow_None=True, precedence=-1) - build = param.Parameter(Build(), precedence=-1) - run = param.Parameter(Run(), precedence=-1) + instances = param.Parameter(Instances(), instantiate=True) + resources = param.Parameter(Resources(), allow_None=True, instantiate=True) + build = param.Parameter(Build(), instantiate=True) + run = param.Parameter(Run(), instantiate=True) def __init__(self, params_class=None, **params): super().__init__(**params) @@ -220,8 +219,8 @@ class Group(Base): class Composition(param.Parameterized): - metadata = param.Parameter(Metadata(), precedence=-1) - global_config = param.Parameter(Global(), precedence=-1) + metadata = param.Parameter(Metadata(), instantiate=True) + global_config = param.Parameter(Global(), instantiate=True) groups = param.List(precedence=-1) group_tabs = pn.Tabs()