From 29305b3295d29e50acaa7374304e367e863dae00 Mon Sep 17 00:00:00 2001 From: Liu Yiding Date: Wed, 15 Apr 2026 15:18:56 +0800 Subject: python3-mlcommons-loadgen: upgrade 5.1.2 -> 6.0.14 Update source-date-epoch.patch for 6.0.14 Signed-off-by: Liu Yiding Signed-off-by: Khem Raj --- .../files/source-date-epoch.patch | 43 ++++++++++++---------- .../python3-mlcommons-loadgen_5.1.2.bb | 27 -------------- .../python3-mlcommons-loadgen_6.0.14.bb | 27 ++++++++++++++ 3 files changed, 50 insertions(+), 47 deletions(-) delete mode 100644 meta-python/recipes-devtools/python3-mlcommons-loadgen/python3-mlcommons-loadgen_5.1.2.bb create mode 100644 meta-python/recipes-devtools/python3-mlcommons-loadgen/python3-mlcommons-loadgen_6.0.14.bb (limited to 'meta-python') diff --git a/meta-python/recipes-devtools/python3-mlcommons-loadgen/files/source-date-epoch.patch b/meta-python/recipes-devtools/python3-mlcommons-loadgen/files/source-date-epoch.patch index 32e529d483..3eac44e738 100644 --- a/meta-python/recipes-devtools/python3-mlcommons-loadgen/files/source-date-epoch.patch +++ b/meta-python/recipes-devtools/python3-mlcommons-loadgen/files/source-date-epoch.patch @@ -1,6 +1,6 @@ -From dd7925397b84c2a327cd4594edba9f7ca5acef61 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Fri, 26 Sep 2025 14:02:23 +0800 +From 99dfd88de60dd55bd3b5e7c0516b3882a8e56698 Mon Sep 17 00:00:00 2001 +From: Liu Yiding +Date: Wed, 15 Apr 2026 06:09:37 +0000 Subject: [PATCH] Honor the SOURCE_DATE_EPOCH variable Implement the SOURCE_DATE_EPOCH specification[1] for reproducible @@ -12,30 +12,33 @@ current time. Upstream-Status: Submitted [https://github.com/mlcommons/inference/pull/2345] Signed-off-by: Hongxu Jia + +Update for 6.0.14 +Signed-off-by: Liu Yiding --- version_generator.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/version_generator.py b/version_generator.py -index 2e75243..5202da9 100644 +index b88ae8e..b083eec 100644 --- a/version_generator.py +++ b/version_generator.py -@@ -110,8 +110,13 @@ def generate_loadgen_version_definitions(cc_filename, loadgen_root): - # Write the version into the function definition - ofile.write(func_def("Version", f"\"{version_contents}\"")) - -- date_time_now_local = datetime.datetime.now().isoformat() -- date_time_now_utc = datetime.datetime.utcnow().isoformat() -+ if os.environ.get('SOURCE_DATE_EPOCH', False): -+ source_date_epoch = int(os.environ['SOURCE_DATE_EPOCH']) -+ date_time_now_local = datetime.datetime.fromtimestamp(source_date_epoch).isoformat() -+ date_time_now_utc = datetime.datetime.fromtimestamp(source_date_epoch, tz=datetime.timezone.utc).isoformat() -+ else: -+ date_time_now_local = datetime.datetime.now().isoformat() -+ date_time_now_utc = datetime.datetime.utcnow().isoformat() - ofile.write(func_def("BuildDateLocal", '"' + date_time_now_local + '"')) - ofile.write(func_def("BuildDateUtc", '"' + date_time_now_utc + '"')) +@@ -113,8 +113,13 @@ def generate_loadgen_version_definitions(cc_filename, loadgen_root): + # Write the version into the function definition + ofile.write(func_def("Version", f"\"{version_contents}\"")) +- date_time_now_local = datetime.datetime.now().isoformat() +- date_time_now_utc = datetime.datetime.utcnow().isoformat() ++ if os.environ.get('SOURCE_DATE_EPOCH', False): ++ source_date_epoch = int(os.environ['SOURCE_DATE_EPOCH']) ++ date_time_now_local = datetime.datetime.fromtimestamp(source_date_epoch).isoformat() ++ date_time_now_utc = datetime.datetime.fromtimestamp(source_date_epoch, tz=datetime.timezone.utc).isoformat() ++ else: ++ date_time_now_local = datetime.datetime.now().isoformat() ++ date_time_now_utc = datetime.datetime.utcnow().isoformat() + ofile.write( + func_def( + "BuildDateLocal", -- -2.34.1 +2.43.0 diff --git a/meta-python/recipes-devtools/python3-mlcommons-loadgen/python3-mlcommons-loadgen_5.1.2.bb b/meta-python/recipes-devtools/python3-mlcommons-loadgen/python3-mlcommons-loadgen_5.1.2.bb deleted file mode 100644 index 79687290f5..0000000000 --- a/meta-python/recipes-devtools/python3-mlcommons-loadgen/python3-mlcommons-loadgen_5.1.2.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "MLPerf Inference LoadGen python bindings" -DESCRIPTION = "The LoadGen is a reusable module that efficiently and fairly \ - measures the performance of inference systems. It generates \ - traffic for scenarios as formulated by a diverse set of experts \ - in the MLCommons working group, to emulate the workloads seen in \ - mobile devices, autonomous vehicles, robotics, and cloud-based \ - setups." -HOMEPAGE = "https://mlcommons.org/" -BUGTRACKER = "https://github.com/mlcommons/inference/issues" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://setup.py;beginline=1;endline=14;md5=2c6e34309ef8d57d59ce119f63bc1b76" - -DEPENDS = "python3-pybind11-native" - -inherit setuptools3 pypi - -SRC_URI += " \ - file://source-date-epoch.patch \ -" - -PYPI_PACKAGE = "mlcommons_loadgen" -UPSTREAM_CHECK_PYPI_PACKAGE = "mlcommons_loadgen" - -SRC_URI[sha256sum] = "cd686a6223c978d1056e38a417e4807bfa21c855189f7882d24c8313174bca74" - -# Because the pyproject.toml contains invalid requirements. -INSANE_SKIP += "pep517-backend" diff --git a/meta-python/recipes-devtools/python3-mlcommons-loadgen/python3-mlcommons-loadgen_6.0.14.bb b/meta-python/recipes-devtools/python3-mlcommons-loadgen/python3-mlcommons-loadgen_6.0.14.bb new file mode 100644 index 0000000000..3299f25080 --- /dev/null +++ b/meta-python/recipes-devtools/python3-mlcommons-loadgen/python3-mlcommons-loadgen_6.0.14.bb @@ -0,0 +1,27 @@ +SUMMARY = "MLPerf Inference LoadGen python bindings" +DESCRIPTION = "The LoadGen is a reusable module that efficiently and fairly \ + measures the performance of inference systems. It generates \ + traffic for scenarios as formulated by a diverse set of experts \ + in the MLCommons working group, to emulate the workloads seen in \ + mobile devices, autonomous vehicles, robotics, and cloud-based \ + setups." +HOMEPAGE = "https://mlcommons.org/" +BUGTRACKER = "https://github.com/mlcommons/inference/issues" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://setup.py;beginline=1;endline=14;md5=2c6e34309ef8d57d59ce119f63bc1b76" + +DEPENDS = "python3-pybind11-native" + +inherit setuptools3 pypi + +SRC_URI += " \ + file://source-date-epoch.patch \ +" + +PYPI_PACKAGE = "mlcommons_loadgen" +UPSTREAM_CHECK_PYPI_PACKAGE = "mlcommons_loadgen" + +SRC_URI[sha256sum] = "9a56e361b4614938acdb6a601cc9c57ce551809f831023401bbac6dd7eb00970" + +# Because the pyproject.toml contains invalid requirements. +INSANE_SKIP += "pep517-backend" -- cgit v1.2.3-54-g00ecf