mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-04-30 19:21:39 +00:00
Added a way to run as a library by passing job dict
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
from typing import Union, OrderedDict
|
||||
|
||||
from toolkit.config import get_config
|
||||
|
||||
|
||||
def get_job(config_path, name=None):
|
||||
def get_job(
|
||||
config_path: Union[str, dict, OrderedDict],
|
||||
name=None
|
||||
):
|
||||
config = get_config(config_path, name)
|
||||
if not config['job']:
|
||||
raise ValueError('config file is invalid. Missing "job" key')
|
||||
|
||||
Reference in New Issue
Block a user