Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bace84f9e9 | |||
| 8a7a011cb1 |
3137
data/datasets/三国演义/splits/m3_test.jsonl
Normal file
3137
data/datasets/三国演义/splits/m3_test.jsonl
Normal file
File diff suppressed because it is too large
Load Diff
25096
data/datasets/三国演义/splits/m3_train.jsonl
Normal file
25096
data/datasets/三国演义/splits/m3_train.jsonl
Normal file
File diff suppressed because it is too large
Load Diff
3137
data/datasets/三国演义/splits/m3_val.jsonl
Normal file
3137
data/datasets/三国演义/splits/m3_val.jsonl
Normal file
File diff suppressed because it is too large
Load Diff
2625
data/datasets/三国演义/splits/reranker_test.jsonl
Normal file
2625
data/datasets/三国演义/splits/reranker_test.jsonl
Normal file
File diff suppressed because it is too large
Load Diff
20990
data/datasets/三国演义/splits/reranker_train.jsonl
Normal file
20990
data/datasets/三国演义/splits/reranker_train.jsonl
Normal file
File diff suppressed because one or more lines are too long
2623
data/datasets/三国演义/splits/reranker_val.jsonl
Normal file
2623
data/datasets/三国演义/splits/reranker_val.jsonl
Normal file
File diff suppressed because it is too large
Load Diff
24
data/datasets/三国演义/splits/split_summary.json
Normal file
24
data/datasets/三国演义/splits/split_summary.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"input_dir": "data/datasets/三国演义",
|
||||
"output_dir": "data/datasets/三国演义/splits",
|
||||
"split_ratios": {
|
||||
"train": 0.8,
|
||||
"validation": 0.1,
|
||||
"test": 0.1
|
||||
},
|
||||
"seed": 42,
|
||||
"datasets": {
|
||||
"bge_m3": {
|
||||
"total_samples": 31370,
|
||||
"train_samples": 25096,
|
||||
"val_samples": 3137,
|
||||
"test_samples": 3137
|
||||
},
|
||||
"reranker": {
|
||||
"total_samples": 26238,
|
||||
"train_samples": 20990,
|
||||
"val_samples": 2623,
|
||||
"test_samples": 2625
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -525,7 +525,12 @@ class ComprehensiveTestSuite:
|
||||
|
||||
# Test saving
|
||||
state_dict = {
|
||||
'model_state_dict': torch.randn(10, 10),
|
||||
'model_state_dict': {
|
||||
'layer1.weight': torch.randn(10, 5),
|
||||
'layer1.bias': torch.randn(10),
|
||||
'layer2.weight': torch.randn(3, 10),
|
||||
'layer2.bias': torch.randn(3)
|
||||
},
|
||||
'optimizer_state_dict': {'lr': 0.001},
|
||||
'step': 100
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ class CheckpointManager:
|
||||
model_path = os.path.join(temp_dir, 'pytorch_model.bin')
|
||||
# Add extra safety check for model state dict
|
||||
model_state = state_dict['model_state_dict']
|
||||
if not model_state:
|
||||
if model_state is None or (isinstance(model_state, dict) and len(model_state) == 0):
|
||||
raise RuntimeError("Model state dict is empty")
|
||||
|
||||
self._safe_torch_save(model_state, model_path)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user