Skip to content

Commit 75d9e31

Browse files
committed
pass conf to workflow, rm argparse
1 parent 51f55aa commit 75d9e31

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

conclave/workflow.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import argparse
2-
import json
3-
41
from conclave import CodeGenConfig
52
from conclave import generate_and_dispatch
63
from conclave.config import JiffConfig
@@ -72,21 +69,13 @@ def setup(conf: dict):
7269
return conclave_config
7370

7471

75-
def run(protocol: callable, mpc_framework: str = "obliv-c", local_framework: str = "python", apply_optimisations=False):
72+
def run(protocol: callable, conf, mpc_framework: str = "obliv-c",
73+
local_framework: str = "python", apply_optimisations=False):
7674
"""
7775
Load parameters from config & dispatch computation.
7876
Downloads files if necessary from either Dataverse or Swift
7977
"""
8078

81-
parser = argparse.ArgumentParser(description="Run new workflow for Conclave.")
82-
parser.add_argument("--conf", metavar="/config/file.json", type=str,
83-
help="path of the config file", default="conf.json", required=False)
84-
85-
args = parser.parse_args()
86-
87-
with open(args.conf) as fp:
88-
conf = json.load(fp)
89-
9079
conclave_config = setup(conf)
9180

9281
generate_and_dispatch(

0 commit comments

Comments
 (0)