wisent 0.5.3__tar.gz → 0.5.5__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.

Potentially problematic release.


This version of wisent might be problematic. Click here for more details.

Files changed (227) hide show
  1. {wisent-0.5.3 → wisent-0.5.5}/PKG-INFO +1 -1
  2. wisent-0.5.5/wisent/__init__.py +1 -0
  3. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/__init__.py +4 -3
  4. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/steering.py +3 -2
  5. wisent-0.5.5/wisent/core/utils/__init__.py +21 -0
  6. wisent-0.5.5/wisent/core/utils/device.py +56 -0
  7. {wisent-0.5.3 → wisent-0.5.5}/wisent.egg-info/PKG-INFO +1 -1
  8. {wisent-0.5.3 → wisent-0.5.5}/wisent.egg-info/SOURCES.txt +2 -0
  9. wisent-0.5.3/wisent/__init__.py +0 -1
  10. {wisent-0.5.3 → wisent-0.5.5}/LICENSE +0 -0
  11. {wisent-0.5.3 → wisent-0.5.5}/README.md +0 -0
  12. {wisent-0.5.3 → wisent-0.5.5}/pyproject.toml +0 -0
  13. {wisent-0.5.3 → wisent-0.5.5}/setup.cfg +0 -0
  14. {wisent-0.5.3 → wisent-0.5.5}/setup.py +0 -0
  15. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/__init__.py +0 -0
  16. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/__init__.py +0 -0
  17. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/metrics/__init__.py +0 -0
  18. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/metrics/core/__init__.py +0 -0
  19. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/metrics/core/atoms.py +0 -0
  20. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/metrics/evaluator.py +0 -0
  21. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/metrics/passk.py +0 -0
  22. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/output_sanitizer/__init__.py +0 -0
  23. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/output_sanitizer/core/__init__.py +0 -0
  24. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/output_sanitizer/core/atoms.py +0 -0
  25. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/output_sanitizer/cpp_sanitizer.py +0 -0
  26. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/output_sanitizer/java_sanitizer.py +0 -0
  27. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/output_sanitizer/python_sanitizer.py +0 -0
  28. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/output_sanitizer/utils.py +0 -0
  29. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/providers/__init__.py +0 -0
  30. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/providers/core/__init__.py +0 -0
  31. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/providers/core/atoms.py +0 -0
  32. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/providers/livecodebench/__init__.py +0 -0
  33. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/providers/livecodebench/provider.py +0 -0
  34. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/safe_docker/__init__.py +0 -0
  35. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/safe_docker/core/__init__.py +0 -0
  36. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/safe_docker/core/atoms.py +0 -0
  37. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/safe_docker/core/runtime.py +0 -0
  38. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/safe_docker/entrypoint.py +0 -0
  39. {wisent-0.5.3 → wisent-0.5.5}/wisent/benchmarks/coding/safe_docker/recipes.py +0 -0
  40. {wisent-0.5.3 → wisent-0.5.5}/wisent/classifiers/__init__.py +0 -0
  41. {wisent-0.5.3 → wisent-0.5.5}/wisent/classifiers/core/__init__.py +0 -0
  42. {wisent-0.5.3 → wisent-0.5.5}/wisent/classifiers/core/atoms.py +0 -0
  43. {wisent-0.5.3 → wisent-0.5.5}/wisent/classifiers/models/__init__.py +0 -0
  44. {wisent-0.5.3 → wisent-0.5.5}/wisent/classifiers/models/logistic.py +0 -0
  45. {wisent-0.5.3 → wisent-0.5.5}/wisent/classifiers/models/mlp.py +0 -0
  46. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/__init__.py +0 -0
  47. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/classifiers/__init__.py +0 -0
  48. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/classifiers/classifier_rotator.py +0 -0
  49. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/cli_logger.py +0 -0
  50. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/data_loaders/__init__.py +0 -0
  51. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/data_loaders/data_loader_rotator.py +0 -0
  52. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/evaluators/__init__.py +0 -0
  53. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/evaluators/evaluator_rotator.py +0 -0
  54. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/steering_methods/__init__.py +0 -0
  55. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/steering_methods/steering_rotator.py +0 -0
  56. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/wisent_cli/__init__.py +0 -0
  57. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/wisent_cli/commands/__init__.py +0 -0
  58. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/wisent_cli/commands/help_cmd.py +0 -0
  59. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/wisent_cli/commands/listing.py +0 -0
  60. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/wisent_cli/commands/train_cmd.py +0 -0
  61. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/wisent_cli/main.py +0 -0
  62. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/wisent_cli/shell.py +0 -0
  63. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/wisent_cli/ui.py +0 -0
  64. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/wisent_cli/util/__init__.py +0 -0
  65. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/wisent_cli/util/aggregations.py +0 -0
  66. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/wisent_cli/util/parsing.py +0 -0
  67. {wisent-0.5.3 → wisent-0.5.5}/wisent/cli/wisent_cli/version.py +0 -0
  68. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/activations/__init__.py +0 -0
  69. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/activations/activations_collector.py +0 -0
  70. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/activations/core/__init__.py +0 -0
  71. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/activations/core/atoms.py +0 -0
  72. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/__init__.py +0 -0
  73. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/budget.py +0 -0
  74. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/device_benchmarks.py +0 -0
  75. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/diagnose/__init__.py +0 -0
  76. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/diagnose/agent_classifier_decision.py +0 -0
  77. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/diagnose/classifier_marketplace.py +0 -0
  78. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/diagnose/create_classifier.py +0 -0
  79. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/diagnose/response_diagnostics.py +0 -0
  80. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/diagnose/select_classifiers.py +0 -0
  81. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/diagnose/synthetic_classifier_option.py +0 -0
  82. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/diagnose/tasks/__init__.py +0 -0
  83. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/diagnose/tasks/task_manager.py +0 -0
  84. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/diagnose/tasks/task_relevance.py +0 -0
  85. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/diagnose/tasks/task_selector.py +0 -0
  86. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/diagnose/test_synthetic_classifier.py +0 -0
  87. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/diagnose.py +0 -0
  88. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/steer.py +0 -0
  89. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/agent/timeout.py +0 -0
  90. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/autonomous_agent.py +0 -0
  91. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/bigcode_integration.py +0 -0
  92. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/__init__.py +0 -0
  93. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/core/__init__.py +0 -0
  94. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/core/atoms.py +0 -0
  95. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/core/buliders.py +0 -0
  96. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/core/pair.py +0 -0
  97. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/core/response.py +0 -0
  98. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/core/serialization.py +0 -0
  99. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/core/set.py +0 -0
  100. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/diagnostics/__init__.py +0 -0
  101. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/diagnostics/activations.py +0 -0
  102. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/diagnostics/base.py +0 -0
  103. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/diagnostics/control_vectors.py +0 -0
  104. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/diagnostics/coverage.py +0 -0
  105. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/diagnostics/divergence.py +0 -0
  106. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/diagnostics/duplicates.py +0 -0
  107. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/lm_eval_pairs/__init__.py +0 -0
  108. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/lm_eval_pairs/atoms.py +0 -0
  109. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/lm_eval_pairs/lm_extractor_manifest.py +0 -0
  110. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/lm_eval_pairs/lm_extractor_registry.py +0 -0
  111. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/__init__.py +0 -0
  112. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_extractors/winogrande.py +0 -0
  113. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/contrastive_pairs/lm_eval_pairs/lm_task_pairs_generation.py +0 -0
  114. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/data_loaders/__init__.py +0 -0
  115. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/data_loaders/core/__init__.py +0 -0
  116. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/data_loaders/core/atoms.py +0 -0
  117. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/data_loaders/loaders/__init__.py +0 -0
  118. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/data_loaders/loaders/custom.py +0 -0
  119. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/data_loaders/loaders/lm_loader.py +0 -0
  120. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/detection_handling.py +0 -0
  121. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/download_full_benchmarks.py +0 -0
  122. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/evaluators/__init__.py +0 -0
  123. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/evaluators/oracles/__init__.py +0 -0
  124. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/evaluators/oracles/interactive.py +0 -0
  125. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/evaluators/oracles/nlp_evaluator.py +0 -0
  126. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/evaluators/oracles/user_specified.py +0 -0
  127. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/hyperparameter_optimizer.py +0 -0
  128. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/lm_eval_harness_ground_truth.py +0 -0
  129. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/log_likelihoods_evaluator.py +0 -0
  130. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/managed_cached_benchmarks.py +0 -0
  131. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/mixed_benchmark_sampler.py +0 -0
  132. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/model_config_manager.py +0 -0
  133. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/model_persistence.py +0 -0
  134. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/models/__init__.py +0 -0
  135. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/models/core/__init__.py +0 -0
  136. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/models/core/atoms.py +0 -0
  137. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/models/wisent_model.py +0 -0
  138. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/multi_steering.py +0 -0
  139. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/optuna/__init__.py +0 -0
  140. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/optuna/classifier/__init__.py +0 -0
  141. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/optuna/classifier/activation_generator.py +0 -0
  142. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/optuna/classifier/classifier_cache.py +0 -0
  143. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/optuna/classifier/optuna_classifier_optimizer.py +0 -0
  144. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/optuna/steering/__init__.py +0 -0
  145. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/optuna/steering/bigcode_evaluator_wrapper.py +0 -0
  146. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/optuna/steering/data_utils.py +0 -0
  147. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/optuna/steering/metrics.py +0 -0
  148. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/optuna/steering/optuna_pipeline.py +0 -0
  149. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/optuna/steering/steering_optimization.py +0 -0
  150. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/parser.py +0 -0
  151. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/prompts/__init__.py +0 -0
  152. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/prompts/core/__init__.py +0 -0
  153. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/prompts/core/atom.py +0 -0
  154. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/prompts/core/prompt_formater.py +0 -0
  155. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/prompts/prompt_stratiegies/__init__.py +0 -0
  156. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/prompts/prompt_stratiegies/direct_completion.py +0 -0
  157. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/prompts/prompt_stratiegies/instruction_following.py +0 -0
  158. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/prompts/prompt_stratiegies/multiple_choice.py +0 -0
  159. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/prompts/prompt_stratiegies/role_playing.py +0 -0
  160. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/representation.py +0 -0
  161. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/sample_size_optimizer.py +0 -0
  162. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/sample_size_optimizer_v2.py +0 -0
  163. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/save_results.py +0 -0
  164. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/steering_method.py +0 -0
  165. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/steering_methods/__init__.py +0 -0
  166. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/steering_methods/core/__init__.py +0 -0
  167. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/steering_methods/core/atoms.py +0 -0
  168. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/steering_methods/methods/__init__.py +0 -0
  169. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/steering_methods/methods/caa.py +0 -0
  170. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/steering_optimizer.py +0 -0
  171. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/task_interface.py +0 -0
  172. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/task_selector.py +0 -0
  173. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/tasks/__init__.py +0 -0
  174. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/tasks/aime_task.py +0 -0
  175. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/tasks/file_task.py +0 -0
  176. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/tasks/hle_task.py +0 -0
  177. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/tasks/hmmt_task.py +0 -0
  178. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/tasks/livecodebench_task.py +0 -0
  179. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/tasks/livemathbench_task.py +0 -0
  180. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/tasks/lm_eval_task.py +0 -0
  181. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/tasks/math500_task.py +0 -0
  182. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/tasks/polymath_task.py +0 -0
  183. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/tasks/supergpqa_task.py +0 -0
  184. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/time_estimator.py +0 -0
  185. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/timing_calibration.py +0 -0
  186. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/tracking/__init__.py +0 -0
  187. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/tracking/latency.py +0 -0
  188. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/tracking/memory.py +0 -0
  189. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/trainers/__init__.py +0 -0
  190. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/trainers/core/__init__.py +0 -0
  191. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/trainers/core/atoms.py +0 -0
  192. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/trainers/steering_trainer.py +0 -0
  193. {wisent-0.5.3 → wisent-0.5.5}/wisent/core/user_model_config.py +0 -0
  194. {wisent-0.5.3 → wisent-0.5.5}/wisent/opti/__init__.py +0 -0
  195. {wisent-0.5.3 → wisent-0.5.5}/wisent/opti/core/__init__.py +0 -0
  196. {wisent-0.5.3 → wisent-0.5.5}/wisent/opti/core/atoms.py +0 -0
  197. {wisent-0.5.3 → wisent-0.5.5}/wisent/opti/methods/__init__.py +0 -0
  198. {wisent-0.5.3 → wisent-0.5.5}/wisent/opti/methods/opti_classificator.py +0 -0
  199. {wisent-0.5.3 → wisent-0.5.5}/wisent/opti/methods/opti_steering.py +0 -0
  200. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/__init__.py +0 -0
  201. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/cleaners/__init__.py +0 -0
  202. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/cleaners/core/__init__.py +0 -0
  203. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/cleaners/core/atoms.py +0 -0
  204. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/cleaners/deduper_cleaner.py +0 -0
  205. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/cleaners/methods/__init__.py +0 -0
  206. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/cleaners/methods/base_dedupers.py +0 -0
  207. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/cleaners/methods/base_refusalers.py +0 -0
  208. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/cleaners/methods/core/__init__.py +0 -0
  209. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/cleaners/methods/core/atoms.py +0 -0
  210. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/cleaners/pairs_cleaner.py +0 -0
  211. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/cleaners/refusaler_cleaner.py +0 -0
  212. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/db_instructions/__init__.py +0 -0
  213. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/db_instructions/core/__init__.py +0 -0
  214. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/db_instructions/core/atoms.py +0 -0
  215. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/db_instructions/mini_dp.py +0 -0
  216. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/generators/__init__.py +0 -0
  217. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/generators/core/__init__.py +0 -0
  218. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/generators/core/atoms.py +0 -0
  219. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/generators/diversities/__init__.py +0 -0
  220. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/generators/diversities/core/__init__.py +0 -0
  221. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/generators/diversities/core/core.py +0 -0
  222. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/generators/diversities/methods/__init__.py +0 -0
  223. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/generators/diversities/methods/fast_diversity.py +0 -0
  224. {wisent-0.5.3 → wisent-0.5.5}/wisent/synthetic/generators/pairs_generator.py +0 -0
  225. {wisent-0.5.3 → wisent-0.5.5}/wisent.egg-info/dependency_links.txt +0 -0
  226. {wisent-0.5.3 → wisent-0.5.5}/wisent.egg-info/requires.txt +0 -0
  227. {wisent-0.5.3 → wisent-0.5.5}/wisent.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wisent
3
- Version: 0.5.3
3
+ Version: 0.5.5
4
4
  Summary: Monitor and guard against harmful content in language models
5
5
  Home-page: https://github.com/yourusername/wisent-activation-guardrails
6
6
  Author: Wisent Team
@@ -0,0 +1 @@
1
+ __version__ = "0.5.5"
@@ -1,9 +1,10 @@
1
1
  from .utils.device import empty_device_cache, preferred_dtype, resolve_default_device, resolve_device, resolve_torch_device
2
- from .steering import SteeringMethod, SteeringType
2
+ # Note: SteeringMethod and SteeringType import temporarily disabled due to missing dependencies
3
+ # from .steering import SteeringMethod, SteeringType
3
4
 
4
5
  __all__ = [
5
- "SteeringMethod",
6
- "SteeringType",
6
+ # "SteeringMethod",
7
+ # "SteeringType",
7
8
  "empty_device_cache",
8
9
  "preferred_dtype",
9
10
  "resolve_default_device",
@@ -7,8 +7,9 @@ from typing import Any, Dict, List, Optional, Union
7
7
  import torch
8
8
  import torch.nn.functional as F
9
9
 
10
- from wisent.core.activations import Activations
11
- from wisent.core.classifier.classifier import Classifier
10
+ # Note: Activations and Classifier imports removed - these classes don't exist in the current package structure
11
+ # from wisent.core.activations import Activations
12
+ # from wisent.core.classifier.classifier import Classifier
12
13
 
13
14
  from .contrastive_pairs import ContrastivePairSet
14
15
  from .steering_method import CAA
@@ -0,0 +1,21 @@
1
+ from .device import (
2
+ DeviceKind,
3
+ empty_device_cache,
4
+ ensure_tensor_on_device,
5
+ move_module_to_preferred_device,
6
+ preferred_dtype,
7
+ resolve_default_device,
8
+ resolve_device,
9
+ resolve_torch_device,
10
+ )
11
+
12
+ __all__ = [
13
+ "DeviceKind",
14
+ "empty_device_cache",
15
+ "ensure_tensor_on_device",
16
+ "move_module_to_preferred_device",
17
+ "preferred_dtype",
18
+ "resolve_default_device",
19
+ "resolve_device",
20
+ "resolve_torch_device",
21
+ ]
@@ -0,0 +1,56 @@
1
+ """Centralized torch device selection helpers."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from functools import lru_cache
6
+ from typing import Literal
7
+
8
+ import torch
9
+
10
+ DeviceKind = Literal["cuda", "mps", "cpu"]
11
+
12
+
13
+ def _mps_available() -> bool:
14
+ return getattr(torch.backends, "mps", None) is not None and torch.backends.mps.is_available()
15
+
16
+
17
+ @lru_cache(maxsize=1)
18
+ def resolve_default_device() -> DeviceKind:
19
+ if torch.cuda.is_available():
20
+ return "cuda"
21
+ if _mps_available():
22
+ return "mps"
23
+ return "cpu"
24
+
25
+
26
+ def resolve_torch_device() -> torch.device:
27
+ return torch.device(resolve_default_device())
28
+
29
+
30
+ def resolve_device(kind: DeviceKind | None = None) -> torch.device:
31
+ return torch.device(kind or resolve_default_device())
32
+
33
+
34
+ def preferred_dtype(kind: DeviceKind | None = None) -> torch.dtype:
35
+ chosen = kind or resolve_default_device()
36
+ return torch.float16 if chosen in {"cuda", "mps"} else torch.float32
37
+
38
+
39
+ def empty_device_cache(kind: DeviceKind | None = None) -> None:
40
+ chosen = kind or resolve_default_device()
41
+ if chosen == "cuda" and torch.cuda.is_available():
42
+ torch.cuda.empty_cache()
43
+ elif chosen == "mps" and _mps_available():
44
+ try:
45
+ torch.mps.empty_cache() # type: ignore[attr-defined]
46
+ except AttributeError:
47
+ pass
48
+
49
+
50
+ def move_module_to_preferred_device(module: torch.nn.Module) -> torch.nn.Module:
51
+ return module.to(resolve_torch_device())
52
+
53
+
54
+ def ensure_tensor_on_device(tensor: torch.Tensor) -> torch.Tensor:
55
+ target = resolve_torch_device()
56
+ return tensor.to(target) if tensor.device != target else tensor
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wisent
3
- Version: 0.5.3
3
+ Version: 0.5.5
4
4
  Summary: Monitor and guard against harmful content in language models
5
5
  Home-page: https://github.com/yourusername/wisent-activation-guardrails
6
6
  Author: Wisent Team
@@ -189,6 +189,8 @@ wisent/core/trainers/__init__.py
189
189
  wisent/core/trainers/steering_trainer.py
190
190
  wisent/core/trainers/core/__init__.py
191
191
  wisent/core/trainers/core/atoms.py
192
+ wisent/core/utils/__init__.py
193
+ wisent/core/utils/device.py
192
194
  wisent/opti/__init__.py
193
195
  wisent/opti/core/__init__.py
194
196
  wisent/opti/core/atoms.py
@@ -1 +0,0 @@
1
- __version__ = "0.5.3"
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