Parameters linking issues
See original GitHub issueGammapy version 1.0
Bug description
The current way of linking parameters (par1 = par2
) works only if par2.name
is contained in the default_parameters.names
list of the model to which par1
belongs. This generates several issues.
For example, I think this should not fail:
On the other hand, this should fail (since the linked parameters don’t have the same units):
Fixing this second issue is quite easy:
Instead for the first example it’s much more tricky. Perhaps something like a LinkedParameter
class is needed
Issue Analytics
- State:
- Created 9 months ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Configuring issue linking | Administering Jira applications ...
You can link Jira issues with each other to create associations. These Jira issues can be on the same Jira installation or another...
Read more >open Issues via direct HTML links with parameters - GitLab
Link issues together to show that they're related or that one is blocking others. Learn more. Activity. Sort or filter.
Read more >An SEO Guide to URL Parameter Handling
URL parameters create duplicate content, waste crawl budget, and dilute ranking signals. Learn six ways to avoid potential SEO issues with ...
Read more >Common Challenges with Email Links and Tracking Parameters
Another challenge around link tracking for emails is consistency across teams. Because the parameters are often case sensitive, even small ...
Read more >Create new issue URLs - Linear Guide
The following links trigger the creation of a new Linear issue in any browser and you can add query parameters after any of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
OK thanks, we can indeed explore this kind of possibilities.
An alternative solution, that does not require re-thinking too much of the current modeling architecture, is based on a new
LinkedParameter
class that:model.default_parameters.names
listAs a big bonus, such class can easily be generalized to also accept an
operator
argument to perform arithmetic operation between parameters, which I think is a nice feature that we don’t currently support. In this case the identity would be just a special case, one could do complex links such asindex2 = index1 + 1
orE_break = constant / B**2
. Here is an example of this: https://github.com/luca-giunti/share/blob/master/LinkedParameter_Generalized.ipynb@luca-giunti I didn’t mean it as “this should already work” but as the proposed API for how it should work.