blue-assistant 4.78.1__py3-none-any.whl → 4.97.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- blue_assistant/.abcli/tests/script_run.sh +2 -1
- blue_assistant/__init__.py +1 -1
- blue_assistant/config.env +5 -2
- blue_assistant/env.py +21 -5
- blue_assistant/help/script.py +4 -1
- blue_assistant/script/__main__.py +7 -0
- blue_assistant/script/actions/functions.py +0 -26
- blue_assistant/script/actions/generate_image.py +42 -5
- blue_assistant/script/actions/generate_text.py +13 -9
- blue_assistant/script/actions/generic.py +1 -8
- blue_assistant/script/load.py +2 -0
- blue_assistant/script/repository/blue_amo/actions/__init__.py +0 -0
- blue_assistant/script/repository/blue_amo/actions/slice_into_frames.py +35 -0
- blue_assistant/script/repository/blue_amo/actions/stitch_the_frames.py +81 -0
- blue_assistant/script/repository/blue_amo/classes.py +82 -1
- blue_assistant/script/repository/generic/classes.py +33 -8
- {blue_assistant-4.78.1.dist-info → blue_assistant-4.97.1.dist-info}/METADATA +2 -2
- {blue_assistant-4.78.1.dist-info → blue_assistant-4.97.1.dist-info}/RECORD +21 -18
- {blue_assistant-4.78.1.dist-info → blue_assistant-4.97.1.dist-info}/LICENSE +0 -0
- {blue_assistant-4.78.1.dist-info → blue_assistant-4.97.1.dist-info}/WHEEL +0 -0
- {blue_assistant-4.78.1.dist-info → blue_assistant-4.97.1.dist-info}/top_level.txt +0 -0
blue_assistant/__init__.py
CHANGED
blue_assistant/config.env
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
-
|
1
|
+
BLUE_ASSISTANT_TEXT_DEFAULT_MODEL=gpt-4o
|
2
|
+
BLUE_ASSISTANT_TEXT_MAX_TOKEN=2000
|
2
3
|
|
3
|
-
|
4
|
+
BLUE_ASSISTANT_IMAGE_DEFAULT_MODEL=dall-e-3
|
5
|
+
BLUE_ASSISTANT_IMAGE_DEFAULT_QUALITY=standard
|
6
|
+
BLUE_ASSISTANT_IMAGE_DEFAULT_SIZE=1024x1024
|
blue_assistant/env.py
CHANGED
@@ -5,13 +5,29 @@ load_env(__name__)
|
|
5
5
|
load_config(__name__)
|
6
6
|
|
7
7
|
|
8
|
-
|
9
|
-
"
|
8
|
+
BLUE_ASSISTANT_TEXT_DEFAULT_MODEL = os.getenv(
|
9
|
+
"BLUE_ASSISTANT_TEXT_DEFAULT_MODEL",
|
10
10
|
"",
|
11
11
|
)
|
12
12
|
|
13
|
-
|
13
|
+
BLUE_ASSISTANT_TEXT_MAX_TOKEN_str = os.getenv("BLUE_ASSISTANT_TEXT_MAX_TOKEN", "")
|
14
14
|
try:
|
15
|
-
|
15
|
+
BLUE_ASSISTANT_TEXT_MAX_TOKEN = int(BLUE_ASSISTANT_TEXT_MAX_TOKEN_str)
|
16
16
|
except Exception:
|
17
|
-
|
17
|
+
BLUE_ASSISTANT_TEXT_MAX_TOKEN = 2000
|
18
|
+
|
19
|
+
|
20
|
+
BLUE_ASSISTANT_IMAGE_DEFAULT_MODEL = os.getenv(
|
21
|
+
"BLUE_ASSISTANT_IMAGE_DEFAULT_MODEL",
|
22
|
+
"",
|
23
|
+
)
|
24
|
+
|
25
|
+
BLUE_ASSISTANT_IMAGE_DEFAULT_QUALITY = os.getenv(
|
26
|
+
"BLUE_ASSISTANT_IMAGE_DEFAULT_QUALITY",
|
27
|
+
"",
|
28
|
+
)
|
29
|
+
|
30
|
+
BLUE_ASSISTANT_IMAGE_DEFAULT_SIZE = os.getenv(
|
31
|
+
"BLUE_ASSISTANT_IMAGE_DEFAULT_SIZE",
|
32
|
+
"",
|
33
|
+
)
|
blue_assistant/help/script.py
CHANGED
@@ -31,6 +31,12 @@ parser.add_argument(
|
|
31
31
|
default=0,
|
32
32
|
help="0 | 1",
|
33
33
|
)
|
34
|
+
parser.add_argument(
|
35
|
+
"--test_mode",
|
36
|
+
type=int,
|
37
|
+
default=0,
|
38
|
+
help="0 | 1",
|
39
|
+
)
|
34
40
|
parser.add_argument(
|
35
41
|
"--delim",
|
36
42
|
type=str,
|
@@ -59,6 +65,7 @@ elif args.task == "run":
|
|
59
65
|
success, script = load_script(
|
60
66
|
script_name=args.script_name,
|
61
67
|
object_name=args.object_name,
|
68
|
+
test_mode=args.test_mode == 1,
|
62
69
|
verbose=args.verbose == 1,
|
63
70
|
)
|
64
71
|
|
@@ -20,29 +20,3 @@ def get_action_class(
|
|
20
20
|
|
21
21
|
logger.error(f"{action_name}: action not found.")
|
22
22
|
return False, GenericAction
|
23
|
-
|
24
|
-
|
25
|
-
def perform_action(
|
26
|
-
script: BaseScript,
|
27
|
-
node_name: str,
|
28
|
-
) -> bool:
|
29
|
-
action_name = script.nodes[node_name].get("action", "unknown")
|
30
|
-
|
31
|
-
success, action_class = get_action_class(action_name=action_name)
|
32
|
-
if not success:
|
33
|
-
return success
|
34
|
-
|
35
|
-
logger.info(
|
36
|
-
"{}.perform_action: {} == {} on {}".format(
|
37
|
-
NAME,
|
38
|
-
action_name,
|
39
|
-
action_class.__name__,
|
40
|
-
node_name,
|
41
|
-
)
|
42
|
-
)
|
43
|
-
|
44
|
-
action_object = action_class(
|
45
|
-
script=script,
|
46
|
-
)
|
47
|
-
|
48
|
-
return action_object.perform(node_name=node_name)
|
@@ -1,14 +1,31 @@
|
|
1
|
-
from
|
2
|
-
|
3
|
-
from blue_objects import file
|
1
|
+
from blue_objects import file, objects
|
2
|
+
from openai_commands.image_generation.api import OpenAIImageGenerator
|
4
3
|
|
4
|
+
from blue_assistant.env import (
|
5
|
+
BLUE_ASSISTANT_IMAGE_DEFAULT_MODEL,
|
6
|
+
BLUE_ASSISTANT_IMAGE_DEFAULT_SIZE,
|
7
|
+
BLUE_ASSISTANT_IMAGE_DEFAULT_QUALITY,
|
8
|
+
)
|
5
9
|
from blue_assistant.script.actions.generic import GenericAction
|
10
|
+
from blue_assistant.script.repository.base.classes import BaseScript
|
6
11
|
from blue_assistant.logger import logger
|
7
12
|
|
8
13
|
|
9
14
|
class GenerateImageAction(GenericAction):
|
10
15
|
name = file.name(__file__)
|
11
16
|
|
17
|
+
def __init__(
|
18
|
+
self,
|
19
|
+
script: BaseScript,
|
20
|
+
):
|
21
|
+
super().__init__(script=script)
|
22
|
+
|
23
|
+
self.generator = OpenAIImageGenerator(
|
24
|
+
model=BLUE_ASSISTANT_IMAGE_DEFAULT_MODEL,
|
25
|
+
verbose=self.script.verbose,
|
26
|
+
)
|
27
|
+
|
28
|
+
# https://platform.openai.com/docs/guides/images
|
12
29
|
def perform(
|
13
30
|
self,
|
14
31
|
node_name: str,
|
@@ -16,6 +33,26 @@ class GenerateImageAction(GenericAction):
|
|
16
33
|
if not super().perform(node_name=node_name):
|
17
34
|
return False
|
18
35
|
|
19
|
-
|
36
|
+
filename = f"{node_name}.png"
|
37
|
+
|
38
|
+
success = self.generator.generate(
|
39
|
+
prompt=self.script.nodes[node_name]["prompt"],
|
40
|
+
filename=objects.path_of(
|
41
|
+
filename=filename,
|
42
|
+
object_name=self.script.object_name,
|
43
|
+
create=True,
|
44
|
+
),
|
45
|
+
quality=(
|
46
|
+
BLUE_ASSISTANT_IMAGE_DEFAULT_QUALITY if self.script.test_mode else "hd"
|
47
|
+
),
|
48
|
+
size=(
|
49
|
+
BLUE_ASSISTANT_IMAGE_DEFAULT_SIZE
|
50
|
+
if self.script.test_mode
|
51
|
+
else "1792x1024"
|
52
|
+
),
|
53
|
+
)[0]
|
54
|
+
|
55
|
+
if success:
|
56
|
+
self.script.nodes[node_name]["filename"] = filename
|
20
57
|
|
21
|
-
return
|
58
|
+
return success
|
@@ -7,7 +7,10 @@ from blue_objects import file
|
|
7
7
|
from openai_commands.env import OPENAI_API_KEY
|
8
8
|
|
9
9
|
from blue_assistant import NAME
|
10
|
-
from blue_assistant.env import
|
10
|
+
from blue_assistant.env import (
|
11
|
+
BLUE_ASSISTANT_TEXT_DEFAULT_MODEL,
|
12
|
+
BLUE_ASSISTANT_TEXT_MAX_TOKEN,
|
13
|
+
)
|
11
14
|
from blue_assistant.script.actions.generic import GenericAction
|
12
15
|
from blue_assistant.logger import logger
|
13
16
|
|
@@ -17,6 +20,7 @@ NAME = module.name(__file__, NAME)
|
|
17
20
|
class GenerateTextAction(GenericAction):
|
18
21
|
name = file.name(__file__)
|
19
22
|
|
23
|
+
# https://platform.openai.com/docs/guides/text-generation
|
20
24
|
def perform(
|
21
25
|
self,
|
22
26
|
node_name: str,
|
@@ -29,9 +33,9 @@ class GenerateTextAction(GenericAction):
|
|
29
33
|
return False
|
30
34
|
|
31
35
|
messages: List = []
|
32
|
-
|
33
|
-
logger.info("node context: {}".format("
|
34
|
-
for
|
36
|
+
list_of_context_nodes = self.script.get_history(node_name)
|
37
|
+
logger.info("node context: {}".format(" <- ".join(list_of_context_nodes)))
|
38
|
+
for context_node in reversed(list_of_context_nodes):
|
35
39
|
messages += [
|
36
40
|
{
|
37
41
|
"role": "user",
|
@@ -39,21 +43,21 @@ class GenerateTextAction(GenericAction):
|
|
39
43
|
{
|
40
44
|
"type": "text",
|
41
45
|
"text": self.script.apply_vars(
|
42
|
-
self.script.nodes[
|
46
|
+
self.script.nodes[context_node]["prompt"]
|
43
47
|
),
|
44
48
|
}
|
45
49
|
],
|
46
50
|
}
|
47
51
|
]
|
48
52
|
|
49
|
-
if self.script.nodes[
|
53
|
+
if self.script.nodes[context_node].get("completed", False):
|
50
54
|
messages += [
|
51
55
|
{
|
52
56
|
"role": "assistant",
|
53
57
|
"content": [
|
54
58
|
{
|
55
59
|
"type": "text",
|
56
|
-
"text": self.script.nodes[
|
60
|
+
"text": self.script.nodes[context_node]["output"],
|
57
61
|
}
|
58
62
|
],
|
59
63
|
}
|
@@ -67,8 +71,8 @@ class GenerateTextAction(GenericAction):
|
|
67
71
|
try:
|
68
72
|
response = client.chat.completions.create(
|
69
73
|
messages=messages,
|
70
|
-
model=
|
71
|
-
max_tokens=
|
74
|
+
model=BLUE_ASSISTANT_TEXT_DEFAULT_MODEL,
|
75
|
+
max_tokens=BLUE_ASSISTANT_TEXT_MAX_TOKEN,
|
72
76
|
)
|
73
77
|
except Exception as e:
|
74
78
|
logger.error(str(e))
|
@@ -1,14 +1,8 @@
|
|
1
|
-
from typing import Dict, Tuple
|
2
|
-
|
3
|
-
from blueness import module
|
4
1
|
from blue_objects import file
|
5
2
|
|
6
|
-
from blue_assistant import NAME
|
7
3
|
from blue_assistant.script.repository.base.classes import BaseScript
|
8
4
|
from blue_assistant.logger import logger
|
9
5
|
|
10
|
-
NAME = module.name(__file__, NAME)
|
11
|
-
|
12
6
|
|
13
7
|
class GenericAction:
|
14
8
|
name = file.name(__file__)
|
@@ -24,8 +18,7 @@ class GenericAction:
|
|
24
18
|
node_name: str,
|
25
19
|
) -> bool:
|
26
20
|
logger.info(
|
27
|
-
"{}.perform
|
28
|
-
NAME,
|
21
|
+
"{}.perform on {}.{} ...".format(
|
29
22
|
self.__class__.__name__,
|
30
23
|
self.script.name,
|
31
24
|
node_name,
|
blue_assistant/script/load.py
CHANGED
@@ -8,6 +8,7 @@ from blue_assistant.logger import logger
|
|
8
8
|
def load_script(
|
9
9
|
script_name: str,
|
10
10
|
object_name: str,
|
11
|
+
test_mode: bool = False,
|
11
12
|
verbose: bool = False,
|
12
13
|
) -> Tuple[bool, BaseScript]:
|
13
14
|
found: bool = False
|
@@ -23,5 +24,6 @@ def load_script(
|
|
23
24
|
|
24
25
|
return found, script_class(
|
25
26
|
object_name=object_name,
|
27
|
+
test_mode=test_mode,
|
26
28
|
verbose=verbose,
|
27
29
|
)
|
File without changes
|
@@ -0,0 +1,35 @@
|
|
1
|
+
from blueness import module
|
2
|
+
|
3
|
+
from blue_assistant import NAME
|
4
|
+
from blue_assistant.script.repository.base.classes import BaseScript
|
5
|
+
from blue_assistant.logger import logger
|
6
|
+
|
7
|
+
NAME = module.name(__file__, NAME)
|
8
|
+
|
9
|
+
|
10
|
+
def slice_into_frames(
|
11
|
+
script: BaseScript,
|
12
|
+
node_name: str,
|
13
|
+
) -> bool:
|
14
|
+
logger.info(f"{NAME}: processing the output...")
|
15
|
+
|
16
|
+
list_of_frame_prompts = script.nodes[node_name]["output"].split("---")
|
17
|
+
if len(list_of_frame_prompts) != script.vars["frame_count"]:
|
18
|
+
logger.warning(
|
19
|
+
"{} != {}, frame count doesn't match, bad AI! 😁".format(
|
20
|
+
len(list_of_frame_prompts),
|
21
|
+
script.vars["frame_count"],
|
22
|
+
)
|
23
|
+
)
|
24
|
+
|
25
|
+
list_of_frame_prompts += script.vars["frame_count"] * [""]
|
26
|
+
|
27
|
+
for index in range(script.vars["frame_count"]):
|
28
|
+
node_name = f"generating-frame-{index+1:03d}"
|
29
|
+
|
30
|
+
script.nodes[node_name]["prompt"] = script.nodes[node_name]["prompt"].replace(
|
31
|
+
":::input",
|
32
|
+
list_of_frame_prompts[index],
|
33
|
+
)
|
34
|
+
|
35
|
+
return True
|
@@ -0,0 +1,81 @@
|
|
1
|
+
from typing import List
|
2
|
+
import numpy as np
|
3
|
+
import cv2
|
4
|
+
from tqdm import trange
|
5
|
+
|
6
|
+
from blueness import module
|
7
|
+
from blue_objects import file, objects
|
8
|
+
from blue_options import string
|
9
|
+
|
10
|
+
from blue_assistant import NAME
|
11
|
+
from blue_assistant.script.repository.base.classes import BaseScript
|
12
|
+
from blue_assistant.logger import logger
|
13
|
+
|
14
|
+
NAME = module.name(__file__, NAME)
|
15
|
+
|
16
|
+
|
17
|
+
def stitch_the_frames(
|
18
|
+
script: BaseScript,
|
19
|
+
node_name: str,
|
20
|
+
) -> bool:
|
21
|
+
list_of_frames_filenames: List[str] = [
|
22
|
+
filename
|
23
|
+
for filename in [
|
24
|
+
script.nodes[node_name_].get("filename", "")
|
25
|
+
for node_name_ in [
|
26
|
+
f"generating-frame-{index+1:03d}"
|
27
|
+
for index in range(script.vars["frame_count"])
|
28
|
+
]
|
29
|
+
]
|
30
|
+
if filename
|
31
|
+
]
|
32
|
+
if not list_of_frames_filenames:
|
33
|
+
return True
|
34
|
+
|
35
|
+
logger.info(
|
36
|
+
"{} frames to stitch: {}".format(
|
37
|
+
len(list_of_frames_filenames),
|
38
|
+
", ".join(list_of_frames_filenames),
|
39
|
+
)
|
40
|
+
)
|
41
|
+
|
42
|
+
list_of_frames: List[np.ndarray] = []
|
43
|
+
for filename in list_of_frames_filenames:
|
44
|
+
success, frame = file.load_image(
|
45
|
+
objects.path_of(
|
46
|
+
filename=filename,
|
47
|
+
object_name=script.object_name,
|
48
|
+
)
|
49
|
+
)
|
50
|
+
|
51
|
+
if success:
|
52
|
+
list_of_frames += [frame]
|
53
|
+
|
54
|
+
if not list_of_frames:
|
55
|
+
return True
|
56
|
+
|
57
|
+
common_height = list_of_frames[0].shape[0]
|
58
|
+
for index in trange(len(list_of_frames)):
|
59
|
+
if list_of_frames[index].shape[0] != common_height:
|
60
|
+
aspect_ratio = (
|
61
|
+
list_of_frames[index].shape[1] / list_of_frames[index].shape[0]
|
62
|
+
)
|
63
|
+
new_width = int(common_height * aspect_ratio)
|
64
|
+
|
65
|
+
list_of_frames[index] = cv2.resize(
|
66
|
+
list_of_frames[index],
|
67
|
+
(new_width, common_height),
|
68
|
+
interpolation=cv2.INTER_AREA,
|
69
|
+
)
|
70
|
+
|
71
|
+
full_frame = np.concatenate(list_of_frames, axis=1)
|
72
|
+
logger.info(f"full_frame: {string.pretty_shape_of_matrix(full_frame)}")
|
73
|
+
|
74
|
+
return file.save_image(
|
75
|
+
objects.path_of(
|
76
|
+
filename=f"{node_name}.png",
|
77
|
+
object_name=script.object_name,
|
78
|
+
),
|
79
|
+
full_frame,
|
80
|
+
log=True,
|
81
|
+
)
|
@@ -1,9 +1,90 @@
|
|
1
|
-
|
1
|
+
import copy
|
2
2
|
|
3
|
+
from blueness import module
|
4
|
+
from blue_objects import file, path
|
3
5
|
|
6
|
+
from blue_assistant import NAME
|
4
7
|
from blue_assistant.script.repository.generic.classes import GenericScript
|
8
|
+
from blue_assistant.script.repository.blue_amo.actions.slice_into_frames import (
|
9
|
+
slice_into_frames,
|
10
|
+
)
|
11
|
+
from blue_assistant.script.repository.blue_amo.actions.stitch_the_frames import (
|
12
|
+
stitch_the_frames,
|
13
|
+
)
|
5
14
|
from blue_assistant.logger import logger
|
6
15
|
|
16
|
+
NAME = module.name(__file__, NAME)
|
17
|
+
|
7
18
|
|
8
19
|
class BlueAmoScript(GenericScript):
|
9
20
|
name = path.name(file.path(__file__))
|
21
|
+
|
22
|
+
def __init__(
|
23
|
+
self,
|
24
|
+
object_name: str,
|
25
|
+
test_mode: bool = False,
|
26
|
+
verbose: bool = False,
|
27
|
+
):
|
28
|
+
super().__init__(
|
29
|
+
object_name=object_name,
|
30
|
+
test_mode=test_mode,
|
31
|
+
verbose=verbose,
|
32
|
+
)
|
33
|
+
|
34
|
+
if self.test_mode:
|
35
|
+
self.vars["frame_count"] = 1
|
36
|
+
|
37
|
+
holder_node_name = "generating-the-frames"
|
38
|
+
logger.info(
|
39
|
+
"{}: expanding {} X {}...".format(
|
40
|
+
NAME,
|
41
|
+
holder_node_name,
|
42
|
+
self.vars["frame_count"],
|
43
|
+
)
|
44
|
+
)
|
45
|
+
|
46
|
+
holder_node = self.nodes[holder_node_name]
|
47
|
+
del self.nodes[holder_node_name]
|
48
|
+
self.G.remove_node(holder_node_name)
|
49
|
+
|
50
|
+
reduce_node = "stitching-the-frames"
|
51
|
+
self.G.add_node(reduce_node)
|
52
|
+
self.nodes[reduce_node] = {"action": "skip"}
|
53
|
+
|
54
|
+
for index in range(self.vars["frame_count"]):
|
55
|
+
node_name = f"generating-frame-{index+1:03d}"
|
56
|
+
|
57
|
+
self.nodes[node_name] = copy.deepcopy(holder_node)
|
58
|
+
|
59
|
+
self.G.add_node(node_name)
|
60
|
+
self.G.add_edge(
|
61
|
+
node_name,
|
62
|
+
"slicing-into-frames",
|
63
|
+
)
|
64
|
+
self.G.add_edge(
|
65
|
+
reduce_node,
|
66
|
+
node_name,
|
67
|
+
)
|
68
|
+
|
69
|
+
assert self.save_graph()
|
70
|
+
|
71
|
+
def perform_action(
|
72
|
+
self,
|
73
|
+
node_name: str,
|
74
|
+
) -> bool:
|
75
|
+
if not super().perform_action(node_name=node_name):
|
76
|
+
return False
|
77
|
+
|
78
|
+
if node_name == "slicing-into-frames":
|
79
|
+
return slice_into_frames(
|
80
|
+
script=self,
|
81
|
+
node_name=node_name,
|
82
|
+
)
|
83
|
+
|
84
|
+
if node_name == "stitching-the-frames":
|
85
|
+
return stitch_the_frames(
|
86
|
+
script=self,
|
87
|
+
node_name=node_name,
|
88
|
+
)
|
89
|
+
|
90
|
+
return True
|
@@ -9,7 +9,7 @@ from blue_objects.metadata import post_to_object
|
|
9
9
|
|
10
10
|
from blue_assistant import NAME
|
11
11
|
from blue_assistant.script.repository.base.classes import BaseScript
|
12
|
-
from blue_assistant.script.actions.functions import
|
12
|
+
from blue_assistant.script.actions.functions import get_action_class
|
13
13
|
from blue_assistant.logger import logger
|
14
14
|
|
15
15
|
|
@@ -19,6 +19,31 @@ NAME = module.name(__file__, NAME)
|
|
19
19
|
class GenericScript(BaseScript):
|
20
20
|
name = path.name(file.path(__file__))
|
21
21
|
|
22
|
+
def perform_action(
|
23
|
+
self,
|
24
|
+
node_name: str,
|
25
|
+
) -> bool:
|
26
|
+
action_name = self.nodes[node_name].get("action", "unknown")
|
27
|
+
if action_name == "skip":
|
28
|
+
return True
|
29
|
+
|
30
|
+
success, action_class = get_action_class(action_name=action_name)
|
31
|
+
if not success:
|
32
|
+
return success
|
33
|
+
|
34
|
+
logger.info(
|
35
|
+
"{}.perform_action: {} == {} on {}".format(
|
36
|
+
NAME,
|
37
|
+
action_name,
|
38
|
+
action_class.__name__,
|
39
|
+
node_name,
|
40
|
+
)
|
41
|
+
)
|
42
|
+
|
43
|
+
action_object = action_class(script=self)
|
44
|
+
|
45
|
+
return action_object.perform(node_name=node_name)
|
46
|
+
|
22
47
|
def run(
|
23
48
|
self,
|
24
49
|
) -> bool:
|
@@ -26,15 +51,18 @@ class GenericScript(BaseScript):
|
|
26
51
|
return False
|
27
52
|
|
28
53
|
success: bool = True
|
29
|
-
while
|
54
|
+
while (
|
55
|
+
not all(self.nodes[node].get("completed", False) for node in self.nodes)
|
56
|
+
and success
|
57
|
+
):
|
30
58
|
for node_name in tqdm(self.nodes):
|
31
|
-
if self.nodes[node_name]
|
59
|
+
if self.nodes[node_name].get("completed", False):
|
32
60
|
continue
|
33
61
|
|
34
62
|
pending_dependencies = [
|
35
63
|
node_name_
|
36
64
|
for node_name_ in self.G.successors(node_name)
|
37
|
-
if not self.nodes[node_name_]
|
65
|
+
if not self.nodes[node_name_].get("completed", False)
|
38
66
|
]
|
39
67
|
if pending_dependencies:
|
40
68
|
logger.info(
|
@@ -46,10 +74,7 @@ class GenericScript(BaseScript):
|
|
46
74
|
)
|
47
75
|
continue
|
48
76
|
|
49
|
-
if not perform_action(
|
50
|
-
script=self,
|
51
|
-
node_name=node_name,
|
52
|
-
):
|
77
|
+
if not self.perform_action(node_name=node_name):
|
53
78
|
success = False
|
54
79
|
break
|
55
80
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: blue_assistant
|
3
|
-
Version: 4.
|
3
|
+
Version: 4.97.1
|
4
4
|
Summary: 🧠 An AI Assistant.
|
5
5
|
Home-page: https://github.com/kamangir/blue-assistant
|
6
6
|
Author: Arash Abadpour (Kamangir)
|
@@ -72,4 +72,4 @@ graph LR
|
|
72
72
|
|
73
73
|
[](https://github.com/kamangir/blue-assistant/actions/workflows/pylint.yml) [](https://github.com/kamangir/blue-assistant/actions/workflows/pytest.yml) [](https://github.com/kamangir/blue-assistant/actions/workflows/bashtest.yml) [](https://pypi.org/project/blue-assistant/) [](https://pypistats.org/packages/blue-assistant)
|
74
74
|
|
75
|
-
built by 🌀 [`blue_options-4.207.1`](https://github.com/kamangir/awesome-bash-cli), based on 🧠 [`blue_assistant-4.
|
75
|
+
built by 🌀 [`blue_options-4.207.1`](https://github.com/kamangir/awesome-bash-cli), based on 🧠 [`blue_assistant-4.97.1`](https://github.com/kamangir/blue-assistant).
|
@@ -1,8 +1,8 @@
|
|
1
1
|
blue_assistant/README.py,sha256=Nzr3v-VSa8CISkqkLHd8ILyY_WiJ7x2igYPH-lYpzEY,795
|
2
|
-
blue_assistant/__init__.py,sha256=
|
2
|
+
blue_assistant/__init__.py,sha256=PSvVOR6YHG3cJIrNq6NGYQS9Zk8RctcrOYRMi-GaQiI,310
|
3
3
|
blue_assistant/__main__.py,sha256=URtal70XZc0--3FDTYWcLtnGOqBYjMX9gt-L1k8hDXI,361
|
4
|
-
blue_assistant/config.env,sha256=
|
5
|
-
blue_assistant/env.py,sha256=
|
4
|
+
blue_assistant/config.env,sha256=gjGYkDkmzpwgy7_J-i9RclTKZsKtaAibn7mavD9l4u8,210
|
5
|
+
blue_assistant/env.py,sha256=h2goHjsspOLjZ44yFHqHLB7wPl_GCodg3D6yfSE5FfM,732
|
6
6
|
blue_assistant/functions.py,sha256=ajz1GSNU9xYVrFEDSz6Xwg7amWQ_yvW75tQa1ZvRIWc,3
|
7
7
|
blue_assistant/host.py,sha256=SapEe4s9J-7gV3F9JuWEmSfslCeWuJ5f7a-nFObFBrI,208
|
8
8
|
blue_assistant/logger.py,sha256=3MfsXwivdRfVPjAjqdQld3iOg9JB6olbACL8t8gIRgI,105
|
@@ -19,30 +19,33 @@ blue_assistant/.abcli/script/run.sh,sha256=kSXmyM9NUj2X2orSGyu5t_P5frG-gyumbRq-x
|
|
19
19
|
blue_assistant/.abcli/tests/README.sh,sha256=Qs0YUxVB1OZZ70Nqw2kT1LKXeUnC5-XfQRMfqb8Cbwg,152
|
20
20
|
blue_assistant/.abcli/tests/help.sh,sha256=mENB9ZNBEEPmIs9tp8WkQW3dq75_US7EI7_-d4IJQpo,724
|
21
21
|
blue_assistant/.abcli/tests/script_list.sh,sha256=OVOwWO9wR0eeDZTM6uub-eTKbz3eswU3vEUPWXcK-gQ,178
|
22
|
-
blue_assistant/.abcli/tests/script_run.sh,sha256=
|
22
|
+
blue_assistant/.abcli/tests/script_run.sh,sha256=ai6ZIepiDkEufPdVjnPEly2FPQdaHobWKBA5wlyqA8g,743
|
23
23
|
blue_assistant/.abcli/tests/version.sh,sha256=oR2rvYR8zi-0VDPIdPJsmsmWwYaamT8dmNTqUh3-8Gw,154
|
24
24
|
blue_assistant/help/__init__.py,sha256=ajz1GSNU9xYVrFEDSz6Xwg7amWQ_yvW75tQa1ZvRIWc,3
|
25
25
|
blue_assistant/help/__main__.py,sha256=cVejR7OpoWPg0qLbm-PZf5TuJS27x49jzfiyCLyzEns,241
|
26
26
|
blue_assistant/help/functions.py,sha256=9WsmXGMN-R7sqlkGLK0nY90Peg8Gah4rIu75QbLhImo,689
|
27
|
-
blue_assistant/help/script.py,sha256=
|
27
|
+
blue_assistant/help/script.py,sha256=tofv49tIBqoH8ed9hDCFHqzWaXmyyPofvqElk2n976w,1121
|
28
28
|
blue_assistant/script/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
|
-
blue_assistant/script/__main__.py,sha256=
|
30
|
-
blue_assistant/script/load.py,sha256=
|
29
|
+
blue_assistant/script/__main__.py,sha256=eOSOo5yYTPMwIXZ0GkuWkmOcsDWrZtHvClyJizXSk2w,1657
|
30
|
+
blue_assistant/script/load.py,sha256=JsDY9T3HTM9vXngvKsA0Mt_erxAnRR_jI62-JhrOBMU,831
|
31
31
|
blue_assistant/script/actions/__init__.py,sha256=8Sp6avoJGDXVORvx5mvkxTNaxjz_KevKN4Wb8qLZHsQ,487
|
32
|
-
blue_assistant/script/actions/functions.py,sha256=
|
33
|
-
blue_assistant/script/actions/generate_image.py,sha256=
|
34
|
-
blue_assistant/script/actions/generate_text.py,sha256=
|
35
|
-
blue_assistant/script/actions/generic.py,sha256=
|
32
|
+
blue_assistant/script/actions/functions.py,sha256=nazOu20plxxxUIcr1YCpNiWn4zmcGCCWcojWxLnZtl8,669
|
33
|
+
blue_assistant/script/actions/generate_image.py,sha256=wvj3V10gWe_rcxh5xIT3JZ2I-Uwgh_Rl_E73JLsenUc,1695
|
34
|
+
blue_assistant/script/actions/generate_text.py,sha256=EeE57DAbAj3n7VDUzFn1kT8LJCwHIQvg-Ds8unxicEQ,2971
|
35
|
+
blue_assistant/script/actions/generic.py,sha256=9VCnJ9u1eT3H63Ihg6SRpKrWNw5MPa6MLP16QYl6HaE,577
|
36
36
|
blue_assistant/script/actions/wip.py,sha256=K4kJE4bn3u6o-QWTESPydO_eD54zOwZbU9WLAO94z1Q,171
|
37
37
|
blue_assistant/script/repository/__init__.py,sha256=WFkbe-6yyljpmeVpXgLhOPt-YRc7BwkRNzPO-7Wz0Dg,573
|
38
38
|
blue_assistant/script/repository/blue_amo/__init__.py,sha256=WjL9GIlN-DBnbUMJ8O_FxTp0rcVGlsIS3H9YtXEefTk,76
|
39
|
-
blue_assistant/script/repository/blue_amo/classes.py,sha256=
|
39
|
+
blue_assistant/script/repository/blue_amo/classes.py,sha256=SK3kNk14cZ8M7-aU3tQtbrTQLcw-ev_KtNR8J0U7QZY,2382
|
40
|
+
blue_assistant/script/repository/blue_amo/actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
41
|
+
blue_assistant/script/repository/blue_amo/actions/slice_into_frames.py,sha256=AId4m8K64RHNS_RF_TvifOZPQqyS84ejKqz3KNxRsOA,1041
|
42
|
+
blue_assistant/script/repository/blue_amo/actions/stitch_the_frames.py,sha256=Q9kqawnTxHTM-Mff8Ok0kdvhV-FIAGaKizy7JwdSrPU,2229
|
40
43
|
blue_assistant/script/repository/generic/__init__.py,sha256=kLffGsQMQAFJTw6IZBE5eBxvshP1x9wwHHR4hsDJblo,75
|
41
|
-
blue_assistant/script/repository/generic/classes.py,sha256=
|
44
|
+
blue_assistant/script/repository/generic/classes.py,sha256=7XIbzwMFFLr79NcVHi53uRPznw2wkQIF8UQ1-KAdNAY,2540
|
42
45
|
blue_assistant/script/repository/moon_datasets/__init__.py,sha256=aCtmP2avh3yKAJ668S3GsLR9vbBOm5zt9FSFCqy_tAs,86
|
43
46
|
blue_assistant/script/repository/moon_datasets/classes.py,sha256=68zThDhjF9gGRnsw8EKNLGOMBFbCSljt0jGovuOzCAc,197
|
44
|
-
blue_assistant-4.
|
45
|
-
blue_assistant-4.
|
46
|
-
blue_assistant-4.
|
47
|
-
blue_assistant-4.
|
48
|
-
blue_assistant-4.
|
47
|
+
blue_assistant-4.97.1.dist-info/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
|
48
|
+
blue_assistant-4.97.1.dist-info/METADATA,sha256=ObxR2e-zVw0o4-sBebHfSFzZ-D_WcEChr1OnU69oOMw,2625
|
49
|
+
blue_assistant-4.97.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
50
|
+
blue_assistant-4.97.1.dist-info/top_level.txt,sha256=ud0BkBbdOVze13bNqHuhZj1rwCztaBtDf5ChEYzASOs,15
|
51
|
+
blue_assistant-4.97.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|