parishad 0.1.0__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.
Files changed (68) hide show
  1. parishad/__init__.py +70 -0
  2. parishad/__main__.py +10 -0
  3. parishad/checker/__init__.py +25 -0
  4. parishad/checker/deterministic.py +644 -0
  5. parishad/checker/ensemble.py +496 -0
  6. parishad/checker/retrieval.py +546 -0
  7. parishad/cli/__init__.py +6 -0
  8. parishad/cli/code.py +3254 -0
  9. parishad/cli/main.py +1158 -0
  10. parishad/cli/prarambh.py +99 -0
  11. parishad/cli/sthapana.py +368 -0
  12. parishad/config/modes.py +139 -0
  13. parishad/config/pipeline.core.yaml +128 -0
  14. parishad/config/pipeline.extended.yaml +172 -0
  15. parishad/config/pipeline.fast.yaml +89 -0
  16. parishad/config/user_config.py +115 -0
  17. parishad/data/catalog.py +118 -0
  18. parishad/data/models.json +108 -0
  19. parishad/memory/__init__.py +79 -0
  20. parishad/models/__init__.py +181 -0
  21. parishad/models/backends/__init__.py +247 -0
  22. parishad/models/backends/base.py +211 -0
  23. parishad/models/backends/huggingface.py +318 -0
  24. parishad/models/backends/llama_cpp.py +239 -0
  25. parishad/models/backends/mlx_lm.py +141 -0
  26. parishad/models/backends/ollama.py +253 -0
  27. parishad/models/backends/openai_api.py +193 -0
  28. parishad/models/backends/transformers_hf.py +198 -0
  29. parishad/models/costs.py +385 -0
  30. parishad/models/downloader.py +1557 -0
  31. parishad/models/optimizations.py +871 -0
  32. parishad/models/profiles.py +610 -0
  33. parishad/models/reliability.py +876 -0
  34. parishad/models/runner.py +651 -0
  35. parishad/models/tokenization.py +287 -0
  36. parishad/orchestrator/__init__.py +24 -0
  37. parishad/orchestrator/config_loader.py +210 -0
  38. parishad/orchestrator/engine.py +1113 -0
  39. parishad/orchestrator/exceptions.py +14 -0
  40. parishad/roles/__init__.py +71 -0
  41. parishad/roles/base.py +712 -0
  42. parishad/roles/dandadhyaksha.py +163 -0
  43. parishad/roles/darbari.py +246 -0
  44. parishad/roles/majumdar.py +274 -0
  45. parishad/roles/pantapradhan.py +150 -0
  46. parishad/roles/prerak.py +357 -0
  47. parishad/roles/raja.py +345 -0
  48. parishad/roles/sacheev.py +203 -0
  49. parishad/roles/sainik.py +427 -0
  50. parishad/roles/sar_senapati.py +164 -0
  51. parishad/roles/vidushak.py +69 -0
  52. parishad/tools/__init__.py +7 -0
  53. parishad/tools/base.py +57 -0
  54. parishad/tools/fs.py +110 -0
  55. parishad/tools/perception.py +96 -0
  56. parishad/tools/retrieval.py +74 -0
  57. parishad/tools/shell.py +103 -0
  58. parishad/utils/__init__.py +7 -0
  59. parishad/utils/hardware.py +122 -0
  60. parishad/utils/logging.py +79 -0
  61. parishad/utils/scanner.py +164 -0
  62. parishad/utils/text.py +61 -0
  63. parishad/utils/tracing.py +133 -0
  64. parishad-0.1.0.dist-info/METADATA +256 -0
  65. parishad-0.1.0.dist-info/RECORD +68 -0
  66. parishad-0.1.0.dist-info/WHEEL +4 -0
  67. parishad-0.1.0.dist-info/entry_points.txt +2 -0
  68. parishad-0.1.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,14 @@
1
+ """
2
+ Custom exceptions for orchestrator module.
3
+ """
4
+
5
+
6
+ class InvalidPipelineConfigError(ValueError):
7
+ """Raised when pipeline configuration is invalid."""
8
+
9
+ def __init__(self, errors: list[str]):
10
+ self.errors = errors
11
+ error_list = "\n - ".join(errors)
12
+ super().__init__(
13
+ f"Invalid pipeline configuration:\n - {error_list}"
14
+ )
@@ -0,0 +1,71 @@
1
+ """Role implementations for Parishad council."""
2
+
3
+ from .base import (
4
+ Role,
5
+ RoleInput,
6
+ RoleOutput,
7
+ RoleMetadata,
8
+ Trace,
9
+ Slot,
10
+ TaskType,
11
+ Difficulty,
12
+ OutputFormat,
13
+ TaskSpec,
14
+ Plan,
15
+ PlanStep,
16
+ Candidate,
17
+ Verdict,
18
+ CheckerFlag,
19
+ Evidence,
20
+ FinalAnswer,
21
+ )
22
+ # New Roles
23
+ from .raja import Raja
24
+ from .dandadhyaksha import Dandadhyaksha
25
+ from .vidushak import Vidushak
26
+ from .sacheev import Sacheev
27
+ from .prerak import Prerak
28
+ from .majumdar import Majumdar
29
+ from .pantapradhan import Pantapradhan
30
+ from .darbari import Darbari
31
+ from .sar_senapati import SarSenapati
32
+ from .sainik import Sainik
33
+
34
+
35
+ __all__ = [
36
+ # Base classes
37
+ "Role",
38
+ "RoleInput",
39
+ "RoleOutput",
40
+ "RoleMetadata",
41
+ "Trace",
42
+
43
+ # Enums
44
+ "Slot",
45
+ "TaskType",
46
+ "Difficulty",
47
+ "OutputFormat",
48
+
49
+ # Data types
50
+ "TaskSpec",
51
+ "Plan",
52
+ "PlanStep",
53
+ "Candidate",
54
+ "Verdict",
55
+ "CheckerFlag",
56
+ "Evidence",
57
+ "FinalAnswer",
58
+
59
+ # Roles
60
+ "Raja",
61
+ "Dandadhyaksha",
62
+ "Sacheev",
63
+ "Prerak",
64
+ "Majumdar",
65
+ "Pantapradhan",
66
+ "Darbari",
67
+ "SarSenapati",
68
+ "Sainik",
69
+ "Vidushak",
70
+ ]
71
+