wisent 0.5.4__py3-none-any.whl → 0.5.6__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.

Potentially problematic release.


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

wisent/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.5.4"
1
+ __version__ = "0.5.6"
wisent/core/__init__.py CHANGED
@@ -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",
@@ -5,13 +5,49 @@ import torch
5
5
  from typing import List, Tuple, Optional, Dict, Any
6
6
  from pathlib import Path
7
7
 
8
- from .layer import Layer
9
- from .model import Model
10
- from .steering_methods.caa import CAA
11
- from .steering_methods.dac import DAC
8
+ # Note: layer and model modules don't exist, using inline stubs
9
+ # from .layer import Layer
10
+ # from .model import Model
11
+ from .steering_methods.methods.caa import CAAMethod as CAA
12
+ # DAC doesn't exist yet
13
+ # from .steering_methods.dac import DAC
12
14
  from .utils.device import resolve_default_device
13
15
 
14
16
 
17
+ # Stub classes for missing modules
18
+ class Layer:
19
+ """Stub Layer class - module doesn't exist in wisent package."""
20
+ def __init__(self, index: int):
21
+ self.index = index
22
+
23
+
24
+ class Model:
25
+ """Stub Model class - module doesn't exist in wisent package."""
26
+ def __init__(self, model_name: str, device: str = None):
27
+ self.model_name = model_name
28
+ self.device = device
29
+ # This is a stub - actual implementation would load the model
30
+ raise NotImplementedError("Model class not implemented in wisent package")
31
+
32
+
33
+ class DAC:
34
+ """Stub DAC class - module doesn't exist in wisent package."""
35
+ def __init__(self, device: str = None):
36
+ self.device = device
37
+ self.steering_vector = None
38
+ self.layer_index = None
39
+ self.is_trained = False
40
+
41
+ @staticmethod
42
+ def combine_steering_vectors(vectors, weights, normalize_weights=True):
43
+ """Stub method for combining steering vectors."""
44
+ raise NotImplementedError("DAC steering method not implemented in wisent package")
45
+
46
+ def apply_steering(self, hidden_states, strength=1.0):
47
+ """Stub method for applying steering."""
48
+ raise NotImplementedError("DAC steering method not implemented in wisent package")
49
+
50
+
15
51
  class MultiSteeringError(Exception):
16
52
  """Exception raised for multi-steering errors."""
17
53
  pass
wisent/core/steering.py CHANGED
@@ -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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wisent
3
- Version: 0.5.4
3
+ Version: 0.5.6
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
@@ -1,4 +1,4 @@
1
- wisent/__init__.py,sha256=DITpct-LrdIsTgwx2NgH5Ghx5y8Xgz1YMimy1ZV5RTY,22
1
+ wisent/__init__.py,sha256=CMH34Gt1AqO7z_TqRj94XwohGoVCf8aes0djkqm45mk,22
2
2
  wisent/benchmarks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  wisent/benchmarks/coding/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  wisent/benchmarks/coding/metrics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -52,7 +52,7 @@ wisent/cli/wisent_cli/commands/train_cmd.py,sha256=Pp_DY6P-zk8PvCuz6ds9JxH7BWpqQ
52
52
  wisent/cli/wisent_cli/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
53
  wisent/cli/wisent_cli/util/aggregations.py,sha256=RW2f-B18k4R0gFlIFACQmrhFKSwfxREUqqu5PaI951Y,1415
54
54
  wisent/cli/wisent_cli/util/parsing.py,sha256=DvBTcoBItDGJQI-AE4bs0otBJ7ElLynNhqRDzgeQjzs,4067
55
- wisent/core/__init__.py,sha256=n2ytkljR_PHZDqXl6Q4O2kwoNbtCiP5l0JBHfkXkE2s,361
55
+ wisent/core/__init__.py,sha256=yNBOdCXpkwMuo1H1sNAYgPf5_-Hhf7y4H-RZJPCiOpI,463
56
56
  wisent/core/autonomous_agent.py,sha256=2k1PLWm2DZ6C2fmsjMDKmQ1_wfN7KhpilHrjkTw8nMw,52489
57
57
  wisent/core/bigcode_integration.py,sha256=TIaPQDbPRDPdnCq8U-Gwl4lgayPfhOabOVQddqxotY4,19927
58
58
  wisent/core/detection_handling.py,sha256=iiuKpzAbJfx_KFn2SFABQHOeeWblDJMXjzGwGDeKqcs,11127
@@ -64,13 +64,13 @@ wisent/core/managed_cached_benchmarks.py,sha256=JbvpZ1fgSuQQhyQVKEvqrQZRHGqfnjo9
64
64
  wisent/core/mixed_benchmark_sampler.py,sha256=tKQCHUXVuYeCyx4VZt8O1hGyB-TOY_SQ_SYi8cyApII,13585
65
65
  wisent/core/model_config_manager.py,sha256=rQAdSmk3GFlZXyHp3fSV1bORxiZWhmzIz1uo3H4JtkA,12009
66
66
  wisent/core/model_persistence.py,sha256=6_vc1Ndujd4v0O68giINSTvYhmb7-AiacWwAbqLOrls,10636
67
- wisent/core/multi_steering.py,sha256=IpaVrs28tZQM8jXbgUbrhq3bWbH4KaNhUZQcWit7_p0,11711
67
+ wisent/core/multi_steering.py,sha256=PAn8eKFObR6QT-Mt1RbBB05AMr6RebGIBe3j5snSRHA,13069
68
68
  wisent/core/parser.py,sha256=_YDeSuQMx0zNknz9rX3Ls1YPT1x5eohoY8rfjeoqxV8,69091
69
69
  wisent/core/representation.py,sha256=hBl_N9qbr5Gsa7GCQ0nMWRm82RqYEfhd9cyf0PPH5LY,195
70
70
  wisent/core/sample_size_optimizer.py,sha256=6wegGXZpdGpiR4R0YJ1D2JqLr6yinMndEx2gB5FL80s,23666
71
71
  wisent/core/sample_size_optimizer_v2.py,sha256=bVYJRZC4_Mrq-HFlYLyv-9tWvqEHJ3kCeIwlmYOwI6I,13286
72
72
  wisent/core/save_results.py,sha256=PRwaA5qO6EOsvURvLBl3YhvanlC0D0G4iYqxYAQ7sw8,13737
73
- wisent/core/steering.py,sha256=GJsARTiaB72fyGQ8UGmTPBmIRb_0OL_-2BXQANSnKqg,22535
73
+ wisent/core/steering.py,sha256=I1mSLOQ6MMdUcJ_MmfmaCUH0IKxeCYlcsMCO6x6wLg4,22651
74
74
  wisent/core/steering_method.py,sha256=-hZqtvwRS7sGqQJUd36MoPm0rjbO1LrtPAYmcIk8BqQ,462
75
75
  wisent/core/steering_optimizer.py,sha256=wxa4p4aMjJWOknt2Jph28xPgYoEMxZVmp1GFA1pM3Wk,54759
76
76
  wisent/core/task_interface.py,sha256=OlWdcxkprmZcOto-bXmg75kzUcWzH_kyW_e7w2FdPLM,4471
@@ -213,8 +213,8 @@ wisent/synthetic/generators/diversities/core/__init__.py,sha256=47DEQpj8HBSa-_TI
213
213
  wisent/synthetic/generators/diversities/core/core.py,sha256=TjSj5T7NE5kRH-ABcFqb1Hz_j3Z6F_TcV-95uHD5Xw8,2201
214
214
  wisent/synthetic/generators/diversities/methods/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
215
215
  wisent/synthetic/generators/diversities/methods/fast_diversity.py,sha256=Z2UzTbzyJFM_ToxCoXM_LQQQ1Jc6BZknrbpikTG1MRw,8522
216
- wisent-0.5.4.dist-info/licenses/LICENSE,sha256=wy0iaw8b2tyqZAfKHib3lP3PJ9o88FDCg92oUHh3sDQ,1073
217
- wisent-0.5.4.dist-info/METADATA,sha256=WO1PZ7JzoAyWKxfGNY66bIqyV6lpNk25teYSOhm49hE,2424
218
- wisent-0.5.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
219
- wisent-0.5.4.dist-info/top_level.txt,sha256=2Ts9Iyldnb3auIN2HBBaHPknRy7nSRDm2f6RGzYgr8A,7
220
- wisent-0.5.4.dist-info/RECORD,,
216
+ wisent-0.5.6.dist-info/licenses/LICENSE,sha256=wy0iaw8b2tyqZAfKHib3lP3PJ9o88FDCg92oUHh3sDQ,1073
217
+ wisent-0.5.6.dist-info/METADATA,sha256=sR7d86PIFGErlOB8gKyjxB3iwlKX3ea__KEUsBCtKfg,2424
218
+ wisent-0.5.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
219
+ wisent-0.5.6.dist-info/top_level.txt,sha256=2Ts9Iyldnb3auIN2HBBaHPknRy7nSRDm2f6RGzYgr8A,7
220
+ wisent-0.5.6.dist-info/RECORD,,
File without changes