-
Notifications
You must be signed in to change notification settings - Fork 7
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
[REVIEW] Support dict output for models #98
[REVIEW] Support dict output for models #98
Conversation
Signed-off-by: Vibhu Jawa <[email protected]>
/okay to test |
1 similar comment
/okay to test |
/okay to test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conceptually makes sense, happy to approve since it's critical functionality tho would recommend
- adding more checks / documentation (about behavior / expectation of dict)
- type hint / docstring in
get_model_output(..)
- deciding signature between model_output_col / model_output_cols (deprecating one of them)
- documenting behaviour of meta and expectation of dtypes when dict (same as point 1)
Signed-off-by: Vibhu Jawa <[email protected]>
Signed-off-by: Vibhu Jawa <[email protected]>
Done. Please take another look. Thanks |
Signed-off-by: Vibhu Jawa <[email protected]>
crossfit/backend/torch/model.py
Outdated
self, | ||
path_or_name: str, | ||
max_mem_gb: int = 16, | ||
model_output_type: Any = ModelOutputType.NUMERIC, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, but the output_type isn't Any
right? It's Union[ModelOutputType, Dict[str, ModelOutputType]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Signed-off-by: Vibhu Jawa <[email protected]>
Signed-off-by: Vibhu Jawa <[email protected]>
/okay to test |
This PR adds support for models that give dictionary output.
Other changes include:
Main takeaway is support below model: