Skip to content

Commit

Permalink
Fix FleetX GPT-3 styles (PaddlePaddle#5516)
Browse files Browse the repository at this point in the history
* fix styles

* fix

* changes
  • Loading branch information
sijunhe authored Apr 3, 2023
1 parent 68b21f1 commit 006efcf
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
ignore = E203, E501, E731, E741, W503, W605, E722
ignore = E203, E402, E501, E731, E741, W503, W605, E722
max-line-length = 119

# E402: module level import not at top of file
Expand Down
3 changes: 0 additions & 3 deletions model_zoo/gpt-3/projects/gpt/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@
# limitations under the License.

import argparse
import os
import time

import numpy as np
import paddle
import paddle.distributed.fleet as fleet
import ppfleetx_ops
from ppfleetx.core.engine.inference_engine import InferenceEngine


Expand Down
7 changes: 1 addition & 6 deletions model_zoo/gpt-3/projects/gpt/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,10 @@
from __future__ import absolute_import, division, print_function

import argparse
import os
import time

import numpy as np
import paddle
import paddle.distributed.fleet as fleet
import ppfleetx_ops
from ppfleetx.core.engine.inference_engine import InferenceEngine
from ppfleetx.data import build_dataloader, tokenizers
from ppfleetx.data import tokenizers


def parse_args():
Expand Down
7 changes: 0 additions & 7 deletions model_zoo/gpt-3/tasks/gpt/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import argparse
import math
import os
import random
import sys
import time

import numpy as np
import paddle
import paddle.distributed as dist
import yaml
from paddle.distributed import fleet

__dir__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(__dir__, "../../")))
Expand Down
4 changes: 1 addition & 3 deletions model_zoo/gpt-3/tasks/gpt/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@
import sys

import paddle.distributed as dist
from paddle.distributed import fleet

__dir__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(__dir__, "../../")))

from ppfleetx.core import EagerEngine
from ppfleetx.data import build_dataloader, tokenizers
from ppfleetx.data import tokenizers
from ppfleetx.distributed.apis import env
from ppfleetx.models import build_module
from ppfleetx.utils import config
from ppfleetx.utils.log import logger

if __name__ == "__main__":
args = config.parse_args()
Expand Down
5 changes: 0 additions & 5 deletions model_zoo/gpt-3/tools/auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@

from __future__ import absolute_import, division, print_function

import copy
import os
import random
import sys

import numpy as np
import paddle
import paddle.distributed as dist
from paddle.distributed import fleet

Expand All @@ -31,7 +27,6 @@
from ppfleetx.data import build_auto_dataset
from ppfleetx.models import build_module
from ppfleetx.utils import config
from ppfleetx.utils.log import logger

# init_logger()

Expand Down
5 changes: 0 additions & 5 deletions model_zoo/gpt-3/tools/auto_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@

from __future__ import absolute_import, division, print_function

import copy
import os
import random
import sys

import numpy as np
import paddle

__dir__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(__dir__, "../")))

Expand Down
1 change: 0 additions & 1 deletion model_zoo/gpt-3/tools/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import sys

import paddle.distributed as dist
from paddle.distributed import fleet

__dir__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(__dir__, "../")))
Expand Down
1 change: 0 additions & 1 deletion model_zoo/gpt-3/tools/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import sys

import paddle.distributed as dist
from paddle.distributed import fleet

__dir__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(__dir__, "../")))
Expand Down
1 change: 0 additions & 1 deletion model_zoo/gpt-3/tools/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import sys

import paddle.distributed as dist
from paddle.distributed import fleet

__dir__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(__dir__, "../")))
Expand Down

0 comments on commit 006efcf

Please sign in to comment.