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

[ML] Apply code checks/format #46984

Merged
merged 1 commit into from
Dec 19, 2024
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
6 changes: 3 additions & 3 deletions PhysicsTools/TensorFlowAOT/src/Batching.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace tfaot {
BatchRule::BatchRule(const std::string& ruleString) {
// extract the target batch size from the front
std::string rule = ruleString;
auto pos = rule.find(":");
auto pos = rule.find(':');
if (pos == std::string::npos) {
throw cms::Exception("InvalidBatchRule") << "invalid batch rule format: " << ruleString;
}
Expand All @@ -32,7 +32,7 @@ namespace tfaot {
std::vector<size_t> sizes;
size_t sumSizes = 0;
while (!rule.empty()) {
pos = rule.find(",");
pos = rule.find(',');
sizes.push_back(std::stoi(rule.substr(0, pos)));
sumSizes += sizes.back();
rule = pos == std::string::npos ? "" : rule.substr(pos + 1);
Expand All @@ -53,7 +53,7 @@ namespace tfaot {

void BatchRule::validate() const {
// sizes must not be empty
if (sizes_.size() == 0) {
if (sizes_.empty()) {
throw cms::Exception("EmptySizes") << "no batch sizes provided for stitching";
}

Expand Down