DeepFabric 4.8.0__py3-none-any.whl → 4.8.1__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.
- deepfabric/evaluation/evaluator.py +22 -2
- deepfabric/training/callback.py +7 -5
- {deepfabric-4.8.0.dist-info → deepfabric-4.8.1.dist-info}/METADATA +1 -1
- {deepfabric-4.8.0.dist-info → deepfabric-4.8.1.dist-info}/RECORD +7 -7
- {deepfabric-4.8.0.dist-info → deepfabric-4.8.1.dist-info}/WHEEL +0 -0
- {deepfabric-4.8.0.dist-info → deepfabric-4.8.1.dist-info}/entry_points.txt +0 -0
- {deepfabric-4.8.0.dist-info → deepfabric-4.8.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -24,6 +24,25 @@ from .reporters import BaseReporter, CloudReporter, FileReporter, MultiReporter
|
|
|
24
24
|
|
|
25
25
|
console = Console()
|
|
26
26
|
|
|
27
|
+
# Mapping for legacy conversation_type values
|
|
28
|
+
_CONVERSATION_TYPE_ALIASES = {
|
|
29
|
+
"chain_of_thought": "cot",
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _normalize_conversation_type(value: str) -> str:
|
|
34
|
+
"""Normalize conversation_type to valid values.
|
|
35
|
+
|
|
36
|
+
Handles legacy values like 'chain_of_thought' -> 'cot'.
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
value: Raw conversation_type value from dataset
|
|
40
|
+
|
|
41
|
+
Returns:
|
|
42
|
+
Normalized value ('basic' or 'cot')
|
|
43
|
+
"""
|
|
44
|
+
return _CONVERSATION_TYPE_ALIASES.get(value, value)
|
|
45
|
+
|
|
27
46
|
|
|
28
47
|
class EvaluatorConfig(BaseModel):
|
|
29
48
|
"""Configuration for evaluation run."""
|
|
@@ -247,9 +266,10 @@ class Evaluator:
|
|
|
247
266
|
# Convert sample dict to Conversation object
|
|
248
267
|
conversation = Conversation.model_validate(sample)
|
|
249
268
|
|
|
250
|
-
# Determine conversation type from metadata
|
|
269
|
+
# Determine conversation type from metadata (normalize legacy values)
|
|
251
270
|
metadata = conversation.metadata or {}
|
|
252
|
-
|
|
271
|
+
raw_conv_type = metadata.get("conversation_type", "basic")
|
|
272
|
+
conv_type = _normalize_conversation_type(raw_conv_type)
|
|
253
273
|
reasoning_style = metadata.get("reasoning_style")
|
|
254
274
|
agent_mode = metadata.get("agent_mode")
|
|
255
275
|
|
deepfabric/training/callback.py
CHANGED
|
@@ -298,9 +298,10 @@ class DeepFabricCallback:
|
|
|
298
298
|
Returns:
|
|
299
299
|
Model name or None
|
|
300
300
|
"""
|
|
301
|
-
# Try args first
|
|
302
|
-
|
|
303
|
-
|
|
301
|
+
# Try args first (model_name_or_path exists on SFTConfig and similar subclasses)
|
|
302
|
+
model_name_or_path = getattr(args, "model_name_or_path", None)
|
|
303
|
+
if model_name_or_path is not None:
|
|
304
|
+
return model_name_or_path
|
|
304
305
|
|
|
305
306
|
# Try model config
|
|
306
307
|
if model is not None:
|
|
@@ -310,8 +311,9 @@ class DeepFabricCallback:
|
|
|
310
311
|
return model.name_or_path
|
|
311
312
|
|
|
312
313
|
# Try output_dir as fallback
|
|
313
|
-
|
|
314
|
-
|
|
314
|
+
output_dir = getattr(args, "output_dir", None)
|
|
315
|
+
if output_dir is not None:
|
|
316
|
+
return os.path.basename(output_dir)
|
|
315
317
|
|
|
316
318
|
return None
|
|
317
319
|
|
|
@@ -31,7 +31,7 @@ deepfabric/update_checker.py,sha256=AUa9iUdkGNzu7tWkQRxIlF19YRmKLetwxu-Ys2ONS8Y,
|
|
|
31
31
|
deepfabric/utils.py,sha256=ve6tku_-jgW_ZIkh9osUEQ3C_03J6R_zOw0Xf5UGJYc,4891
|
|
32
32
|
deepfabric/validation.py,sha256=1x1X_45kyI0w_FCdUiNdvy4LQu3B0KVR-fyvLkrKEGw,5125
|
|
33
33
|
deepfabric/evaluation/__init__.py,sha256=7xMLmYXaNC1U7qf88S9fMxWTABoDRiOcimSYfCt_PSo,1224
|
|
34
|
-
deepfabric/evaluation/evaluator.py,sha256=
|
|
34
|
+
deepfabric/evaluation/evaluator.py,sha256=qNowle5v2ukDJ11igNOCParlBfXT8QUeOvXx6sSJ_Ug,34480
|
|
35
35
|
deepfabric/evaluation/inference.py,sha256=y7JA0IsBDwe0sJzVQeItYHAV5wUJn6Bjp1Wsp3r7qYQ,7644
|
|
36
36
|
deepfabric/evaluation/metrics.py,sha256=ITNevYj7CBXzYs-rYhsihO6-rE9n30CYRaVUfdTbcFQ,12026
|
|
37
37
|
deepfabric/evaluation/parser.py,sha256=AXyiCtNV4rueZQxLE_GqqkFNeDAewGoC--0vXHW-jW8,10603
|
|
@@ -66,11 +66,11 @@ deepfabric/tools/loader.py,sha256=Bv56D-76JChlK_QXfHLw_rneGLZYRhkn5ETbJMIdJsA,29
|
|
|
66
66
|
deepfabric/tools/mcp_client.py,sha256=uQRrlDSVwF0ZatOl9bidBNU7IgXgJKQU-xG50dK0Uy4,23377
|
|
67
67
|
deepfabric/training/__init__.py,sha256=MJazTELfrTB15rIiCE04hDeUL8LSSg4-4LWWG6j2BRw,1566
|
|
68
68
|
deepfabric/training/api_key_prompt.py,sha256=pSIMX3eDGyV9x_r7MHE4TyIsIB2SqYb8gKCdAtTY-q8,9371
|
|
69
|
-
deepfabric/training/callback.py,sha256=
|
|
69
|
+
deepfabric/training/callback.py,sha256=5zdifbHA2PWILHl2cVFyO65aW7cGAQhcvDqm3s8_I0Q,13221
|
|
70
70
|
deepfabric/training/dataset_utils.py,sha256=klx8DoawEwuMigBDP-RpMAfe7FvYxRbhj599MErxBr4,7313
|
|
71
71
|
deepfabric/training/metrics_sender.py,sha256=ZCyvMv5hRu8XJnQYVGXJ9wh7HEMJ0l3Ktyi8_etOpZs,10833
|
|
72
|
-
deepfabric-4.8.
|
|
73
|
-
deepfabric-4.8.
|
|
74
|
-
deepfabric-4.8.
|
|
75
|
-
deepfabric-4.8.
|
|
76
|
-
deepfabric-4.8.
|
|
72
|
+
deepfabric-4.8.1.dist-info/METADATA,sha256=rqINWAsjSFRqf4__rva0qMmWFq9cNtSxK1zhndl5anI,20427
|
|
73
|
+
deepfabric-4.8.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
74
|
+
deepfabric-4.8.1.dist-info/entry_points.txt,sha256=zatevils13hfs8x29_vmUyivQ6rTtq7hE2RBusZw1Fo,50
|
|
75
|
+
deepfabric-4.8.1.dist-info/licenses/LICENSE,sha256=-qRt8wmrhQ9aMf7KhmZXc2vrTETYZF-6_T1KCeUhvHY,11340
|
|
76
|
+
deepfabric-4.8.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|