@@ -71,7 +71,7 @@ class GCGDataConfig:
7171 Used as a typed bundle for AML transport (a job ships its data config as
7272 a separate JSON file alongside the strategy ``GCGConfig``). Library
7373 callers loading goals/targets from a CSV can construct one and pass it to
74- :func:` pyrit.auxiliary_attacks.gcg.data.load_goals_and_targets`.
74+ `` pyrit.auxiliary_attacks.gcg.data.load_goals_and_targets` `.
7575
7676 Attributes:
7777 train_data (str): URL or filesystem path to the training-data CSV. Empty
@@ -100,7 +100,7 @@ def to_json(self) -> str:
100100
101101 @classmethod
102102 def from_json (cls , payload : str ) -> GCGDataConfig :
103- """Deserialize a config previously produced by :meth:` to_json`."""
103+ """Deserialize a config previously produced by `` to_json` `."""
104104 try :
105105 data = json .loads (payload )
106106 except json .JSONDecodeError as e :
@@ -131,8 +131,8 @@ class GCGAlgorithmConfig:
131131 Defaults to 512.
132132 topk (int): Top-k gradient positions considered for substitution.
133133 Defaults to 256.
134- temp (int ): Sampling temperature placeholder; the current sampling
135- implementation samples uniformly from the top-k. Defaults to 1.
134+ temp (float ): Sampling temperature placeholder; the current sampling
135+ implementation samples uniformly from the top-k. Defaults to 1.0.
136136 target_weight (float): Weight on the target-string cross-entropy loss.
137137 Defaults to 1.0.
138138 control_weight (float): Weight on the control-string cross-entropy loss.
@@ -153,7 +153,7 @@ class GCGAlgorithmConfig:
153153 test_steps : int = 50
154154 batch_size : int = 512
155155 topk : int = 256
156- temp : int = 1
156+ temp : float = 1.0
157157 target_weight : float = 1.0
158158 control_weight : float = 0.0
159159 learning_rate : float = 0.01
@@ -240,10 +240,10 @@ class GCGOutputConfig:
240240class GCGConfig :
241241 """Top-level strategy configuration for one GCG attack run.
242242
243- Bundles everything :class:` pyrit.auxiliary_attacks.gcg.GCGGenerator`'s
243+ Bundles everything `` pyrit.auxiliary_attacks.gcg.GCGGenerator` `'s
244244 constructor needs. Per-execution data (goals, targets) is **not** here —
245245 those flow through ``GCGGenerator.execute_async``, and for AML transport
246- they ride alongside this object as a separate :class:` GCGDataConfig` JSON.
246+ they ride alongside this object as a separate `` GCGDataConfig` ` JSON.
247247
248248 Attributes:
249249 models (list[GCGModelConfig]): Training models the attack optimizes
@@ -287,11 +287,11 @@ def to_json(self) -> str:
287287
288288 @classmethod
289289 def from_json (cls , payload : str ) -> GCGConfig :
290- """Deserialize a config previously produced by :meth:` to_json`.
290+ """Deserialize a config previously produced by `` to_json` `.
291291
292292 Args:
293293 payload (str): JSON document matching the shape produced by
294- :meth:` to_json`.
294+ `` to_json` `.
295295
296296 Returns:
297297 GCGConfig: A new ``GCGConfig`` reconstructed from ``payload``.
@@ -308,7 +308,7 @@ def from_json(cls, payload: str) -> GCGConfig:
308308
309309 @classmethod
310310 def from_json_file (cls , path : str | Path ) -> GCGConfig :
311- """Load a config from a JSON file produced by :meth:` to_json_file`.
311+ """Load a config from a JSON file produced by `` to_json_file` `.
312312
313313 Args:
314314 path (str | Path): Filesystem path to a JSON config file.
0 commit comments