PraisonAI 0.0.59rc3__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 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
- from setup.setup_conda_env import main as setup_conda_main
118
+ from praisonai.setup.setup_conda_env import main as setup_conda_main
105
119
  setup_conda_main()
106
- from .train import main as train_main
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
- train_main()
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.59rc3 gunicorn markdown\n")
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
 
File without changes
@@ -0,0 +1,21 @@
1
+ import subprocess
2
+ import sys
3
+ import os
4
+
5
+ def build(setup_kwargs):
6
+ try:
7
+ # Get the directory of the current script
8
+ script_dir = os.path.dirname(os.path.abspath(__file__))
9
+
10
+ # Construct the path to post_install.py
11
+ post_install_script = os.path.join(script_dir, 'post_install.py')
12
+
13
+ # Run the post_install.py script
14
+ subprocess.check_call([sys.executable, post_install_script])
15
+ except subprocess.CalledProcessError as e:
16
+ print(f"Error occurred while running the post-install script: {e}")
17
+ sys.exit(1)
18
+ return setup_kwargs
19
+
20
+ if __name__ == "__main__":
21
+ build({})
@@ -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"
@@ -0,0 +1,20 @@
1
+ import subprocess
2
+ import sys
3
+ import os
4
+
5
+ def main():
6
+ try:
7
+ # Get the absolute path of the current file
8
+ current_file = os.path.abspath(__file__)
9
+
10
+ # Get the directory of the current file
11
+ script_dir = os.path.dirname(current_file)
12
+
13
+ # Construct the path to setup_conda_env.py
14
+ setup_script = os.path.join(script_dir, 'setup_conda_env.py')
15
+ except subprocess.CalledProcessError as e:
16
+ print(f"Error occurred while running the setup script: {e}")
17
+ sys.exit(1)
18
+
19
+ if __name__ == "__main__":
20
+ main()
@@ -0,0 +1,25 @@
1
+ import subprocess
2
+ import os
3
+ import sys
4
+ import platform
5
+
6
+ def main():
7
+ script_dir = os.path.dirname(os.path.abspath(__file__))
8
+ script_path = os.path.join(script_dir, 'setup_conda_env.sh')
9
+
10
+ if platform.system() == 'Windows':
11
+ print("Windows detected. Please run the setup_conda_env.sh script manually in Git Bash or WSL.")
12
+ print(f"Script location: {script_path}")
13
+ sys.exit(1)
14
+
15
+ try:
16
+ subprocess.check_call(['bash', script_path])
17
+ except subprocess.CalledProcessError as e:
18
+ print(f"Error occurred while running the setup script: {e}")
19
+ print("Setup failed. Please check the error message above and try to resolve the issue.")
20
+ sys.exit(1)
21
+
22
+ print("Conda environment setup completed successfully!")
23
+
24
+ if __name__ == "__main__":
25
+ main()
@@ -0,0 +1,72 @@
1
+ #!/bin/bash
2
+
3
+ # Detect OS and architecture
4
+ if [[ "$OSTYPE" == "darwin"* ]]; then
5
+ # macOS
6
+ if [[ $(uname -m) == 'arm64' ]]; then
7
+ MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh"
8
+ else
9
+ MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh"
10
+ fi
11
+ elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
12
+ # Linux
13
+ MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"
14
+ elif [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
15
+ # Windows
16
+ MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe"
17
+ echo "Windows detected. Please run this script in Git Bash or WSL."
18
+ exit 1
19
+ else
20
+ echo "Unsupported operating system: $OSTYPE"
21
+ exit 1
22
+ fi
23
+
24
+ # Check if conda is already installed
25
+ if ! command -v conda &> /dev/null; then
26
+ echo "Conda is not installed. Installing Miniconda..."
27
+ wget $MINICONDA_URL -O ~/miniconda.sh
28
+ bash ~/miniconda.sh -b -p $HOME/miniconda
29
+ source $HOME/miniconda/bin/activate
30
+ conda init
31
+ else
32
+ echo "Conda is already installed."
33
+ fi
34
+
35
+ # Create and activate the Conda environment
36
+ ENV_NAME="unsloth_env"
37
+ if conda info --envs | grep -q $ENV_NAME; then
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
48
+ else
49
+ echo "Creating new environment $ENV_NAME..."
50
+ if [[ "$OSTYPE" == "darwin"* ]]; then
51
+ # macOS (both Intel and M1/M2)
52
+ conda create --name $ENV_NAME python=3.10 pytorch=2.3.0 -c pytorch -y
53
+ elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
54
+ # Linux
55
+ conda create --name $ENV_NAME python=3.10 pytorch=2.3.0 cudatoolkit=11.8 -c pytorch -c nvidia -y
56
+ fi
57
+ # conda activate $ENV_NAME
58
+ fi
59
+
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)
64
+
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
71
+
72
+ echo "Setup completed successfully!"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PraisonAI
3
- Version: 0.0.59rc3
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=i79pISe6XzvOxsKTaAbJTLFJBcR7iwoaogslKE4gpG8,14865
7
- praisonai/deploy.py,sha256=M6RmUMjWqM6iNq89kmd8-c6C-UO8136TvDHnyBCKj5k,6031
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
@@ -21,6 +21,12 @@ praisonai/public/logo_dark.png,sha256=frHz1zkrnivGssJgk9iy1cabojkVgm8B4MllFwL_Cn
21
21
  praisonai/public/logo_light.png,sha256=8cQRti_Ysa30O3_7C3ku2w40LnVUUlUok47H-3ZZHSU,19656
22
22
  praisonai/public/movie.svg,sha256=aJ2EQ8vXZusVsF2SeuAVxP4RFJzQ14T26ejrGYdBgzk,1289
23
23
  praisonai/public/thriller.svg,sha256=2dYY72EcgbEyTxS4QzjAm37Y4srtPWEW4vCMFki98ZI,3163
24
+ praisonai/setup/__init__.py ,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
+ praisonai/setup/build.py,sha256=NyTAXQ_UZ8vKo_KwCINp8ctmauZyCMDkw1rys3ay0ec,646
26
+ praisonai/setup/config.yaml,sha256=t2WtEDT4JE4yVMAg7hKD18XER3qz41-V36HHYp07yEo,1162
27
+ praisonai/setup/post_install.py,sha256=hXukn_7bL64vE582SZcS-9MiZGeJj6hN7upoR1oJ-Bo,576
28
+ praisonai/setup/setup_conda_env.py,sha256=4QiWrqgEObivzOMwfJgWaCPpUEpB68cQ6lFwVwFoufk,816
29
+ praisonai/setup/setup_conda_env.sh,sha256=grRG_FGYHAYMnHNyQrcZxVxSSLghSWUQuW4DHdIKmPU,2718
24
30
  praisonai/test.py,sha256=OL-wesjA5JTohr8rtr6kWoaS4ImkJg2l0GXJ-dUUfRU,4090
25
31
  praisonai/train.py,sha256=Kuckd3TjW6ZYTISyXpL0upB-NibsEmwk1BMhRHPXba0,9200
26
32
  praisonai/ui/chat.py,sha256=B4F1R7qP-0c-elg8WcRsYlr6-FkmHWtdunGIzU7WrDM,9321
@@ -34,8 +40,8 @@ praisonai/ui/public/movie.svg,sha256=aJ2EQ8vXZusVsF2SeuAVxP4RFJzQ14T26ejrGYdBgzk
34
40
  praisonai/ui/public/thriller.svg,sha256=2dYY72EcgbEyTxS4QzjAm37Y4srtPWEW4vCMFki98ZI,3163
35
41
  praisonai/ui/sql_alchemy.py,sha256=HsyeRq-G9qbQobHWpTJHHKQiT4FvYw_7iuv-2PNh0IU,27419
36
42
  praisonai/version.py,sha256=ugyuFliEqtAwQmH4sTlc16YXKYbFWDmfyk87fErB8-8,21
37
- praisonai-0.0.59rc3.dist-info/LICENSE,sha256=kqvFysVlnFxYOu0HxCe2HlmZmJtdmNGOxWRRkT9TsWc,1035
38
- praisonai-0.0.59rc3.dist-info/METADATA,sha256=Tra_xHE_52Nb8rFrpdIubryFhaIE2gEBkF2ZFnnVIRQ,11151
39
- praisonai-0.0.59rc3.dist-info/WHEEL,sha256=HBsDV7Hj4OTiS1GX6ua7iQXUQTB9UHftbBxr7Q8Xm9c,110
40
- praisonai-0.0.59rc3.dist-info/entry_points.txt,sha256=jB078LEGLY3Ky_indhclomRIVVpXrPSksHjJ-tcBZ-o,133
41
- praisonai-0.0.59rc3.dist-info/RECORD,,
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,,