mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
[Benchmark] Update seed argument handling in benchmark_serving.py (#7356)
This commit is contained in:
@@ -1123,6 +1123,8 @@ def save_to_pytorch_benchmark_format(args: argparse.Namespace, results: dict[str
|
|||||||
def main(args: argparse.Namespace):
|
def main(args: argparse.Namespace):
|
||||||
"""Main entry point"""
|
"""Main entry point"""
|
||||||
print(args)
|
print(args)
|
||||||
|
if args.seed is not None:
|
||||||
|
print(f"Using random seed: {args.seed}")
|
||||||
random.seed(args.seed)
|
random.seed(args.seed)
|
||||||
np.random.seed(args.seed)
|
np.random.seed(args.seed)
|
||||||
|
|
||||||
@@ -1431,7 +1433,7 @@ if __name__ == "__main__":
|
|||||||
"bursty requests. A higher burstiness value (burstiness > 1) "
|
"bursty requests. A higher burstiness value (burstiness > 1) "
|
||||||
"results in a more uniform arrival of requests.",
|
"results in a more uniform arrival of requests.",
|
||||||
)
|
)
|
||||||
parser.add_argument("--seed", type=int, default=0)
|
parser.add_argument("--seed", type=int, default=None)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--shuffle",
|
"--shuffle",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
|
|||||||
Reference in New Issue
Block a user