Commit d670b5b0 authored by Jiahang Chen's avatar Jiahang Chen
Browse files

update

parent bc5eafa1
......@@ -8,7 +8,7 @@
import argparse
from ml.tools import load_config
import os
from ml.dt_factory import create_dt_ref
from ml.dt_factory import create_thing
root_path = os.path.abspath("")
......@@ -41,13 +41,13 @@ def main():
dt_name = list()
for path, dir_list, file_list in g:
for file_name in file_list:
dt_name.append(load_config(file_name, root=root_path)["attributes"].get("name", None))
dt_name.append(load_config(os.path.json(root_path, "configs", file_name))["attributes"].get("name", None))
print(dt_name)
elif args.command == "launch":
dt_config = args.dt_config[0]
try:
model = load_config(dt_config, root=root_path)
model = load_config(os.path.join(root_path, "configs", dt_config))
except FileNotFoundError:
print("{} can not be found".format(dt_config))
return
......@@ -63,7 +63,7 @@ def main():
elif "n" == is_repo.lower():
is_repo = False
dt = create_dt_ref(model=model, grant_type="client_credentials",
dt = create_thing(model=model, grant_type="client_credentials",
secret=secret,
is_broker_rest=True,
is_broker=True,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment