forked from liv-daliberti/Illusion-of-Reasoning
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfiguration.py
More file actions
60 lines (53 loc) · 1.7 KB
/
Copy pathconfiguration.py
File metadata and controls
60 lines (53 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
"""
Stub module to satisfy static analysis of ``__all__`` when optional deps are absent.
Pylint/astroid complains if names listed in ``__all__`` are not defined. These
placeholders mirror the lazy exports in ``src.training.runtime.env`` and keep
linters quiet in environments where the real dependencies (torch, datasets, etc.)
are not installed.
"""
# The export names intentionally mirror the underlying libraries, so keep their
# original casing to satisfy imports that expect these symbols.
# Pylint sometimes struggles to see these stubbed names in ``__all__`` when
# running in synthetic / analysis-only modes, so silence that check here.
# pylint: disable=invalid-name,duplicate-code,undefined-all-variable
from typing import Any
datasets: Any = None
torch: Any = None
dist: Any = None
transformers: Any = None
wandb: Any = None
DataLoader: Any = None
RandomSampler: Any = None
AcceleratorState: Any = None
ZeroStageEnum: Any = None
ZeroParamStatus: Any = None
get_last_checkpoint: Any = None
get_peft_config: Any = None
GRPOTrainer: Any = None
TrainerCallback: Any = None
set_seed: Any = None
def _resolve_dependency(_instance: Any, _name: str, default: Any) -> Any:
"""
Stub dependency resolver used when optional training deps are missing.
Returns the provided default to mirror the runtime helper signature.
"""
return default
resolve_dependency: Any = _resolve_dependency
__all__ = [
"datasets",
"torch",
"dist",
"transformers",
"wandb",
"DataLoader",
"RandomSampler",
"AcceleratorState",
"ZeroStageEnum",
"ZeroParamStatus",
"get_last_checkpoint",
"get_peft_config",
"GRPOTrainer",
"TrainerCallback",
"set_seed",
"resolve_dependency",
]