sbx icon indicating copy to clipboard operation
sbx copied to clipboard

[Question] Integrate something like jaxtyping for more specific type annotations and runtime type-checking

Open dantp-ai opened this issue 1 year ago • 10 comments

Question

Are there any plans on the roadmap to use something like jaxtyping for more specific type annotations and runtime type checking?

Additional context

Checklist

  • [x] I have read the documentation (required)
  • [x] I have checked that there is no similar issue in the repo (required)

dantp-ai avatar Dec 14 '24 09:12 dantp-ai

Hello, there is currently no plan for it. Would you volunteer for such feature?

araffin avatar Dec 14 '24 11:12 araffin

I can look into it. I'll start first with the tests folder.

dantp-ai avatar Dec 15 '24 13:12 dantp-ai

Hey, I was actually considering opening an issue to explore adding jaxtyping support as well. It sounds like we're aligned in our interests, and If you like, I’d love to collaborate with you on this!

I can look into it. I'll start first with the tests folder.

sandeshkatakam avatar Dec 29 '24 06:12 sandeshkatakam

@sandeshkatakam I'd be glad to collaborate. How should we do it best?

One idea would be that, I open a feature branch on my fork. You'll need to add my fork as a remote and check out the same branch. Once this is done, we can sync frequently and decided who works on specific parts to avoid conflicts. What do you think?

dantp-ai avatar Dec 29 '24 13:12 dantp-ai

@sandeshkatakam I'd be glad to collaborate. How should we do it best?

One idea would be that, I open a feature branch on my fork. You'll need to add my fork as a remote and check out the same branch. Once this is done, we can sync frequently and decided who works on specific parts to avoid conflicts. What do you think?

Yeah this seems great! I will add your fork as remote and push commits to the branch, after we decide on dividing the specific parts of the work. Thank you :)

sandeshkatakam avatar Dec 29 '24 17:12 sandeshkatakam

before you do too much work, please open a PR as soon as you have a proof of concept, so we can agree on the details

araffin avatar Dec 29 '24 18:12 araffin

@sandeshkatakam I'd be glad to collaborate. How should we do it best?

One idea would be that, I open a feature branch on my fork. You'll need to add my fork as a remote and check out the same branch. Once this is done, we can sync frequently and decided who works on specific parts to avoid conflicts. What do you think?

Let me know once you fork the repo and create a branch

sandeshkatakam avatar Dec 30 '24 06:12 sandeshkatakam

@sandeshkatakam I'll open the PR at the latest on Thu.

dantp-ai avatar Dec 31 '24 12:12 dantp-ai

@sandeshkatakam I'll open the PR at the latest on Thu.

hey did you open the PR??

sandeshkatakam avatar Jan 03 '25 07:01 sandeshkatakam

@sandeshkatakam I looked in a bit more detail how to use jaxtyping in the project. It can be paired with mypy for static analysis and additionally using e.g. beartype for runtime checks in critical sections (and avoid these runtime checks in performance-critical paths).

I'm blocked this week with some other stuff. Feel free to open a PR (from your fork) if you want to dive in already.

dantp-ai avatar Jan 07 '25 17:01 dantp-ai