PraisonAI 0.0.59rc5__cp312-cp312-manylinux_2_35_x86_64.whl → 0.0.59rc6__cp312-cp312-manylinux_2_35_x86_64.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.
Potentially problematic release.
This version of PraisonAI might be problematic. Click here for more details.
- praisonai/cli.py +32 -2
- praisonai/deploy.py +1 -1
- praisonai/setup/config.yaml +58 -0
- praisonai/setup/setup_conda_env.sh +22 -10
- {praisonai-0.0.59rc5.dist-info → praisonai-0.0.59rc6.dist-info}/METADATA +1 -1
- {praisonai-0.0.59rc5.dist-info → praisonai-0.0.59rc6.dist-info}/RECORD +9 -8
- {praisonai-0.0.59rc5.dist-info → praisonai-0.0.59rc6.dist-info}/LICENSE +0 -0
- {praisonai-0.0.59rc5.dist-info → praisonai-0.0.59rc6.dist-info}/WHEEL +0 -0
- {praisonai-0.0.59rc5.dist-info → praisonai-0.0.59rc6.dist-info}/entry_points.txt +0 -0
praisonai/cli.py
CHANGED
|
@@ -100,12 +100,42 @@ class PraisonAI:
|
|
|
100
100
|
return
|
|
101
101
|
|
|
102
102
|
if args.agent_file == 'train':
|
|
103
|
+
import subprocess
|
|
104
|
+
package_root = os.path.dirname(os.path.abspath(__file__))
|
|
105
|
+
config_yaml_source = os.path.join(package_root, 'setup', 'config.yaml')
|
|
106
|
+
config_yaml_destination = os.path.join(os.getcwd(), 'config.yaml')
|
|
107
|
+
|
|
108
|
+
if not os.path.exists(config_yaml_destination):
|
|
109
|
+
try:
|
|
110
|
+
shutil.copyfile(config_yaml_source, config_yaml_destination)
|
|
111
|
+
print("config.yaml copied to the current directory.")
|
|
112
|
+
except FileExistsError:
|
|
113
|
+
print("config.yaml already exists in the current directory. Skipping copy.")
|
|
114
|
+
else:
|
|
115
|
+
print("config.yaml already exists in the current directory. Skipping copy.")
|
|
116
|
+
|
|
103
117
|
if 'init' in sys.argv:
|
|
104
118
|
from praisonai.setup.setup_conda_env import main as setup_conda_main
|
|
105
119
|
setup_conda_main()
|
|
106
|
-
|
|
120
|
+
print("All packages installed")
|
|
121
|
+
return
|
|
122
|
+
|
|
123
|
+
try:
|
|
124
|
+
result = subprocess.check_output(['conda', 'env', 'list'])
|
|
125
|
+
if 'unsloth_env' in result.decode('utf-8'):
|
|
126
|
+
print("Conda environment 'unsloth_env' found.")
|
|
127
|
+
else:
|
|
128
|
+
raise subprocess.CalledProcessError(1, 'grep')
|
|
129
|
+
except subprocess.CalledProcessError:
|
|
130
|
+
print("Conda environment 'unsloth_env' not found. Setting it up...")
|
|
131
|
+
from praisonai.setup.setup_conda_env import main as setup_conda_main
|
|
132
|
+
setup_conda_main()
|
|
133
|
+
print("All packages installed.")
|
|
134
|
+
|
|
135
|
+
|
|
107
136
|
train_args = sys.argv[2:] # Get all arguments after 'train'
|
|
108
|
-
|
|
137
|
+
train_script_path = os.path.join(package_root, 'train.py')
|
|
138
|
+
subprocess.check_call(['conda', 'run', '--name', 'unsloth_env', 'python', train_script_path])
|
|
109
139
|
return
|
|
110
140
|
|
|
111
141
|
invocation_cmd = "praisonai"
|
praisonai/deploy.py
CHANGED
|
@@ -56,7 +56,7 @@ class CloudDeployer:
|
|
|
56
56
|
file.write("FROM python:3.11-slim\n")
|
|
57
57
|
file.write("WORKDIR /app\n")
|
|
58
58
|
file.write("COPY . .\n")
|
|
59
|
-
file.write("RUN pip install flask praisonai==0.0.
|
|
59
|
+
file.write("RUN pip install flask praisonai==0.0.59rc6 gunicorn markdown\n")
|
|
60
60
|
file.write("EXPOSE 8080\n")
|
|
61
61
|
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
|
|
62
62
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
model_name: "unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit"
|
|
2
|
+
hf_model_name: "mervinpraison/llama-3.1-tamilan-8B-test"
|
|
3
|
+
max_seq_length: 2048
|
|
4
|
+
load_in_4bit: true
|
|
5
|
+
lora_r: 16
|
|
6
|
+
lora_target_modules:
|
|
7
|
+
- "q_proj"
|
|
8
|
+
- "k_proj"
|
|
9
|
+
- "v_proj"
|
|
10
|
+
- "o_proj"
|
|
11
|
+
- "gate_proj"
|
|
12
|
+
- "up_proj"
|
|
13
|
+
- "down_proj"
|
|
14
|
+
lora_alpha: 16
|
|
15
|
+
lora_dropout: 0
|
|
16
|
+
lora_bias: "none"
|
|
17
|
+
use_gradient_checkpointing: "unsloth"
|
|
18
|
+
random_state: 3407
|
|
19
|
+
use_rslora: false
|
|
20
|
+
loftq_config: null
|
|
21
|
+
|
|
22
|
+
dataset:
|
|
23
|
+
- name: "yahma/alpaca-cleaned"
|
|
24
|
+
split_type: "train"
|
|
25
|
+
processing_func: "format_prompts"
|
|
26
|
+
rename:
|
|
27
|
+
input: "input"
|
|
28
|
+
output: "output"
|
|
29
|
+
instruction: "instruction"
|
|
30
|
+
filter_data: false
|
|
31
|
+
filter_column_value: "id"
|
|
32
|
+
filter_value: "alpaca"
|
|
33
|
+
num_samples: 20000
|
|
34
|
+
|
|
35
|
+
dataset_text_field: "text"
|
|
36
|
+
dataset_num_proc: 2
|
|
37
|
+
packing: false
|
|
38
|
+
|
|
39
|
+
per_device_train_batch_size: 2
|
|
40
|
+
gradient_accumulation_steps: 2
|
|
41
|
+
warmup_steps: 5
|
|
42
|
+
num_train_epochs: 1
|
|
43
|
+
max_steps: 10
|
|
44
|
+
learning_rate: 2.0e-4
|
|
45
|
+
logging_steps: 1
|
|
46
|
+
optim: "adamw_8bit"
|
|
47
|
+
weight_decay: 0.01
|
|
48
|
+
lr_scheduler_type: "linear"
|
|
49
|
+
seed: 3407
|
|
50
|
+
output_dir: "outputs"
|
|
51
|
+
|
|
52
|
+
quantization_method:
|
|
53
|
+
- "q4_k_m"
|
|
54
|
+
- "q8_0"
|
|
55
|
+
- "q5_k_m"
|
|
56
|
+
|
|
57
|
+
ollama_model: "llama3.1-tamilan-test"
|
|
58
|
+
model_parameters: "8b"
|
|
@@ -35,8 +35,16 @@ fi
|
|
|
35
35
|
# Create and activate the Conda environment
|
|
36
36
|
ENV_NAME="unsloth_env"
|
|
37
37
|
if conda info --envs | grep -q $ENV_NAME; then
|
|
38
|
-
echo "Environment $ENV_NAME already exists.
|
|
39
|
-
conda
|
|
38
|
+
echo "Environment $ENV_NAME already exists. Recreating..."
|
|
39
|
+
conda env remove -y -n $ENV_NAME # Remove existing environment
|
|
40
|
+
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
41
|
+
# macOS (both Intel and M1/M2)
|
|
42
|
+
conda create --name $ENV_NAME python=3.10 pytorch=2.3.0 -c pytorch -y
|
|
43
|
+
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
44
|
+
# Linux
|
|
45
|
+
conda create --name $ENV_NAME python=3.10 pytorch=2.3.0 cudatoolkit=11.8 -c pytorch -c nvidia -y
|
|
46
|
+
fi
|
|
47
|
+
# conda activate $ENV_NAME
|
|
40
48
|
else
|
|
41
49
|
echo "Creating new environment $ENV_NAME..."
|
|
42
50
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
@@ -45,16 +53,20 @@ else
|
|
|
45
53
|
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
46
54
|
# Linux
|
|
47
55
|
conda create --name $ENV_NAME python=3.10 pytorch=2.3.0 cudatoolkit=11.8 -c pytorch -c nvidia -y
|
|
48
|
-
conda activate $ENV_NAME
|
|
49
|
-
pip install xformers==0.0.26.post1
|
|
50
56
|
fi
|
|
57
|
+
# conda activate $ENV_NAME
|
|
51
58
|
fi
|
|
52
59
|
|
|
53
|
-
source $HOME/miniconda/bin/activate $ENV_NAME
|
|
60
|
+
# source $HOME/miniconda/bin/activate $ENV_NAME
|
|
61
|
+
|
|
62
|
+
# Get full path of pip
|
|
63
|
+
PIP_FULL_PATH=$(conda run -n $ENV_NAME which pip)
|
|
54
64
|
|
|
55
|
-
# Install other packages
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
65
|
+
# Install other packages within the activated environment
|
|
66
|
+
# Use PIP_FULL_PATH to run pip commands
|
|
67
|
+
$PIP_FULL_PATH install --upgrade pip
|
|
68
|
+
$PIP_FULL_PATH install "xformers==0.0.26.post1"
|
|
69
|
+
$PIP_FULL_PATH install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git@4e570be9ae4ced8cdc64e498125708e34942befc"
|
|
70
|
+
$PIP_FULL_PATH install --no-deps "trl<0.9.0" peft accelerate bitsandbytes
|
|
59
71
|
|
|
60
|
-
echo "Setup completed successfully!"
|
|
72
|
+
echo "Setup completed successfully!"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.59rc6
|
|
4
4
|
Summary: PraisonAI application combines AutoGen and CrewAI or similar frameworks into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customization, and efficient human-agent collaboration.
|
|
5
5
|
Author: Mervin Praison
|
|
6
6
|
Requires-Python: >=3.10,<3.13
|
|
@@ -3,8 +3,8 @@ praisonai/__main__.py,sha256=MVgsjMThjBexHt4nhd760JCqvP4x0IQcwo8kULOK4FQ,144
|
|
|
3
3
|
praisonai/agents_generator.py,sha256=8d1WRbubvEkBrW1HZ7_xnGyqgJi0yxmXa3MgTIqef1c,19127
|
|
4
4
|
praisonai/auto.py,sha256=9spTXqj47Hmmqv5QHRYE_RzSVHH_KoPbaZjskUj2UcE,7895
|
|
5
5
|
praisonai/chainlit_ui.py,sha256=bNR7s509lp0I9JlJNvwCZRUZosC64qdvlFCt8NmFamQ,12216
|
|
6
|
-
praisonai/cli.py,sha256=
|
|
7
|
-
praisonai/deploy.py,sha256=
|
|
6
|
+
praisonai/cli.py,sha256=C8RwY-r1-86UQ4w9Z2dQj9fhMR0WJ56r6KFyBB5-c3U,16477
|
|
7
|
+
praisonai/deploy.py,sha256=S5qpzGQkevxEiYjfqfDoV7H620qsnSpfF6dgjF-pgyM,6031
|
|
8
8
|
praisonai/inbuilt_tools/__init__.py,sha256=mUKnbL6Gram9c9f2m8wJwEzURBLmPEOcHzwySBH89YA,74
|
|
9
9
|
praisonai/inbuilt_tools/autogen_tools.py,sha256=svYkM2N7DVFvbiwgoAS7U_MqTOD8rHf8VD3BaFUV5_Y,14907
|
|
10
10
|
praisonai/inc/__init__.py,sha256=sPDlYBBwdk0VlWzaaM_lG0_LD07lS2HRGvPdxXJFiYg,62
|
|
@@ -23,9 +23,10 @@ praisonai/public/movie.svg,sha256=aJ2EQ8vXZusVsF2SeuAVxP4RFJzQ14T26ejrGYdBgzk,12
|
|
|
23
23
|
praisonai/public/thriller.svg,sha256=2dYY72EcgbEyTxS4QzjAm37Y4srtPWEW4vCMFki98ZI,3163
|
|
24
24
|
praisonai/setup/__init__.py ,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
praisonai/setup/build.py,sha256=NyTAXQ_UZ8vKo_KwCINp8ctmauZyCMDkw1rys3ay0ec,646
|
|
26
|
+
praisonai/setup/config.yaml,sha256=t2WtEDT4JE4yVMAg7hKD18XER3qz41-V36HHYp07yEo,1162
|
|
26
27
|
praisonai/setup/post_install.py,sha256=hXukn_7bL64vE582SZcS-9MiZGeJj6hN7upoR1oJ-Bo,576
|
|
27
28
|
praisonai/setup/setup_conda_env.py,sha256=4QiWrqgEObivzOMwfJgWaCPpUEpB68cQ6lFwVwFoufk,816
|
|
28
|
-
praisonai/setup/setup_conda_env.sh,sha256=
|
|
29
|
+
praisonai/setup/setup_conda_env.sh,sha256=grRG_FGYHAYMnHNyQrcZxVxSSLghSWUQuW4DHdIKmPU,2718
|
|
29
30
|
praisonai/test.py,sha256=OL-wesjA5JTohr8rtr6kWoaS4ImkJg2l0GXJ-dUUfRU,4090
|
|
30
31
|
praisonai/train.py,sha256=Kuckd3TjW6ZYTISyXpL0upB-NibsEmwk1BMhRHPXba0,9200
|
|
31
32
|
praisonai/ui/chat.py,sha256=B4F1R7qP-0c-elg8WcRsYlr6-FkmHWtdunGIzU7WrDM,9321
|
|
@@ -39,8 +40,8 @@ praisonai/ui/public/movie.svg,sha256=aJ2EQ8vXZusVsF2SeuAVxP4RFJzQ14T26ejrGYdBgzk
|
|
|
39
40
|
praisonai/ui/public/thriller.svg,sha256=2dYY72EcgbEyTxS4QzjAm37Y4srtPWEW4vCMFki98ZI,3163
|
|
40
41
|
praisonai/ui/sql_alchemy.py,sha256=HsyeRq-G9qbQobHWpTJHHKQiT4FvYw_7iuv-2PNh0IU,27419
|
|
41
42
|
praisonai/version.py,sha256=ugyuFliEqtAwQmH4sTlc16YXKYbFWDmfyk87fErB8-8,21
|
|
42
|
-
praisonai-0.0.
|
|
43
|
-
praisonai-0.0.
|
|
44
|
-
praisonai-0.0.
|
|
45
|
-
praisonai-0.0.
|
|
46
|
-
praisonai-0.0.
|
|
43
|
+
praisonai-0.0.59rc6.dist-info/LICENSE,sha256=kqvFysVlnFxYOu0HxCe2HlmZmJtdmNGOxWRRkT9TsWc,1035
|
|
44
|
+
praisonai-0.0.59rc6.dist-info/METADATA,sha256=vNj7yWobbpL8E-o0faxY1SXp-ruDlybRgRag5e1Hb_Q,11151
|
|
45
|
+
praisonai-0.0.59rc6.dist-info/WHEEL,sha256=HBsDV7Hj4OTiS1GX6ua7iQXUQTB9UHftbBxr7Q8Xm9c,110
|
|
46
|
+
praisonai-0.0.59rc6.dist-info/entry_points.txt,sha256=jB078LEGLY3Ky_indhclomRIVVpXrPSksHjJ-tcBZ-o,133
|
|
47
|
+
praisonai-0.0.59rc6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|