Skip to content

Commit e26ccaa

Browse files
committed
Fix final linting errors with noqa comments
1 parent 6b6f05c commit e26ccaa

File tree

4 files changed

+51
-3
lines changed

4 files changed

+51
-3
lines changed

runs/20251001_190344/metrics.jsonl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{"timestamp": "2025-10-01T19:03:44.808419", "run_id": "20251001_190344", "event": "config", "base_model": "test-model", "train_file": "/private/var/folders/1s/sm2bn6kd64gdnv757t9qshcm0000gn/T/pytest-of-jonathanhaas/pytest-43/test_early_stopping_on_thresho0/train.jsonl", "eval_tasks": [], "renderer_name": "default", "learning_rate": 0.0001, "eval_threshold": 0.8, "max_rounds": 5, "lr_decay": 0.8, "evalops_enabled": false, "evalops_test_suite_id": null, "evalops_api_url": null, "steps_per_round": 1, "batch_size": 8, "max_seq_length": 2048, "lora_rank": 16, "warmup_steps": 100, "max_steps": 1000, "min_lr": 1e-06, "use_recommended_lr": false}
2+
{"timestamp": "2025-10-01T19:03:44.808878", "run_id": "20251001_190344", "event": "checkpoint", "round": 1, "checkpoint_uri": "<MagicMock name='mock.create_lora_training_client().save_weights_for_sampler().result().path' id='4435673840'>"}
3+
{"timestamp": "2025-10-01T19:03:44.809090", "run_id": "20251001_190344", "event": "evaluation", "round": 1, "score": 0.85, "threshold": 0.8, "passed": true, "metrics": {}}
4+
{"timestamp": "2025-10-01T19:03:44.810721", "run_id": "20251001_190344", "event": "config", "base_model": "test-model", "train_file": "/private/var/folders/1s/sm2bn6kd64gdnv757t9qshcm0000gn/T/pytest-of-jonathanhaas/pytest-43/test_full_rounds_below_thresho0/train.jsonl", "eval_tasks": [], "renderer_name": "default", "learning_rate": 0.0001, "eval_threshold": 0.9, "max_rounds": 3, "lr_decay": 0.5, "evalops_enabled": false, "evalops_test_suite_id": null, "evalops_api_url": null, "steps_per_round": 1, "batch_size": 8, "max_seq_length": 2048, "lora_rank": 16, "warmup_steps": 100, "max_steps": 1000, "min_lr": 1e-06, "use_recommended_lr": false}
5+
{"timestamp": "2025-10-01T19:03:44.811073", "run_id": "20251001_190344", "event": "checkpoint", "round": 1, "checkpoint_uri": "<MagicMock name='mock.create_lora_training_client().save_weights_for_sampler().result().path' id='4435678208'>"}
6+
{"timestamp": "2025-10-01T19:03:44.811249", "run_id": "20251001_190344", "event": "evaluation", "round": 1, "score": 0.7, "threshold": 0.9, "passed": false, "metrics": {}}
7+
{"timestamp": "2025-10-01T19:03:44.811374", "run_id": "20251001_190344", "event": "checkpoint", "round": 2, "checkpoint_uri": "<MagicMock name='mock.create_lora_training_client().save_weights_for_sampler().result().path' id='4435678208'>"}
8+
{"timestamp": "2025-10-01T19:03:44.811507", "run_id": "20251001_190344", "event": "evaluation", "round": 2, "score": 0.7, "threshold": 0.9, "passed": false, "metrics": {}}
9+
{"timestamp": "2025-10-01T19:03:44.811621", "run_id": "20251001_190344", "event": "checkpoint", "round": 3, "checkpoint_uri": "<MagicMock name='mock.create_lora_training_client().save_weights_for_sampler().result().path' id='4435678208'>"}
10+
{"timestamp": "2025-10-01T19:03:44.811750", "run_id": "20251001_190344", "event": "evaluation", "round": 3, "score": 0.7, "threshold": 0.9, "passed": false, "metrics": {}}
11+
{"timestamp": "2025-10-01T19:03:44.813439", "run_id": "20251001_190344", "event": "config", "base_model": "test-model", "train_file": "/private/var/folders/1s/sm2bn6kd64gdnv757t9qshcm0000gn/T/pytest-of-jonathanhaas/pytest-43/test_evalops_integration_calle0/train.jsonl", "eval_tasks": [], "renderer_name": "default", "learning_rate": 0.0001, "eval_threshold": 0.8, "max_rounds": 1, "lr_decay": 0.8, "evalops_enabled": true, "evalops_test_suite_id": "suite-123", "evalops_api_url": null, "steps_per_round": 1, "batch_size": 8, "max_seq_length": 2048, "lora_rank": 16, "warmup_steps": 100, "max_steps": 1000, "min_lr": 1e-06, "use_recommended_lr": false}
12+
{"timestamp": "2025-10-01T19:03:44.813776", "run_id": "20251001_190344", "event": "checkpoint", "round": 1, "checkpoint_uri": "<MagicMock name='mock.create_lora_training_client().save_weights_for_sampler().result().path' id='4435684928'>"}
13+
{"timestamp": "2025-10-01T19:03:44.813983", "run_id": "20251001_190344", "event": "evaluation", "round": 1, "score": 0.9, "threshold": 0.8, "passed": true, "metrics": {}}
14+
{"timestamp": "2025-10-01T19:03:44.815579", "run_id": "20251001_190344", "event": "config", "base_model": "test-model", "train_file": "/private/var/folders/1s/sm2bn6kd64gdnv757t9qshcm0000gn/T/pytest-of-jonathanhaas/pytest-43/test_lr_decay_across_rounds0/train.jsonl", "eval_tasks": [], "renderer_name": "default", "learning_rate": 1.0, "eval_threshold": 0.99, "max_rounds": 3, "lr_decay": 0.5, "evalops_enabled": false, "evalops_test_suite_id": null, "evalops_api_url": null, "steps_per_round": 1, "batch_size": 8, "max_seq_length": 2048, "lora_rank": 16, "warmup_steps": 0, "max_steps": 1000, "min_lr": 1e-06, "use_recommended_lr": false}
15+
{"timestamp": "2025-10-01T19:03:44.815910", "run_id": "20251001_190344", "event": "checkpoint", "round": 1, "checkpoint_uri": "<MagicMock name='mock.create_lora_training_client().save_weights_for_sampler().result().path' id='4436250304'>"}
16+
{"timestamp": "2025-10-01T19:03:44.816157", "run_id": "20251001_190344", "event": "evaluation", "round": 1, "score": 0.7, "threshold": 0.99, "passed": false, "metrics": {}}
17+
{"timestamp": "2025-10-01T19:03:44.816284", "run_id": "20251001_190344", "event": "checkpoint", "round": 2, "checkpoint_uri": "<MagicMock name='mock.create_lora_training_client().save_weights_for_sampler().result().path' id='4436250304'>"}
18+
{"timestamp": "2025-10-01T19:03:44.816435", "run_id": "20251001_190344", "event": "evaluation", "round": 2, "score": 0.7, "threshold": 0.99, "passed": false, "metrics": {}}
19+
{"timestamp": "2025-10-01T19:03:44.816552", "run_id": "20251001_190344", "event": "checkpoint", "round": 3, "checkpoint_uri": "<MagicMock name='mock.create_lora_training_client().save_weights_for_sampler().result().path' id='4436250304'>"}
20+
{"timestamp": "2025-10-01T19:03:44.816688", "run_id": "20251001_190344", "event": "evaluation", "round": 3, "score": 0.7, "threshold": 0.99, "passed": false, "metrics": {}}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"round_idx": 3,
3+
"global_step": 3,
4+
"learning_rate": 0.25,
5+
"checkpoint_uri": "<MagicMock name='mock.create_lora_training_client().save_weights_for_sampler().result().path' id='4436250304'>",
6+
"config": {
7+
"base_model": "test-model",
8+
"train_file": "/private/var/folders/1s/sm2bn6kd64gdnv757t9qshcm0000gn/T/pytest-of-jonathanhaas/pytest-43/test_lr_decay_across_rounds0/train.jsonl",
9+
"eval_tasks": [],
10+
"renderer_name": "default",
11+
"learning_rate": 1.0,
12+
"eval_threshold": 0.99,
13+
"max_rounds": 3,
14+
"lr_decay": 0.5,
15+
"evalops_enabled": false,
16+
"evalops_test_suite_id": null,
17+
"evalops_api_url": null,
18+
"steps_per_round": 1,
19+
"batch_size": 8,
20+
"max_seq_length": 2048,
21+
"lora_rank": 16,
22+
"warmup_steps": 0,
23+
"max_steps": 1000,
24+
"min_lr": 1e-06,
25+
"use_recommended_lr": false
26+
},
27+
"timestamp": "2025-10-01T19:03:44.816619"
28+
}

tests/test_data_loader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def test_prepare_training_data_deduplication(self, tmp_path, capsys):
170170
loader = DataLoader()
171171
tokenizer = MockTokenizer()
172172

173-
datums = loader.prepare_training_data(str(jsonl_file), tokenizer, deduplicate=True)
173+
loader.prepare_training_data(str(jsonl_file), tokenizer, deduplicate=True)
174174

175175
captured = capsys.readouterr()
176176
assert "Deduplicated to 2 unique examples" in captured.out
@@ -187,7 +187,7 @@ def test_prepare_training_data_filters_invalid(self, tmp_path, capsys):
187187
loader = DataLoader()
188188
tokenizer = MockTokenizer()
189189

190-
datums = loader.prepare_training_data(str(jsonl_file), tokenizer)
190+
loader.prepare_training_data(str(jsonl_file), tokenizer)
191191

192192
captured = capsys.readouterr()
193193
assert "Filtered to 1 valid examples" in captured.out

trainer_with_eval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def run_training_round(training_client, datums: list, learning_rate: float) -> N
163163
datums: List of Datum objects representing the training batch.
164164
learning_rate: Learning rate for the optimizer.
165165
"""
166-
fwd_result = training_client.forward_backward(datums, loss_fn="cross_entropy")
166+
training_client.forward_backward(datums, loss_fn="cross_entropy")
167167
training_client.optim_step(types.AdamParams(learning_rate=learning_rate))
168168

169169

0 commit comments

Comments
 (0)