Skip to content
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

Deprecated r4ss function causing errors #190

Closed
MOshima-PIFSC opened this issue Mar 28, 2024 · 8 comments
Closed

Deprecated r4ss function causing errors #190

MOshima-PIFSC opened this issue Mar 28, 2024 · 8 comments
Assignees

Comments

@MOshima-PIFSC
Copy link
Collaborator

run_ss_model(

I was trying to run the develop_OMs() function but got an error that said "data.ss_new was not created during the model run...". When I looked into the code I noticed that the function is still calling the deprecated r4ss function run_ss_model() instead of run(). When I use run(dir = file.path(run_SSMSE_dir, "OM_SR_BH_steep_1"), extras = "-maxfn 0 -phase 50 -nohess") it runs without giving an error. I believe this should be a pretty simple fix to update the function and arguments to run SS.
Thanks!

@MOshima-PIFSC MOshima-PIFSC added the bug Something isn't working label Mar 28, 2024
@k-doering-NOAA k-doering-NOAA self-assigned this Mar 28, 2024
@k-doering-NOAA
Copy link
Collaborator

Thanks @MOshima-PIFSC, I did a quick search of the codebase and there are a lot of calls to run_ss_model().

I'm not sure immediately if SSMSE should accommodate both run_ss_model() and run(), but I will add this issue to my to-do list and either 1) allow for both names or 2) restrict the version of r4ss that must be used and only allow run().

I plan on working on this tomorrow, but let me know if you have something time critical!

@kellijohnson-NOAA
Copy link
Collaborator

Just to be clear, I do not think that SSmse is referencing the deprecated r4ss function r4ss::run_SS_models(), which is now r4ss::run(). Instead, it is referencing the internal function SSmse::run_ss_model(), which might need some changes given the changes to file names with respect to the data file and also the renaming of the .par file.

@k-doering-NOAA
Copy link
Collaborator

related to #140

@k-doering-NOAA
Copy link
Collaborator

Thanks @kellijohnson-NOAA - you are right that this SSMSE function (copied from ss3sim) is what is being called. This predated the run() function in r4ss, although it may make sense to use it now.

@MOshima-PIFSC, just to check, you using SS3.30.18 to run SSMSE? That is the default wrapped into SSMSE. If your model files have been run previously with a newer version of SS3, it's possible that could also cause issues.

@MOshima-PIFSC
Copy link
Collaborator Author

Ah @kellijohnson-NOAA I see that you're right, its using the SSMSE function, my bad. And @k-doering-NOAA I didn't specify the ss version to use but I believe it's using 3.30.21 (that's what is in the directory with my files and what's printed at the top of the report file).

@k-doering-NOAA
Copy link
Collaborator

@MOshima-PIFSC could you try re-running your OM and EM files with SS3.30.18 and then putting it into SSMSE? SSMSE should run 3.30.18 by default in the simulations (you should see a message telling you which version of SSMSE is being used when you call library(SSMSE))

Like Kelli mentioned, there have been some file name changes that SSMSE hasn't been modified to accommodate. Instead, we recommend sticking with 3.30.18, if possible. Let me know if there is a reason a newer version of SS3 is needed.

If you are still having the issue, could you post or email me your example so I can try to reproduce the problem?

@MOshima-PIFSC
Copy link
Collaborator Author

@k-doering-NOAA, I re-ran the OM using ss 3.30.18 and then tried develop_OMs() again and it worked. I was using ss3.30.21 because I have weight comp data in the model and 3.30.21 allows for estimating a DM weighting parameter for size comp as well. So after adjusting the model to remove that, everything works. Thanks for the help!

@k-doering-NOAA
Copy link
Collaborator

@MOshima-PIFSC thanks for confirming!

I'm closing this out for now, but please reopen if the DM weighting removal is a deal-breaker and getting SSMSE working with a newer version of SS3 is necessary. Thanks!

@k-doering-NOAA k-doering-NOAA removed bug Something isn't working status: in progress labels Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants