Skip to content

[SWE-Paddle] Add task PaddlePaddle__Paddle-79197 - #1522

Open
Echo-Nie wants to merge 2 commits into
PaddlePaddle:masterfrom
Echo-Nie:79197
Open

[SWE-Paddle] Add task PaddlePaddle__Paddle-79197#1522
Echo-Nie wants to merge 2 commits into
PaddlePaddle:masterfrom
Echo-Nie:79197

Conversation

@Echo-Nie

Copy link
Copy Markdown
Contributor

关联

说明

新增 SWE-Paddle 任务 PaddlePaddle__Paddle-79197

该任务覆盖学习率调度器直接接收 optimizer 的使用场景。测试使用来源 PR 中 test_lr_scheduler.py 新增的真实用例,验证调度器能够读取 optimizer 当前的学习率、正确绑定到 optimizer,并在训练过程中正常更新学习率。

验证结果

状态 P2P 6 个 optimizer 参数 F2P
Base + tests/test.patch PASS FAIL
Base + test patch + solution/code.patch PASS PASS

Base P2P

1 passed, 1 warning in 1.44s
[exit code] 0

该 warning 来自已有 Tensor 构造逻辑,与本任务目标无关

Base F2P

test_exponential_decay:
TypeError: The type of learning rate must be float, but received <class 'paddle.optimizer.adam.Adam'>
[exit code] 1

test_cosine_annealing_decay:
TypeError: CosineAnnealingDecay.__init__() got an unexpected keyword argument 'optimizer'
[exit code] 1

test_cosine_annealing_warm_restarts:
TypeError: CosineAnnealingWarmRestarts.__init__() got an unexpected keyword argument 'optimizer'
[exit code] 1

test_multi_step_decay:
TypeError: MultiStepDecay.__init__() got an unexpected keyword argument 'optimizer'
[exit code] 1

test_reduce_on_plateau:
TypeError: ReduceOnPlateau.__init__() got an unexpected keyword argument 'optimizer'
[exit code] 1

test_step_decay:
TypeError: StepDecay.__init__() got an unexpected keyword argument 'optimizer'
[exit code] 1

Solution P2P

1 passed, 1 warning in 1.30s
[exit code] 0

Solution F2P

test_exponential_decay: 1 passed in 1.22s
test_cosine_annealing_decay: 1 passed in 1.28s
test_cosine_annealing_warm_restarts: 1 passed in 1.25s
test_multi_step_decay: 1 passed in 1.27s
test_reduce_on_plateau: 1 passed in 1.26s
test_step_decay: 1 passed in 1.25s

Solution 完整测试

7 passed, 1 warning in 1.77s
[exit code] 0

tests/test.sh

7 passed, 1 warning in 1.44s
[exit code] 0

@Echo-Nie Echo-Nie changed the title 79197 [SWE-Paddle] Add task PaddlePaddle__Paddle-79197 Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant