Skip to content

Particlenet support for ragged batching - #9

Open
nirmalthomas2609 wants to merge 23 commits into
kpedro88:TritonRaggedBatchingfrom
nirmalthomas2609:dev/particlenet-ragged
Open

Particlenet support for ragged batching#9
nirmalthomas2609 wants to merge 23 commits into
kpedro88:TritonRaggedBatchingfrom
nirmalthomas2609:dev/particlenet-ragged

Conversation

@nirmalthomas2609

@nirmalthomas2609 nirmalthomas2609 commented May 29, 2022

Copy link
Copy Markdown

Particlenet:

Comment on lines +147 to +153
if (igroup < numParticleGroups_) {
entry_target = std::clamp(static_cast<unsigned int>(((*tag_infos)[jet_n]).features().get("pfcand_etarel").size()), minPartFromJSON, maxPartFromJSON);
if (toSkipInference && ((*tag_infos)[jet_n]).features().get("pfcand_etarel").size() > 0) toSkipInference = false;
} else {
entry_target = std::clamp(static_cast<unsigned int>(((*tag_infos)[jet_n]).features().get("sv_etarel").size()), minVertFromJSON, maxVertFromJSON);
if (toSkipInference && ((*tag_infos)[jet_n]).features().get("sv_etarel").size() > 0) toSkipInference = false;
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could reduce duplication here:

std::string entry_feature = (igroup < numParticleGroups_) ? "pfcand_etarel" : "sv_etarel";
entry_target = std::clamp(static_cast<unsigned int>(((*tag_infos)[jet_n]).features().get(entry_feature).size()), minPartFromJSON, maxPartFromJSON);
if (toSkipInference && ((*tag_infos)[jet_n]).features().get(entry_feature).size() > 0) toSkipInference = false;

although actually I'm not sure I entirely understand the logic: this block is inside if (igroup == 0) and constexpr static unsigned numParticleGroups_ = 3;, so isn't the else here impossible?

@nirmalthomas2609 nirmalthomas2609 May 31, 2022

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll look into this.
I'll have to make some changes here (it says can't set batch_size to 0 when ragged batching is enabled for the other event file).

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it says can't set batch_size to 0 when ragged batching is enabled

This is most likely a flaw in my implementation of the interface. I'll try to correct it soon.

@kpedro88

Copy link
Copy Markdown
Owner

can you update the PR description with the link to the corresponding model repository that has the ragged models?

@nirmalthomas2609

Copy link
Copy Markdown
Author

Added Model repository link to the PR.

@nirmalthomas2609
nirmalthomas2609 marked this pull request as draft June 7, 2022 07:10
@nirmalthomas2609
nirmalthomas2609 deleted the dev/particlenet-ragged branch June 7, 2022 07:54
@nirmalthomas2609
nirmalthomas2609 marked this pull request as ready for review June 7, 2022 07:59
kpedro88 pushed a commit that referenced this pull request May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants