Add Workflow Executor Example (#892)

Signed-off-by: JoshuaL3000 <joshua.jian.ern.liew@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
JoshuaL3000
2024-11-01 09:50:20 +08:00
committed by GitHub
parent c65d7d40fb
commit bf5c391e47
16 changed files with 731 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
from tools.components.workflow import Workflow
from tools.utils.handle_requests import RequestHandler
class EasyDataSDK:
def __init__(self):
self.request_handler = RequestHandler(os.environ["SDK_BASE_URL"], os.environ["SERVING_TOKEN"])
def create_workflow(self, workflow_id=None, workflow_key=None):
return Workflow(
self.request_handler,
workflow_id=workflow_id,
workflow_key=workflow_key,
)