Skip to content

【PaddleNLP No.8】 Fix pir in lexical_analysis #10470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 23, 2025
Merged
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
8 changes: 6 additions & 2 deletions slm/examples/lexical_analysis/deploy/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@
import paddle

from paddlenlp.data import Pad, Stack, Tuple
from paddlenlp.utils.env import (
PADDLE_INFERENCE_MODEL_SUFFIX,
PADDLE_INFERENCE_WEIGHTS_SUFFIX,
)

# yapf: disable
parser = argparse.ArgumentParser(__doc__)
parser.add_argument("--model_file", type=str, required=True, default='./static_graph_params.pdmodel', help="The path to model info in static graph.")
parser.add_argument("--params_file", type=str, required=True, default='./static_graph_params.pdiparams', help="The path to parameters in static graph.")
parser.add_argument("--model_file", type=str, required=True, default=f'./static_graph_params{PADDLE_INFERENCE_MODEL_SUFFIX}', help="The path to model info in static graph.")
parser.add_argument("--params_file", type=str, required=True, default=f'./static_graph_params{PADDLE_INFERENCE_WEIGHTS_SUFFIX}', help="The path to parameters in static graph.")
parser.add_argument("--data_dir", type=str, default=None, help="The folder where the dataset is located.")
parser.add_argument("--init_checkpoint", type=str, default=None, help="Path to init model.")
parser.add_argument("--batch_size", type=int, default=2, help="The number of sequences contained in a mini-batch.")
Expand Down