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

Inference callback #70

Merged
merged 8 commits into from
Aug 29, 2023
Merged

Inference callback #70

merged 8 commits into from
Aug 29, 2023

Conversation

rhendz
Copy link
Contributor

@rhendz rhendz commented Aug 27, 2023

No description provided.

@rhendz rhendz requested a review from djstein August 27, 2023 20:00
@@ -182,6 +181,15 @@ class Inference:
def __init__(self, spice) -> None:
self.spice = spice
self.device = self.spice.get_device()
self.pipe = None
self.inference_job_id = None
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to insure that this is cleared out on error and completed states. the Inference class is typically NOT recreated

Suggested change
self.inference_job_id = None
self.inference_job_id = None

Copy link
Contributor

Choose a reason for hiding this comment

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

it is typically better to pass this type of variable that is not used on class instantiate to the function call itself.

callback_for_stable_diffision should probably take this as an input instead of setting it on the class

Copy link
Contributor Author

Choose a reason for hiding this comment

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

unfortunately, the callback cannot take inference_job_id as an input since the method signature is fixed. if you are concerned that the inference class can have multiple inference job id's associated with it, I can create a new InferenceTask class that deals with inference jobs one at a time.

Copy link
Contributor

@djstein djstein left a comment

Choose a reason for hiding this comment

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

review feedback

@djstein djstein merged commit f9d5d95 into main Aug 29, 2023
@djstein djstein deleted the inference-callback branch August 29, 2023 18:28
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.

2 participants