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

Particlenet support for ragged batching #9

Open
wants to merge 23 commits into
base: TritonRaggedBatching
Choose a base branch
from

Conversation

nirmalthomas2609
Copy link

@nirmalthomas2609 nirmalthomas2609 commented May 29, 2022

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
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?

Copy link
Author

@nirmalthomas2609 nirmalthomas2609 May 31, 2022

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
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
Owner

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

@nirmalthomas2609
Copy link
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
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