Skip to content

Conversation

@LemonNoel
Copy link
Contributor

PR types

Bug fixes

PR changes

APIs

Description

  • Add type checking in prediction_loop to avoid unexpected logits[0] when batch_size=1, which might lead to Out of memory error.

@LemonNoel LemonNoel requested a review from ZHUI November 30, 2022 08:57
@LemonNoel LemonNoel self-assigned this Nov 30, 2022
@paddle-bot
Copy link

paddle-bot bot commented Nov 30, 2022

Thanks for your contribution!


logits = nested_detach(logits)
if len(logits) == 1:
if isinstance(logits, (list, tuple)) and len(logits) == 1:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里增加了类型检查,其他修改均为代码风格检查。

Copy link
Contributor

@ZHUI ZHUI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sijunhe sijunhe merged commit db57a64 into PaddlePaddle:develop Nov 30, 2022
sijunhe pushed a commit to sijunhe/PaddleNLP that referenced this pull request Nov 30, 2022
@LemonNoel LemonNoel deleted the trainer branch December 9, 2022 02:32
sijunhe added a commit that referenced this pull request Dec 14, 2022
* [NewFeatures]add ci & pypi workflow (#3578)

* add basic ci & pypi workflow

* add Makefile file to enable more custom scripts

* update makefile & workflow

* add manifest.in file

* save requirements

* improve makefile

* add test running command

* complete simple CI test script

* complete simple CI test script

* complete first version of workflow

* failure at first

* remove CI workflow

* update workflows

* add dev-dependency

* complete format & lint

* add paddle dependency

* complete format & lint & test command

* upgrae workflow files

* use pytest to do test

* update need keywords

* change the description

* update lint script

* upgrade workflow

* update parameterized

* update makefile

* fix lint

* update test command in workflow

* fix __init__ lint

* ignore all __init__.py file

* fix script workflow

* udpate flake8 config

* update flake config

* update flake8 config

* remove redefinition of unused

Co-authored-by: Sijun He <[email protected]>

* Add multi recall of semantic search for pipelines (#3864)

* Add multi recall of semantic search for pipelines

* Update multi recall semantic search README.md

* remove unused imports

* remove unused imports

* Update __init__.py

* remove unused imports

* restore __init__.py

* skip retriever __init__.py

* [trainer] fix bug when batch size=1 (#3960)

* [PPdiffusers] Release ppdiffusers 0.6.3 (#3963)

* release 0.6.3

* release 0.6.3

* style

* code style

* fix test

* remove commented code

Co-authored-by: 骑马小猫 <[email protected]>
Co-authored-by: w5688414 <[email protected]>
Co-authored-by: Noel <[email protected]>
Co-authored-by: yujun <[email protected]>
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.

3 participants