From 5cf6bf27903b637c63c45231cef0de56e370354f Mon Sep 17 00:00:00 2001 From: SigureMo Date: Thu, 8 Jan 2026 01:53:27 +0800 Subject: [PATCH 1/2] [CodeStyle][Xdoctest][223] Fix example code for API `paddle.static.Executor` --- python/paddle/base/executor.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/python/paddle/base/executor.py b/python/paddle/base/executor.py index 7fc324a674418f..c98b96767d9b52 100755 --- a/python/paddle/base/executor.py +++ b/python/paddle/base/executor.py @@ -1257,11 +1257,10 @@ class Executor: Examples: - .. code-block:: python + .. code-block:: pycon >>> import paddle >>> import numpy - >>> import os >>> # Executor is only used in static graph mode >>> paddle.enable_static() @@ -1281,21 +1280,13 @@ class Executor: ... hidden = paddle.static.nn.fc(data, 10) ... loss = paddle.mean(hidden) ... paddle.optimizer.SGD(learning_rate=0.01).minimize(loss) - ... >>> # Run the startup program once and only once. >>> # Not need to optimize/compile the startup program. >>> exe.run(startup_program) - >>> # Run the main program directly without compile. + >>> # Run the main program. >>> x = numpy.random.random(size=(10, 1)).astype('float32') - >>> loss_data, = exe.run(train_program, feed={"X": x}, fetch_list=[loss.name]) - - >>> # Or, compiled the program and run. See `CompiledProgram` - >>> # for more details. - >>> compiled_prog = paddle.static.CompiledProgram( - ... train_program) - >>> loss_data, = exe.run(compiled_prog, feed={"X": x}, fetch_list=[loss.name]) - + >>> (loss_data,) = exe.run(train_program, feed={"X": x}, fetch_list=[loss]) """ place: _Place From f8fb5e529acef58f13872e5e698d30cfd71f72cd Mon Sep 17 00:00:00 2001 From: SigureMo Date: Thu, 8 Jan 2026 01:54:46 +0800 Subject: [PATCH 2/2] bump ubelt ver --- python/unittest_py/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/unittest_py/requirements.txt b/python/unittest_py/requirements.txt index 68851e93d319f3..094c6f49b73d8a 100644 --- a/python/unittest_py/requirements.txt +++ b/python/unittest_py/requirements.txt @@ -16,7 +16,7 @@ parameterized wandb>=0.17.2 ; python_version<"3.12" xlsxwriter==3.0.9 xdoctest==1.3.0 -ubelt==1.3.3 # just for xdoctest +ubelt==1.4.0 # just for xdoctest mypy==1.18.2 soundfile apache-tvm-ffi==0.1.5