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

added a jax example #11

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

added a jax example #11

wants to merge 3 commits into from

Conversation

tanayvarshney
Copy link
Collaborator

No description provided.

{
name: "fc_out"
data_type: TYPE_FP32
dims: [-1, -1]
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't seem right. Shouldn't it be dims: [1000]?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It [-1,1000] if I remember it correctly. I can re-run and check

```
class TritonPythonModel:
def initialize(self, args):
...
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add some explanation of what you are putting in the config.pbtxt file? Mainly the input/output names and how they have to correspond to what's in the execute method

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We have this info in other places, I am trying to avoid replication of information, but I see why it is needed. We should discuss more about this. We are bound to run into this issue later down the line

inp = pb_utils.get_input_tensor_by_name(request, "image")
input_image = inp.as_numpy()

params = self.resnet18.init(self.key, input_image)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm surprised by this init call here. I'm not overly familiar with how Flax or the Flaxmodels library structure things, but why do we call init here instead of in the initialize method. What does it actually do? Is it about needing to know the shape of the input image?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, good catch, I missed this.

@dyastremsky
Copy link
Contributor

Pinging @tanayvarshney as a reminder, in case this is still in progress.

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