Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Comment Preview URLs
name: Comment Detail API Preview URLs

on:
workflow_run:
workflows: ["Doc-Preview"]
# The `workflow_run` trigger cannot be initiated by reusable workflows because it runs as a job.
# Therefore, the 'CI-Build' workflow is specified here directly.
workflows: ["CI-Build"]
types:
- completed

Expand All @@ -14,6 +16,7 @@ jobs:
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
permissions:
actions: read
pull-requests: write

steps:
Expand Down Expand Up @@ -42,15 +45,15 @@ jobs:
- name: Find existing comment
id: fc
if: steps.download.outcome == 'success'
uses: peter-evans/find-comment@v4
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0
with:
issue-number: ${{ steps.artifacts-data.outputs.pr_number }}
comment-author: 'github-actions[bot]'
body-includes: 'Preview documentation links for API changes in this PR'
body-includes: 'Preview documentation'

- name: Create or update comment
if: steps.download.outcome == 'success'
uses: peter-evans/create-or-update-comment@v4
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ steps.artifacts-data.outputs.pr_number }}
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/Preview-Doc-Url-Comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Comment Doc Preview URL

on:
pull_request_target:
branches:
- develop
types:
- opened
- synchronize
- reopened
- edited

permissions:
pull-requests: write
contents: read

jobs:
comment-doc-preview-url:
name: Comment Doc Preview URL
if: contains(github.event.pull_request.title, 'API Compatibility') # Now just to
runs-on: ubuntu-latest

steps:
- name: Find Existing Comment
id: fc
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: 'Preview documentation'

- name: Create Comment if Not Found
if: steps.fc.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
### 🔗 Helpful Links

- **Preview documentation built from this pr:** [Preview Link](http://preview-paddle-pr-${{ github.event.pull_request.number }}.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/en/develop/api/paddle/abs_en.html)

> **Note:** These links may not be available immediately. They become active after the `Doc-Preview` workflow has successfully completed. If you did not modify any API documentation, this build may not be triggered.
2 changes: 1 addition & 1 deletion .github/workflows/_Doc-Preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
path: |
comment_body.txt
pr_number.txt
retention-days: 1
retention-days: 7

- name: Terminate and delete the container
if: always()
Expand Down
5 changes: 4 additions & 1 deletion python/paddle/nn/layer/pooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,15 @@ class AvgPool2D(Layer):
it must contain two integers, (pool_stride_Height, pool_stride_Width).
Otherwise, the pool stride size will be a square of an int.
Default None, then stride will be equal to the kernel_size.
padding(str|int|list|tuple, optional): The padding size. Padding could be in one of the following forms.
padding(str|int|list|tuple, optional): The padding size.
Padding could be in one of the following forms:

1. A string in ['valid', 'same'].
2. An int, which means the feature map is zero padded by size of `padding` on every sides.
3. A list[int] or tuple(int) whose length is 2, [pad_height, pad_weight] whose value means the padding size of each dimension.
4. A list[int] or tuple(int) whose length is 4. [pad_height_top, pad_height_bottom, pad_width_left, pad_width_right] whose value means the padding size of each side.
5. A list or tuple of pairs of integers. It has the form [[pad_before, pad_after], [pad_before, pad_after], ...]. Note that, the batch dimension and channel dimension should be [0,0] or (0,0).

The default value is 0.
ceil_mode(bool, optional): When True, will use `ceil` instead of `floor` to compute the output shape.
exclusive(bool, optional): Whether to exclude padding points in average pooling
Expand Down
Loading