speedy-utils 1.1.45__tar.gz → 1.1.46__tar.gz
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.
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/PKG-INFO +1 -1
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/pyproject.toml +2 -1
- speedy_utils-1.1.46/src/speedy_utils/scripts/kill_mpython.py +58 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/scripts/mpython.py +51 -11
- speedy_utils-1.1.46/test.py +8 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.githooks/pre-push +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/copilot-instructions.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/prompts/improveParallelErrorHandling.prompt.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/skills/caching-utilities/SKILL.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/skills/caching-utilities/examples/caching_example.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/skills/io-utilities/SKILL.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/skills/io-utilities/examples/io_example.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/skills/llm-integration/SKILL.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/skills/llm-integration/examples/llm_example.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/skills/multi-threading-processing/SKILL.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/skills/ray-distributed-computing/SKILL.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/skills/skill-creation/SKILL.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/skills/vision-utilities/SKILL.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/skills/vision-utilities/examples/vision_example.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/workflows/publish.yml +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.gitignore +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/.pre-commit-config.yaml +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/AGENTS.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/README.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/bumpversion.sh +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/debug/debug_generate_response.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/debug/debug_n_param.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/debug/debug_n_structure.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/debug/integration_test.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/debug/test_decode_api.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/debug/test_endpoints.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/debug/test_generate.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/debug/test_generate_endpoint.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/docs/GENERATE_QUICKREF.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/docs/IMPLEMENTATION.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/docs/QUICKSTART.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/docs/TOKENIZATION.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/docs/TOKENIZATION_IMPLEMENTATION.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/docs/zero_copy_sharing.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/examples/generate_example.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/examples/llm_ray_example.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/examples/pytorch_large_model.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/examples/shared_kwargs_example.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/examples/temperature_range_example.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/examples/test_parallel_gpu.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/examples/test_share_ray.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/examples/tokenization_example.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/examples/vision_utils_example.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/experiments/exp1/dockerfile +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/experiments/exp1/run_in_docker.sh +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/experiments/exp1/test.png +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/experiments/test_read_image.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/notebooks/README.ipynb +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/notebooks/llm_utils/llm_as_a_judge.ipynb +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/notebooks/parallel_gpu_pool.ipynb +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/notebooks/ray_tutorial.ipynb +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/notebooks/test_multi_thread.ipynb +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/ruff.toml +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/scripts/bug.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/scripts/bug_simple.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/scripts/debug_import_time.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/scripts/deploy.sh +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/scripts/imports.sh +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/scripts/test.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/scripts/test_both_backends.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/scripts/test_error_handling.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/scripts/test_import_time_vision.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/scripts/test_locals.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/scripts/test_ray_locals.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/scripts/test_ray_mp.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/setup.cfg +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/datasets_utils/convert_to_arrow.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/__init__.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/chat_format/__init__.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/chat_format/display.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/chat_format/transform.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/chat_format/utils.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/group_messages.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/llm_ray.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/lm/__init__.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/lm/async_lm/__init__.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/lm/async_lm/_utils.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/lm/async_lm/async_llm_task.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/lm/async_lm/async_lm.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/lm/async_lm/async_lm_base.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/lm/async_lm/lm_specific.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/lm/base_prompt_builder.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/lm/llm.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/lm/llm_signature.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/lm/lm_base.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/lm/mixins.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/lm/openai_memoize.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/lm/signature.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/lm/utils.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/scripts/README.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/scripts/fast_vllm.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/scripts/vllm_load_balancer.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/scripts/vllm_serve.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/vector_cache/__init__.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/vector_cache/cli.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/vector_cache/core.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/vector_cache/types.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/llm_utils/vector_cache/utils.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/__imports.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/__init__.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/common/__init__.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/common/clock.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/common/function_decorator.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/common/logger.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/common/notebook_utils.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/common/patcher.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/common/report_manager.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/common/utils_cache.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/common/utils_error.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/common/utils_io.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/common/utils_misc.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/common/utils_print.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/multi_worker/__init__.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/multi_worker/dataset_ray.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/multi_worker/parallel_gpu_pool.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/multi_worker/process.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/multi_worker/progress.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/multi_worker/thread.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/scripts/__init__.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/scripts/openapi_client_codegen.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/vision_utils/README.md +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/vision_utils/__init__.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/vision_utils/io_utils.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/vision_utils/plot.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/import_all.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/import_time_report.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/integration_test.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/llm_utils/test_llm_mixins.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/sample_objects.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/test.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/test_logger.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/test_logger_format.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/test_memoize_typing.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/test_mpython.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/test_multithread_error_trace.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/test_process.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/test_process_update.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/test_pytorch_sharing.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/test_shared_kwargs.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/test_thread.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/tests/test_tokenization.py +0 -0
- {speedy_utils-1.1.45 → speedy_utils-1.1.46}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "speedy-utils"
|
|
3
|
-
version = "1.1.
|
|
3
|
+
version = "1.1.46"
|
|
4
4
|
description = "Fast and easy-to-use package for data science"
|
|
5
5
|
authors = [{ name = "AnhVTH", email = "anhvth.226@gmail.com" }]
|
|
6
6
|
readme = "README.md"
|
|
@@ -65,6 +65,7 @@ svllm = "llm_utils.scripts.vllm_serve:main"
|
|
|
65
65
|
svllm-lb = "llm_utils.scripts.vllm_load_balancer:run_load_balancer"
|
|
66
66
|
openapi_client_codegen = "speedy_utils.scripts.openapi_client_codegen:main"
|
|
67
67
|
fast-vllm = "llm_utils.scripts.fast_vllm:main"
|
|
68
|
+
kill-mpython = "speedy_utils.scripts.kill_mpython:main"
|
|
68
69
|
|
|
69
70
|
[build-system]
|
|
70
71
|
requires = ["hatchling"]
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Script to kill all tmux sessions matching 'mpython*' pattern."""
|
|
3
|
+
|
|
4
|
+
import subprocess
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def main():
|
|
9
|
+
"""Kill all tmux sessions with names starting with 'mpython'."""
|
|
10
|
+
try:
|
|
11
|
+
# Get list of tmux sessions matching the pattern
|
|
12
|
+
result = subprocess.run(
|
|
13
|
+
["tmux", "ls"],
|
|
14
|
+
capture_output=True,
|
|
15
|
+
text=True
|
|
16
|
+
)
|
|
17
|
+
if result.returncode != 0:
|
|
18
|
+
if "no server running" in result.stderr.lower():
|
|
19
|
+
print("No tmux server running.")
|
|
20
|
+
return
|
|
21
|
+
print(f"Error listing tmux sessions: {result.stderr}")
|
|
22
|
+
sys.exit(result.returncode)
|
|
23
|
+
|
|
24
|
+
sessions = []
|
|
25
|
+
for line in result.stdout.strip().split('\n'):
|
|
26
|
+
if line.strip():
|
|
27
|
+
session_name = line.split(':')[0]
|
|
28
|
+
if session_name.startswith('mpython'):
|
|
29
|
+
sessions.append(session_name)
|
|
30
|
+
|
|
31
|
+
if not sessions:
|
|
32
|
+
print("No tmux sessions found matching 'mpython*'")
|
|
33
|
+
return
|
|
34
|
+
|
|
35
|
+
print(f"Found {len(sessions)} tmux session(s) to kill: {', '.join(sessions)}")
|
|
36
|
+
|
|
37
|
+
# Kill each session
|
|
38
|
+
for session in sessions:
|
|
39
|
+
kill_result = subprocess.run(
|
|
40
|
+
["tmux", "kill-session", "-t", session],
|
|
41
|
+
capture_output=True,
|
|
42
|
+
text=True
|
|
43
|
+
)
|
|
44
|
+
if kill_result.returncode == 0:
|
|
45
|
+
print(f"Successfully killed tmux session '{session}'")
|
|
46
|
+
else:
|
|
47
|
+
print(f"Error killing tmux session '{session}': {kill_result.stderr}")
|
|
48
|
+
|
|
49
|
+
except FileNotFoundError:
|
|
50
|
+
print("Error: tmux command not found. Please ensure tmux is installed.")
|
|
51
|
+
sys.exit(1)
|
|
52
|
+
except Exception as e:
|
|
53
|
+
print(f"Unexpected error: {e}")
|
|
54
|
+
sys.exit(1)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
if __name__ == "__main__":
|
|
58
|
+
main()
|
|
@@ -7,6 +7,19 @@ import re
|
|
|
7
7
|
import shlex # To properly escape command line arguments
|
|
8
8
|
import shutil
|
|
9
9
|
import subprocess
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
from rich.console import Console, Group
|
|
14
|
+
from rich.panel import Panel
|
|
15
|
+
from rich.text import Text
|
|
16
|
+
from rich.syntax import Syntax
|
|
17
|
+
except ImportError:
|
|
18
|
+
Console = None
|
|
19
|
+
Group = None
|
|
20
|
+
Panel = None
|
|
21
|
+
Text = None
|
|
22
|
+
Syntax = None
|
|
10
23
|
|
|
11
24
|
|
|
12
25
|
taskset_path = shutil.which('taskset')
|
|
@@ -60,18 +73,34 @@ def assert_script(python_path):
|
|
|
60
73
|
with open(python_path) as f:
|
|
61
74
|
code_str = f.read()
|
|
62
75
|
if 'MP_ID' not in code_str or 'MP_TOTAL' not in code_str:
|
|
63
|
-
|
|
64
|
-
'import os
|
|
76
|
+
helper_code = (
|
|
77
|
+
'import os\n'
|
|
78
|
+
'MP_ID = int(os.getenv("MP_ID", "0"))\n'
|
|
79
|
+
'MP_TOTAL = int(os.getenv("MP_TOTAL", "1"))\n'
|
|
65
80
|
'inputs = list(inputs[MP_ID::MP_TOTAL])'
|
|
66
81
|
)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
82
|
+
if Console and Panel and Text and Syntax and Group:
|
|
83
|
+
console = Console(stderr=True, force_terminal=True)
|
|
84
|
+
syntax = Syntax(helper_code, "python", theme="monokai", line_numbers=False)
|
|
85
|
+
console.print()
|
|
86
|
+
console.print(
|
|
87
|
+
Panel(
|
|
88
|
+
f'Your script {python_path} is missing MP_ID and/or MP_TOTAL variables.\n\n'
|
|
89
|
+
f'Add the following code to enable multi-process sharding:',
|
|
90
|
+
title='[bold yellow]Warning: Missing Multi-Process Variables[/bold yellow]',
|
|
91
|
+
border_style='yellow',
|
|
92
|
+
expand=False,
|
|
93
|
+
)
|
|
94
|
+
)
|
|
95
|
+
console.print()
|
|
96
|
+
console.print("```python")
|
|
97
|
+
console.print(syntax)
|
|
98
|
+
console.print("```")
|
|
99
|
+
console.print("-"*80)
|
|
100
|
+
else:
|
|
101
|
+
# Fallback to plain text
|
|
102
|
+
print(f'Warning: MP_ID and MP_TOTAL not found in {python_path}, please add them.', file=sys.stderr)
|
|
103
|
+
print(f'Example:\n{helper_code}', file=sys.stderr)
|
|
75
104
|
|
|
76
105
|
|
|
77
106
|
def run_in_tmux(commands_to_run, tmux_name, num_windows):
|
|
@@ -96,7 +125,18 @@ def run_in_tmux(commands_to_run, tmux_name, num_windows):
|
|
|
96
125
|
def main():
|
|
97
126
|
# Assert that MP_ID and MP_TOTAL are not already set
|
|
98
127
|
|
|
99
|
-
|
|
128
|
+
helper_code = (
|
|
129
|
+
'import os\n'
|
|
130
|
+
'MP_ID = int(os.getenv("MP_ID", "0"))\n'
|
|
131
|
+
'MP_TOTAL = int(os.getenv("MP_TOTAL", "1"))\n'
|
|
132
|
+
'inputs = list(inputs[MP_ID::MP_TOTAL])'
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
parser = argparse.ArgumentParser(
|
|
136
|
+
description='Process fold arguments',
|
|
137
|
+
epilog=f'Helper code for multi-process sharding:\n{helper_code}',
|
|
138
|
+
formatter_class=argparse.RawDescriptionHelpFormatter
|
|
139
|
+
)
|
|
100
140
|
parser.add_argument(
|
|
101
141
|
'--total_fold', '-t', default=16, type=int, help='total number of folds'
|
|
102
142
|
)
|
|
File without changes
|
|
File without changes
|
{speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/prompts/improveParallelErrorHandling.prompt.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/skills/io-utilities/examples/io_example.py
RENAMED
|
File without changes
|
|
File without changes
|
{speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/skills/llm-integration/examples/llm_example.py
RENAMED
|
File without changes
|
{speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/skills/multi-threading-processing/SKILL.md
RENAMED
|
File without changes
|
{speedy_utils-1.1.45 → speedy_utils-1.1.46}/.github/skills/ray-distributed-computing/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/multi_worker/parallel_gpu_pool.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{speedy_utils-1.1.45 → speedy_utils-1.1.46}/src/speedy_utils/scripts/openapi_client_codegen.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|