| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: Implement retry-after mechanism for model apis and udfs (#5769) ## Changes Made Adds a RetryAfterException that can be raised from a UDF, which will supply the UDF retry mechanism with a delay to sleep. This allows us to respect the retry-afters provided in headers from 429 and 503 errors from clients, such as our openai and google clients in the model apis. By default, all of our model apis should already be configured with max_retries = 3, and our exponential backoff has an initial delay of 100ms. It might be worth exploring in the future how we may want to more easily expose these configurations to users. ## Related Issues <!-- Link to related GitHub issues, e.g., "Closes #123" --> | 10 个月前 | |
fix: Supporting fractional gpu count on class udf (#5840) ## Changes Made <!-- Describe what changes were made and why. Include implementation details if necessary. --> Supporting fractional gpu count in class udf. def cls( class_: type | None = None, *, gpus: float = 0.0, use_process: bool | None = None, max_concurrency: int | None = None, max_retries: int | None = None, on_error: Literal["raise", "log", "ignore"] | None = None, ) -> type | Callable[[type], type]: before this, the datatype of gpus in @daft.cls was int, but the underlying rust implementation was float. The declarations on the python side and the rust side are inconsistent. And for small models, we should support fine-grained resource Settings, such as 0.5 gpu. Declarations of the float type make it clearer and accurate. ## Related Issues <!-- Link to related GitHub issues, e.g., "Closes #123" --> https://github.com/Eventual-Inc/Daft/issues/5837 --------- Co-authored-by: cancai <caican@xiaomi.com> Co-authored-by: Colin Ho <chiuhong@usc.edu> | 9 个月前 | |
feat: @daft.cls decorator for new class UDFs (#5350) ## Changes Made Add the @daft.cls and @daft.method decorators for constructing a Daft class. Some additional changes: - Did a bit of refactoring on the Python side because I did not want to have to implement a whole matrix of UDFs (func vs class, row-wise vs async vs generator). Ended up combining all the function variants into a Func class and the code is decently clean. - Looks like we added use_process in #5323 but I don't think it was actually hooked up to use processes under the hood. My changes in this PR should fix that - Restructured the class-type decorators since overriding __new__ seems to make type checkers unhappy. Resolves #5284 I initially implemented a @daft.setup that users would use in lieu of having an __init__ method, but after writing several examples with it, it just felt like a very obtuse way to introduce this whole new thing just to tell users that initialization is lazy. We'd have to explain that the arguments in the constructor are passed into the setup method, and that you have to add this decorator. We had some discussion about this in the working session and I don't think others thought a lazy init would be an issue anyway. ## Related Issues <!-- Link to related GitHub issues, e.g., "Closes #123" --> ## Checklist - [x] Documented in API Docs (if applicable) - [x] Documented in User Guide (if applicable) - [x] If adding a new documentation page, doc is added to docs/mkdocs.yml navigation - [x] Documentation builds and is formatted properly | 1 年前 | |
feat: Implement retry-after mechanism for model apis and udfs (#5769) ## Changes Made Adds a RetryAfterException that can be raised from a UDF, which will supply the UDF retry mechanism with a delay to sleep. This allows us to respect the retry-afters provided in headers from 429 and 503 errors from clients, such as our openai and google clients in the model apis. By default, all of our model apis should already be configured with max_retries = 3, and our exponential backoff has an initial delay of 100ms. It might be worth exploring in the future how we may want to more easily expose these configurations to users. ## Related Issues <!-- Link to related GitHub issues, e.g., "Closes #123" --> | 10 个月前 | |
chore: bump mypy and ruff in pre-commit (#5836) ## Changes Made Bump mypy to 1.19.1 and ruff to 0.14.10 and resolve pre-commit errors. Rationale: my local ruff version is much higher than that in the project pre-commit, so I am getting a lot of linter warnings in my IDE. It is also about time to upgrade lints to utilize newer Python language features. ## Related Issues <!-- Link to related GitHub issues, e.g., "Closes #123" --> | 9 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 10 个月前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 9 个月前 |