gptmed 0.4.0__py3-none-any.whl → 0.4.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.
gptmed/api.py CHANGED
@@ -203,6 +203,7 @@ def train_from_config(
203
203
  log_dir=args['log_dir'],
204
204
  device=actual_device, # Use actual device from DeviceManager
205
205
  seed=args['seed'],
206
+ resume_from=args.get('resume_from'), # Pass resume checkpoint path
206
207
  )
207
208
 
208
209
  # Create optimizer
@@ -37,6 +37,7 @@ COMMON FAILURE MODES:
37
37
 
38
38
  from dataclasses import dataclass
39
39
  from pathlib import Path
40
+ from typing import Optional
40
41
  import json
41
42
 
42
43
 
@@ -91,6 +92,9 @@ class TrainingConfig:
91
92
  # Reproducibility
92
93
  seed: int = 42
93
94
 
95
+ # Resume training
96
+ resume_from: Optional[str] = None # Path to checkpoint to resume from
97
+
94
98
  def to_dict(self) -> dict:
95
99
  """Convert to dictionary."""
96
100
  return {
@@ -117,6 +121,7 @@ class TrainingConfig:
117
121
  "device": self.device,
118
122
  "use_amp": self.use_amp,
119
123
  "seed": self.seed,
124
+ "resume_from": self.resume_from,
120
125
  }
121
126
 
122
127
  def save(self, path: Path):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gptmed
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: A lightweight GPT-based language model framework for training custom question-answering models on any domain
5
5
  Author-email: Sanjog Sigdel <sigdelsanjog@gmail.com>
6
6
  Maintainer-email: Sanjog Sigdel <sigdelsanjog@gmail.com>
@@ -1,8 +1,8 @@
1
1
  gptmed/__init__.py,sha256=lSCUt0jmB81dEG0UroQdrk8TMG9Hv-_a14nAvB6yYiQ,2725
2
- gptmed/api.py,sha256=k9a_1F2h__xgKnH2l0FaJqAqu-iTYt5tu_VfVO0UhrA,9806
2
+ gptmed/api.py,sha256=GbOaFYvDQgn_qm2FCLiiSXDp-uhvlUNRcY6zTFmsBAs,9882
3
3
  gptmed/configs/__init__.py,sha256=yRa-zgPQ-OCzu8fvCrfWMG-CjF3dru3PZzknzm0oUaQ,23
4
4
  gptmed/configs/config_loader.py,sha256=3GQ1iCNpdJ5yALWXA3SPPHRkaUO-117vdArEL6u7sK8,6354
5
- gptmed/configs/train_config.py,sha256=KqfNBh9hdTTd_6gEAlrClU8sVFSlVDmZJOrf3cPwFe8,4657
5
+ gptmed/configs/train_config.py,sha256=cuGE5o4N3TA65Sue8J3XrbmI5QKI7Ww3WeHd2M7yoHQ,4828
6
6
  gptmed/configs/training_config.yaml,sha256=EEZZa3kcsZr3g-_fKDPYZt4_NTpmS-3NvJrTYSWNc8g,2874
7
7
  gptmed/data/__init__.py,sha256=iAHeakB5pBAd7MkmarPPY0UKS9bTaO_winLZ23Y2O90,54
8
8
  gptmed/data/parsers/__init__.py,sha256=BgVzXuZgeE5DUCC4SzN7vflL40wQ4Q4_4DmJ1Y43_nw,211
@@ -40,9 +40,9 @@ gptmed/training/utils.py,sha256=pJxCwneNr2STITIYwIDCxRzIICDFOxOMzK8DT7ck2oQ,5651
40
40
  gptmed/utils/__init__.py,sha256=XuMhIqOXF7mjnog_6Iky-hSbwvFb0iK42B4iDUpgi0U,44
41
41
  gptmed/utils/checkpoints.py,sha256=jPKJtO0YRZieGmpwqotgDkBzd__s_raDxS1kLpfjBJE,7113
42
42
  gptmed/utils/logging.py,sha256=7dJc1tayMxCBjFSDXe4r9ACUTpoPTTGsJ0UZMTqZIDY,5303
43
- gptmed-0.4.0.dist-info/licenses/LICENSE,sha256=v2spsd7N1pKFFh2G8wGP_45iwe5S0DYiJzG4im8Rupc,1066
44
- gptmed-0.4.0.dist-info/METADATA,sha256=kVsL6zbBoGw1jrlaDiPkBAr_D7YedPCSwZkjGCFz04c,13832
45
- gptmed-0.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
46
- gptmed-0.4.0.dist-info/entry_points.txt,sha256=ATqOzTtPVdUiFX5ZSeo3n9JkUCqocUxEXTgy1CfNRZE,110
47
- gptmed-0.4.0.dist-info/top_level.txt,sha256=mhyEq3rG33t21ziJz5w3TPgx0RjPf4zXMNUx2JTiNmE,7
48
- gptmed-0.4.0.dist-info/RECORD,,
43
+ gptmed-0.4.1.dist-info/licenses/LICENSE,sha256=v2spsd7N1pKFFh2G8wGP_45iwe5S0DYiJzG4im8Rupc,1066
44
+ gptmed-0.4.1.dist-info/METADATA,sha256=ek6fOyXkyu9k_d66_Vt2Rn8-ZyikKn-raTkdeXFIEGg,13832
45
+ gptmed-0.4.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
46
+ gptmed-0.4.1.dist-info/entry_points.txt,sha256=ATqOzTtPVdUiFX5ZSeo3n9JkUCqocUxEXTgy1CfNRZE,110
47
+ gptmed-0.4.1.dist-info/top_level.txt,sha256=mhyEq3rG33t21ziJz5w3TPgx0RjPf4zXMNUx2JTiNmE,7
48
+ gptmed-0.4.1.dist-info/RECORD,,
File without changes