refactor!: clarify kw/positional parameters#578
Conversation
…g` take a positional-only parameter.
…onal-only argument.
…l only argument.
…sitional only and the rest named-only in my opinion.
|
I agree with all of these changes. Need changelog entry explaining how to make the change. @claude Could you please check that no parameter, similar to those that were changed, was forgotten? |
This comment was marked as resolved.
This comment was marked as resolved.
…eatures positional only and the rest named only). Note that for `tensors` it makes little sense to use named now, before we had `losses` and then why not.
… only positional and named parameter, everything before that positional and after named.
…tional only but this is fine IMO.
|
The autojac ones are probably more debatable, I took the minimal decision here but we could make it stricter in some cases. I think that as long as a parameter is called EDIT: Not sure what happened in my |
|
@claude what do you think of the changes on the public interface of the |
|
Claude finished @PierreQuinton's task in 53s —— View job Review of autojac interface changes (last 4 commits)
The 4 commits apply a "minimal" positional/named-only separation to What works wellThe split between the three groups is logically motivated:
The debatable middle group — per function
Same reasoning.
Overall verdictThe minimal separation is a safe, non-breaking step in the right direction and the named-only treatment of booleans/chunk-sizes is unambiguously correct. The middle group decisions are all defensible, though the stricter version (moving |
That's the version I prefer I think. More positional-only parameters (like inputs and jac_outputs) would be less readable IMO. More keyword-only parameters (like inputs and jac_outputs) would be annoying in some cases I guess. Like when you just want IMO, we have several ways to use the autojac functions. The simplest one is with only Arguably, we could have I would favor keeping things as you did, i.e. not very strict. |
|
I would go for strict versions for all except
|
|
About jac_to_grad: I think it's good to have the aggregator pos-and-kw. Because we either want to do: aggregator = UPGrad()
...
jac_to_grad(params, aggregator)or jac_to_grad(params, aggregator=UPGrad()) |
|
I think we agree on everything and the line is thin, my preference is small. Let's take time until tomorrow to think this through and decide then. |
|
Yeah so let's have |
|
Btw i'm not sure what kind of conventional commit this should be. As far as I understand, style is mostly for minor style changes in the code or docs. @claude what's supposed to be the conventional commit here? |
|
Claude finished @ValerianRey's task in 27s —— View job
Conventional commit type for this PR
The more appropriate types:
Given that the discussion explicitly mentions "we want to break it as much as we could ever desire in this release," I'd go with: The |
…runing the tests, most call to `mtl_backward` use key-word for `feature` while we would want to make it positional. So I think I now vouch for both for this one.
…optional and should therefore be kw+pos
|
I think this is probably as good as we can get. |
No description provided.