Skip to content
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

Removed mlperf.conf check in submission checker, removed equal issue … #1887

Merged
merged 67 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
4e1ba93
Removed mlperf.conf check in submission checker, removed equal issue …
arjunsuresh Oct 23, 2024
d85fa9e
Fix loadgen wheel package
arjunsuresh Oct 23, 2024
de458a1
Embed mlperf.conf as a binary string in the distribution
arjunsuresh Oct 23, 2024
1140549
Fix xxd command for loadgen
arjunsuresh Oct 23, 2024
13c47f6
Fix mlperf_conf.h include
arjunsuresh Oct 23, 2024
e500060
Fix mlperf_conf.h include
arjunsuresh Oct 23, 2024
9588355
Fix mlperf_conf.h include
arjunsuresh Oct 23, 2024
f26302e
Fix mlperf_conf.h include
arjunsuresh Oct 23, 2024
f506644
Fix mlperf_conf.h include
arjunsuresh Oct 23, 2024
95c5541
Fix loadgen VERSION to include patch number, remove hardcoded versions
arjunsuresh Oct 23, 2024
5d8838f
Added vim-common deps for loadgen build on Linux gh action
arjunsuresh Oct 23, 2024
e32a3a7
Support mlperf_loadgen name
arjunsuresh Oct 23, 2024
fba2222
Added VERSION.txt src dependency in cmake
arjunsuresh Oct 23, 2024
2c6641c
Added VERSION.txt src dependency in cmake
arjunsuresh Oct 23, 2024
5b2ebfa
Fix xxd deps for loadgen
arjunsuresh Oct 23, 2024
e3df0db
Increment loadgen patch version
arjunsuresh Oct 23, 2024
7921ed2
Increment loadgen patch version
arjunsuresh Oct 23, 2024
c5bdaca
Store mlperf.conf as a text string
arjunsuresh Oct 23, 2024
98313d9
Fix setup.py and removed xxd
arjunsuresh Oct 23, 2024
8ca64f9
Added package_dir for loadgen
arjunsuresh Oct 23, 2024
decce8c
Added package_dir for loadgen, added pypi loadgen test in github action
arjunsuresh Oct 23, 2024
06e6afd
Added package_dir for loadgen, added pypi loadgen test in github action
arjunsuresh Oct 23, 2024
184786a
Increment version to 4.1.12
arjunsuresh Oct 23, 2024
b6046a5
[Automated Commit] Format Codebase
arjunsuresh Oct 23, 2024
0e224cd
Increment version
arjunsuresh Oct 23, 2024
fe973c8
Increment version
arjunsuresh Oct 23, 2024
8a77640
Increment version to 4.1.14
arjunsuresh Oct 23, 2024
21b1bfa
Cleanup for build_wheels gh action
arjunsuresh Oct 24, 2024
ebf1dbe
Merge remote-tracking branch 'origin/dev' into dev
arjunsuresh Oct 24, 2024
fd9a6d8
Cleanup for build_wheels gh action
arjunsuresh Oct 24, 2024
ee7e5e1
Increment version
arjunsuresh Oct 24, 2024
e6b5e7c
Increment version to 4.1.16
arjunsuresh Oct 24, 2024
d65eabe
Increment version to 4.1.14
arjunsuresh Oct 23, 2024
cc935e0
Cleanup for build_wheels gh action
arjunsuresh Oct 24, 2024
d5e9431
Increment version
arjunsuresh Oct 24, 2024
746a74a
Cleanup for build_wheels gh action
arjunsuresh Oct 24, 2024
1708dd8
GH action cleanup
arjunsuresh Oct 24, 2024
d0b567c
Increment version
arjunsuresh Oct 24, 2024
3b698d0
Increment version
arjunsuresh Oct 24, 2024
cdaa4dd
Increment version
arjunsuresh Oct 24, 2024
a408b9f
Increment version to 4.1.20
arjunsuresh Oct 24, 2024
aa07e7f
Increment version
arjunsuresh Oct 24, 2024
8bf4fcd
Merge remote-tracking branch 'origin/dev' into dev
arjunsuresh Oct 24, 2024
d6e2d69
Increment version
arjunsuresh Oct 24, 2024
6489ef4
Increment version
arjunsuresh Oct 24, 2024
1cd31f9
Update submission_checker.py | replace <sut>.json by model-info.json
arjunsuresh Oct 25, 2024
f63f304
[Automated Commit] Format Codebase
arjunsuresh Oct 25, 2024
99f9c7f
Update submission_checker.py
arjunsuresh Oct 25, 2024
6ec9013
Retain backward compatibility of the submission checker since v4.0
arjunsuresh Oct 25, 2024
54072ed
[Automated Commit] Format Codebase
arjunsuresh Oct 25, 2024
621b6dd
Support impl in model-info.json
arjunsuresh Oct 25, 2024
4be1d16
Update submission_checker.py
arjunsuresh Oct 25, 2024
6475ac9
Submission checker cleanup, support move/removal of invalid results
arjunsuresh Oct 28, 2024
85ab9f6
Cleanup/fix of preprocess_submission code
arjunsuresh Oct 28, 2024
002a836
Fix params for get_performance_metric (submission checker)
arjunsuresh Oct 28, 2024
b0142f6
Fix params for check_performance_dir (submission checker)
arjunsuresh Oct 28, 2024
6e8f527
[Automated Commit] Format Codebase
arjunsuresh Oct 28, 2024
443aae0
Merge branch 'master' into dev
arjunsuresh Oct 29, 2024
90029be
Increment version to 4.1.23
arjunsuresh Oct 29, 2024
beb5c9f
[Automated Commit] Format Codebase
arjunsuresh Oct 29, 2024
72b5954
Added compliance checks to preprocess submission, use logging for deb…
arjunsuresh Oct 29, 2024
f5bf1bf
Update test-submission-checker.yml to check inference_results_v4.1 fr…
arjunsuresh Oct 29, 2024
2d537ed
Added skip-accuarcy-files-check option to submission checker
arjunsuresh Oct 29, 2024
20c8d17
Added skip-accuarcy-files-check option to submission checker
arjunsuresh Oct 29, 2024
ee535b4
Added skip-accuarcy-files-check option to submission checker
arjunsuresh Oct 29, 2024
15628ed
Merge branch 'master' into dev
arjunsuresh Oct 29, 2024
e8620ea
Merge branch 'master' into dev
arjunsuresh Oct 30, 2024
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
28 changes: 16 additions & 12 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- master
- loadgen-release
- dev
paths:
- loadgen/**

Expand All @@ -17,25 +18,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2

# Step 3: Check if VERSION.txt file has changed in this push
# Check if VERSION.txt file has changed in this push
- name: Check if VERSION.txt file has changed
id: version_changed
run: |
echo "version_changed=false" >> $GITHUB_ENV
echo "new_version=" >> $GITHUB_ENV # Initialize with empty value
if git diff --name-only HEAD~1 | grep -q "VERSION.txt"; then
echo "VERSION.txt file has been modified"
echo "::set-output name=version_changed::true"
new_version=$(cat VERSION.txt)
echo "version_changed=true" >> $GITHUB_ENV
new_version=$(cat loadgen/VERSION.txt)
echo "new_version=$new_version" >> $GITHUB_ENV
else
echo "VERSION file has NOT been modified"
echo "::set-output name=version_changed::false"
echo "VERSION.txt file has NOT been modified"
fi
echo "::set-output name=new_version::$new_version"

# Step 4: Increment version if VERSION was not changed
# Step 4: Increment version if VERSION.txt was not changed
- name: Increment version if necessary
id: do_version_increment
if: steps.version_changed.outputs.version_changed == 'false'
if: env.version_changed == 'false'
run: |
cd loadgen
# Check if VERSION file exists, else initialize it
Expand All @@ -49,17 +53,17 @@ jobs:
new_version="$major.$minor.$patch"
echo $new_version > VERSION.txt
echo "New version: $new_version"
echo "::set-output name=new_version::$new_version"
echo "new_version=$new_version" >> $GITHUB_ENV

# Step 5: Commit the updated version to the repository
- name: Commit updated version
if: steps.version_changed.outputs.version_changed == 'false'
if: env.version_changed == 'false'
run: |
cd loadgen
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git add VERSION.txt
git commit -m "Increment version to ${{ steps.do_version_increment.outputs.new_version }}"
git commit -m "Increment version to $new_version"
git push

build_wheels:
Expand All @@ -80,7 +84,7 @@ jobs:
run: python -m pip install cibuildwheel twine

- name: Build wheels
run: python -m cibuildwheel loadgen/ --output-dir wheels
run: git pull && python -m cibuildwheel loadgen/ --output-dir wheels

# Save wheels as artifacts
- name: Upload built wheels
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-resnet50.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
matrix:
python-version: [ "3.9" ]
backend: [ "onnxruntime", "tf" ]
loadgen-flag: [ "", "--adr.loadgen.tags=_from-pip --pip_loadgen=yes" ]

steps:
- uses: actions/checkout@v3
Expand All @@ -34,4 +35,4 @@ jobs:
python3 -m pip install cm4mlops
- name: Test Resnet50 and end to end submission generation
run: |
cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=resnet50 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --adr.inference-src.tags=_branch.${{ github.event.pull_request.head.ref }},_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src.version=custom --adr.loadgen.version=custom
cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=resnet50 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --adr.inference-src.tags=_branch.${{ github.event.pull_request.head.ref }},_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src.version=custom --adr.loadgen.version=custom ${{ matrix.loadgen-flag }}
4 changes: 2 additions & 2 deletions .github/workflows/test-submission-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install dependencies
run: |
python3 -m pip install cm4mlops
git clone https://github.com/mlcommons/inference_results_v4.0 --depth 1
git clone https://github.com/mlcommons/inference_results_v4.1 --depth 1
- name: Test MLPerf inference submission checker
run: |
cm run script --tags=run,mlperf,inference,submission,checker --adr.inference-src.tags=_branch.${{ github.event.pull_request.head.ref }},_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src.version=custom --input=`pwd`/inference_results_v4.0 --src_version=v4.0 --quiet
cm run script --tags=run,mlperf,inference,submission,checker --adr.inference-src.tags=_branch.${{ github.event.pull_request.head.ref }},_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src.version=custom --input=`pwd`/inference_results_v4.1 --src_version=v4.1 --extra_args=" --skip-extra-accuracy-files-check" --quiet
46 changes: 36 additions & 10 deletions loadgen/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.12)

project(mlperf_loadgen)

# Read the version file
file(READ "${CMAKE_SOURCE_DIR}/VERSION.txt" VERSION_CONTENTS)

# Extract the major and minor versions from the VERSION file (assuming "MAJOR.MINOR.PATCH" format)
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)" VERSION_MATCH ${VERSION_CONTENTS})
# Extract the major, minor, and patch versions from the VERSION file (assuming "MAJOR.MINOR.PATCH" format)
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" VERSION_MATCH ${VERSION_CONTENTS})

# Set the variables for the major and minor versions
# Set the variables for the major, minor, and patch versions
set(mlperf_loadgen_VERSION_MAJOR "${CMAKE_MATCH_1}")
set(mlperf_loadgen_VERSION_MINOR "${CMAKE_MATCH_2}")
set(mlperf_loadgen_VERSION_PATCH "${CMAKE_MATCH_3}")

message("mlperf_loadgen v${mlperf_loadgen_VERSION_MAJOR}.${mlperf_loadgen_VERSION_MINOR}")
# Check if the version format was parsed correctly
if(NOT mlperf_loadgen_VERSION_MAJOR OR NOT mlperf_loadgen_VERSION_MINOR OR NOT mlperf_loadgen_VERSION_PATCH)
message(FATAL_ERROR "Version format in VERSION.txt is incorrect. Expected format: MAJOR.MINOR.PATCH")
endif()

# Print out the version
message("mlperf_loadgen v${mlperf_loadgen_VERSION_MAJOR}.${mlperf_loadgen_VERSION_MINOR}.${mlperf_loadgen_VERSION_PATCH}")

# Set build options. NB: CXX_STANDARD is supported since CMake 3.1.
if (NOT MSVC)
Expand All @@ -38,6 +45,28 @@ message(STATUS "Using output path: ${LIBRARY_OUTPUT_PATH}")
find_package(PythonInterp)
message(STATUS "Using Python interpreter: ${PYTHON_EXECUTABLE}")

# Specify the source and destination files
set(CONF_FILE "mlperf.conf")
set(HEADER_FILE "mlperf_conf.h")

# Read the content of the configuration file
file(READ ${CONF_FILE} CONF_CONTENTS)

# Escape all double quotes and backslashes
string(REPLACE "\\" "\\\\" CONF_CONTENTS "${CONF_CONTENTS}")
string(REPLACE "\"" "\\\"" CONF_CONTENTS "${CONF_CONTENTS}")

# Handle new lines
string(REPLACE "\n" "\\n\"\n\"" CONF_CONTENTS "${CONF_CONTENTS}")

# Wrap the content in a C++ string declaration
set(FORMATTED_CONTENT "const char* mlperf_conf =\n\"${CONF_CONTENTS}\";\n")

# Write the formatted content to the header file
file(WRITE ${HEADER_FILE} "${FORMATTED_CONTENT}")

message(STATUS "Output config: ${CMAKE_BINARY_DIR}/mlperf_conf.h")

# Generate source file with version info.
execute_process(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/version_generator.py ${CMAKE_BINARY_DIR}/version_generated.cc ${CMAKE_CURRENT_SOURCE_DIR})

Expand All @@ -58,6 +87,8 @@ set(SOURCE
${CMAKE_CURRENT_SOURCE_DIR}/results.cc
${CMAKE_CURRENT_SOURCE_DIR}/version.cc
${CMAKE_CURRENT_SOURCE_DIR}/version.h
${CMAKE_CURRENT_SOURCE_DIR}/mlperf_conf.h
${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt
${CMAKE_BINARY_DIR}/version_generated.cc
)

Expand All @@ -80,8 +111,3 @@ install(TARGETS mlperf_loadgen
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION ${CMAKE_INSTALL_PREFIX}/include FILES_MATCHING PATTERN "*.h")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/mlperf.conf
DESTINATION ${CMAKE_INSTALL_PREFIX}/include)

# Define preprocessor macro with the path to mlperf.conf
add_definitions(-DMLPERF_CONF_PATH=\"${CMAKE_INSTALL_PREFIX}/include/mlperf.conf\")
1 change: 0 additions & 1 deletion loadgen/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
include mlperf.conf
include VERSION.txt
2 changes: 1 addition & 1 deletion loadgen/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.7
4.1.23
4 changes: 4 additions & 0 deletions loadgen/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import sys

# Aliasing mlcommons_loadgen as mlperf_loadgen
sys.modules['mlperf_loadgen'] = sys.modules[__name__]
57 changes: 37 additions & 20 deletions loadgen/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from pybind11 import get_include
from pybind11.setup_helpers import Pybind11Extension, build_ext
from version_generator import generate_loadgen_version_definitions
import subprocess

generated_version_source_filename = "generated/version_generated.cc"
generate_loadgen_version_definitions(generated_version_source_filename, ".")
Expand All @@ -41,7 +42,7 @@
"test_settings.h",
"issue_query_controller.h",
"early_stopping.h",
"query_dispatch_library.h",
"query_dispatch_library.h"
]

lib_headers = [
Expand All @@ -53,6 +54,7 @@
"results.h",
"bindings/c_api.h",
"version_generator.py",
"mlperf_conf.h"
]

lib_sources = [
Expand Down Expand Up @@ -82,38 +84,53 @@
"README.md").read_text(
encoding="utf-8")

config_file_path = Path(__file__).parent / "mlperf.conf"

with open("VERSION.txt", "r") as f:
version = f.read()
version_split = version.split(".")

if len(version_split) < 2:
print("Version is incomplete. Needs a format like 4.1 in VERSION file")
print("Version is incomplete. Needs a format like 4.1.1 in VERSION file")


try:
with open("mlperf.conf", 'r') as file:
conf_contents = file.read()

# Escape backslashes and double quotes
conf_contents = conf_contents.replace('\\', '\\\\').replace('"', '\\"')

# Convert newlines
conf_contents = conf_contents.replace('\n', '\\n"\n"')

formatted_content = f'const char* mlperf_conf =\n"{conf_contents}";\n'

with open("mlperf_conf.h", 'w') as header_file:
header_file.write(formatted_content)

except IOError as e:
raise RuntimeError(f"Failed to generate header file: {e}")

mlperf_loadgen_module = Pybind11Extension(
"mlperf_loadgen",
define_macros=[
("MAJOR_VERSION", version_split[0]),
("MINOR_VERSION", version_split[1]),
("MLPERF_CONF_PATH", f'"{config_file_path}"'),
("MAJOR_VERSION",
version_split[0]),
("MINOR_VERSION",
version_split[1])
],
include_dirs=[".", get_include()],
sources=mlperf_loadgen_sources,
depends=mlperf_loadgen_headers,
)

setup(
name="mlcommons_loadgen",
version=version,
description="MLPerf Inference LoadGen python bindings",
url="https://mlcommons.org/",
cmdclass={"build_ext": build_ext},
ext_modules=[mlperf_loadgen_module],
packages=[""],
package_data={"": ["mlperf.conf"]},
include_package_data=True,
long_description=mlperf_long_description,
long_description_content_type="text/markdown",
)
setup(name="mlcommons_loadgen",
version=version,
description="MLPerf Inference LoadGen python bindings",
url="https://mlcommons.org/",
cmdclass={"build_ext": build_ext},
ext_modules=[mlperf_loadgen_module],
packages=['mlcommons_loadgen'],
package_dir={'mlcommons_loadgen': '.'},
include_package_data=True,
long_description=mlperf_long_description,
long_description_content_type='text/markdown')
36 changes: 23 additions & 13 deletions loadgen/test_settings_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ limitations under the License.
#include <string>

#include "logging.h"
#include "mlperf_conf.h"
#include "utils.h"

namespace mlperf {
Expand Down Expand Up @@ -527,7 +528,7 @@ int TestSettings::FromConfig(const std::string &path, const std::string &model,
if (configCount == 0) {
// Only allow userConf as the single configFile and loadgen loads the
// mlperfConf automatically
FromConfig(MLPERF_CONF_PATH, model, scenario, true);
FromConfig("", model, scenario, true);
}

else {
Expand Down Expand Up @@ -579,24 +580,33 @@ int TestSettings::FromConfig(const std::string &path, const std::string &model,
return true;
};

// dirt simple config parser
std::ifstream fss(path);
std::string line;
int line_nr = 0;
int errors = 0;
if (!fss.is_open()) {
LogDetail([p = path](AsyncDetail &detail) {
// Declare the input stream before the if-else block
std::unique_ptr<std::istream> fss;
std::string line;

if (!is_mlperf_conf) {
// dirt simple config parser
fss = std::make_unique<std::ifstream>(path);
if (!static_cast<std::ifstream *>(fss.get())->is_open()) {
LogDetail([p = path](AsyncDetail &detail) {
#if USE_NEW_LOGGING_FORMAT
std::stringstream ss;
ss << "can't open file " << p;
MLPERF_LOG_ERROR(detail, "error_invalid_config", ss.str());
std::stringstream ss;
ss << "can't open file " << p;
MLPERF_LOG_ERROR(detail, "error_invalid_config", ss.str());
#else
detail.Error("can't open file ", p);
detail.Error("can't open file ", p);
#endif
});
return -ENOENT;
});
return -ENOENT;
}
} else {
// Convert unsigned char array to std::string
std::string config_str(mlperf_conf);
fss = std::make_unique<std::istringstream>(config_str);
}
while (std::getline(fss, line)) {
while (std::getline(*fss, line)) {
line_nr++;
std::istringstream iss(line);
std::string s, k;
Expand Down
23 changes: 13 additions & 10 deletions loadgen/version_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,14 @@ def func_def(name, string):
# any modifications.
def generate_loadgen_version_definitions_git(ofile, git_command):
git_rev = os.popen(git_command + "rev-parse --short=10 HEAD").read()
git_commit_date = os.popen(git_command + 'log --format="%cI" -n 1').read()
git_commit_date = os.popen(
git_command +
"log --format=\"%cI\" -n 1").read()
git_status = os.popen(git_command + "status -s -uno .").read()
git_log = subprocess.Popen(
git_command + "log --pretty=oneline -n 16 --no-decorate",
stdout=subprocess.PIPE,
shell=True,
encoding="ascii",
errors="ignore",
).stdout.read()
ofile.write(func_def("GitRevision", '"' + git_rev[0:-1] + '"'))
ofile.write(func_def("GitCommitDate", '"' + git_commit_date[0:-1] + '"'))
git_command + "log --pretty=oneline -n 16 --no-decorate", stdout=subprocess.PIPE, shell=True, encoding='ascii', errors="ignore").stdout.read()
ofile.write(func_def("GitRevision", "\"" + git_rev[0:-1] + "\""))
ofile.write(func_def("GitCommitDate", "\"" + git_commit_date[0:-1] + "\""))
ofile.write(func_def("GitStatus", make_raw_string(git_status[0:-1])))
ofile.write(func_def("GitLog", make_raw_string(git_log[0:-1])))

Expand Down Expand Up @@ -105,7 +102,13 @@ def generate_loadgen_version_definitions(cc_filename, loadgen_root):
ofile.write("// DO NOT EDIT: Autogenerated by version_generator.py.\n\n")
ofile.write("#include <string>\n\n")
ofile.write("namespace mlperf {\n\n")
ofile.write(func_def("Version", '"4.1"'))
# Open and read the VERSION.txt file
with open(os.path.join(loadgen_root, "VERSION.txt"), "r") as version_file:
# Read and strip any extra whitespace/newlines
version_contents = version_file.read().strip()

# 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()
Expand Down
Loading
Loading