-
Notifications
You must be signed in to change notification settings - Fork 6
✨ add support for split utility #380
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
base: main
Are you sure you want to change the base?
Conversation
6497dbd to
2179d3a
Compare
| @pytest.fixture(scope="session") | ||
| def split_model_id() -> str: | ||
| """Identifier of the Financial Document model, supplied through an env var.""" | ||
| return os.getenv("MINDEE_V2_SPLIT_UTILITY_MODEL_ID") |
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.
| return os.getenv("MINDEE_V2_SPLIT_UTILITY_MODEL_ID") | |
| return os.getenv("MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID") |
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.
new
enqueue
get_result
enqueue_and_get_result
Remove any notion of slug
deprecated, no changes
enqueue_inference ==> calls enqueue
get_inference ==> calls get_result
enqueue_and_get_inference ==> calls enqueue_and_get_result
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.
separate class for each product
add POST slug
| def _set_inference_params( | ||
| self, data: Dict[str, Union[str, List[str]]], params: InferenceParameters | ||
| ) -> None: | ||
| """ | ||
| Sets the inference-specific parameters. | ||
|
|
||
| :param data: Data dict to fill. | ||
| :param params: Parameters to add. | ||
| """ | ||
| if params.rag is not None: | ||
| data["rag"] = str(params.rag).lower() | ||
| if params.raw_text is not None: | ||
| data["raw_text"] = str(params.raw_text).lower() | ||
| if params.confidence is not None: | ||
| data["confidence"] = str(params.confidence).lower() | ||
| if params.polygon is not None: | ||
| data["polygon"] = str(params.polygon).lower() | ||
| if params.text_context and len(params.text_context): | ||
| data["text_context"] = params.text_context | ||
| if params.data_schema is not None: | ||
| data["data_schema"] = str(params.data_schema) |
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.
put in parameters class
| _slug: str = "inferences" | ||
| """Slug of the inference.""" |
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.
move slug to response classes
Description
Types of changes