-
Notifications
You must be signed in to change notification settings - Fork 8
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
get parameter names in fims output #676
base: dev
Are you sure you want to change the base?
Conversation
* issue [feature:] do we need a get_parameter_names function? #666 * add example to fims demo
Instructions for code reviewerHello reviewer, thanks for taking the time to review this PR!
Checklist
|
Before I review this, is there a way to assign the new names into |
@Cole-Monnahan-NOAA I worry about altering the obj or opt inside of @Andrea-Havron-NOAA the PR is currently failing on all three operating systems because of an issue with the length of either |
@kellijohnson-NOAA I think we should expect that advanced users will still use I'm not suggesting |
Thanks @Cole-Monnahan-NOAA for the thoughts. After thinking about this some, I think you are right 👍 . Putting the names in obj will not cause anything to break if those names are not available so we should just do it. @Andrea-Havron-NOAA what do you think? |
@kellijohnson-NOAA, it's likely the names vector isn't being cleared properly. Every time a test is run, the vector gets larger. I'll look into this. Follow-up: I just pushed up code that clears the parameter names. Checks are all passing now except for the Mac-OS test that's failing on dev. |
I agree. The code only modifies the names of the obj components. it doesn't add anything new. |
I haven't tested this idea so we should do that before committing to it. Specifically the names attributes are stored in different locations so we'd want to make sure we get it right. |
What if we use default names in the Rcpp objects, but allow the user to
override them? For instance, given a logistic selectivity module, with id
1, the inflection_point name could be
"logistic_selectivity_1.inflection_point".d This code could easily be set
in the object constructors and held in a container in information that
points to the string name in the Rcpp object. If the name changes, the
changes will be reflected in information. I think this could be a good way
to extend what's already been developed and provides a reasonable way
forward on bookkeeping the parameter names.
…On Thu, Oct 17, 2024 at 12:23 PM Cole Monnahan ***@***.***> wrote:
I haven't tested this idea so we should do that before committing to it.
Specifically the names attributes are stored in different locations so we'd
want to make sure we get it right.
—
Reply to this email directly, view it on GitHub
<#676 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABFUSEAM3TJWIEDQUKPL3DLZ37QBJAVCNFSM6AAAAABPZUKPUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJZHE4DMOBUG4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Matthew Supernaw
Mathematical Statistician
*National Oceanic and Atmospheric Administration*
*Office Of Science and Technology*
*NOAA Fisheries | *U.S. Department of Commerce
Phone 248 - 396 - 7797
|
I think this warrants the discussion of whether or not we want users to override the default names. There is the case that we are hoping to use FIMS to enforce a more standardized naming convention on parameter names. Also with helper functions, users will not need to set names in the Rcpp interface. I am open to arguments for overriding default parameter names though! |
I think better code would acquire the names from the C++ objects instead of setting them manually, similar to what REPORT does in TMB. I just haven't figured out how to implement this yet. |
*..., similar to what REPORT does in TMB. I just haven't figured out how to
implement this yet.*
#define STRINGIFY(x) #x
…On Thu, Oct 17, 2024 at 2:50 PM Andrea-Havron-NOAA ***@***.***> wrote:
I haven't tested this idea so we should do that before committing to it.
Specifically the names attributes are stored in different locations so we'd
want to make sure we get it right.
I think better code would acquire the names from the C++ objects instead
of setting them manually, similar to what REPORT does in TMB. I just
haven't figured out how to implement this yet.
—
Reply to this email directly, view it on GitHub
<#676 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABFUSEAHO47CYXEQFAUJOS3Z4ABGPAVCNFSM6AAAAABPZUKPUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRQGI4TEOJZGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Matthew Supernaw
Mathematical Statistician
*National Oceanic and Atmospheric Administration*
*Office Of Science and Technology*
*NOAA Fisheries | *U.S. Department of Commerce
Phone 248 - 396 - 7797
|
Happy to have the discussion, but my perspective is that wherever we store the parameter names, I would strongly recommend against making it easy for users overriding them. If users want to use different parameter names in tables or figures, they can apply some translation prior to creating those things. But if it happens too close to the core of FIMS it will surely break our standardized output processing tools.
|
c1db369
to
87d9c31
Compare
What is the feature?
How have you implemented the solution?
Does the PR impact any other area of the project, maybe another repo?