pfmc-assessments / VASTWestCoast

VAST for the NWFSC West Coast data
Other
5 stars 1 forks source link

VAST_diagnotics() #8

Closed chantelwetzel-noaa closed 5 years ago

chantelwetzel-noaa commented 5 years ago

I have encountered two issues when trying to run the VAST_diagnostics function. The first is that it is not able to find the Opt$diagnostics object in order to write out the convergence gradient text file. The error states:

Error in which(sapply(t, is.factor)) : argument to 'which' is not logical Error in dev.off() : cannot shut down device 1 (the null device)

The second issue occurs during the final plotting where the FishStatsUtils::plot_data function is not found. Loading the library prior to calling this line in the code corrects the issue.

James-Thorson commented 5 years ago

Please re-install TMBhelper package for the first one. Second, maybe just try reinstalling FishStatsUtils

chantelwetzel-noaa commented 5 years ago

Installed both of these items fresh yesterday. Kelli and I encountered a similar problem problem yesterday with the TMBhelper package. I think she has a plan to deal with the TMBhelper issue, but we need to also address the FishStatsUtils package in this function.

On Thu, Feb 28, 2019 at 10:18 AM Jim Thorson notifications@github.com wrote:

Please re-install TMBhelper package for the first one. Second, maybe just try reinstalling FishStatsUtils

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nwfsc-assess/VASTWestCoast/issues/8#issuecomment-468379762, or mute the thread https://github.com/notifications/unsubscribe-auth/AF4tzpP0ib2gA02hSA72hsXiL-K99wD2ks5vSB1dgaJpZM4bXbom .

--

Chantel Wetzel, PhD Fishery Resource Analysis and Monitoring Division Northwest Fisheries Science Center National Marine Fisheries Service National Oceanic and Atmospheric Administration 2725 Montlake Blvd E https://maps.google.com/?q=2725+Montlake+Blvd+E+Seattle,+WA+98112&entry=gmail&source=g Seattle, WA 98112 https://maps.google.com/?q=2725+Montlake+Blvd+E+Seattle,+WA+98112&entry=gmail&source=g Phone: 206- <(206)%20302-2414>302- <(206)%20302-2414>1753

James-Thorson commented 5 years ago

IMO best solution is for Kelly to add VAST to DEPENDS of the NWFSC package, which should then load FishStatsUtils automatically

kellijohnson-NOAA commented 5 years ago

@James-Thorson both VAST and FishStatsUtils are in the "Imports". What would be the benefit of moving to "Depends" for those packages?

James-Thorson commented 5 years ago

DEPENDS loads VAST namespace into your current session. When Chantel runs VASTWestCoast, she's getting errors because VAST assumes that FishStatsUtils has been loaded in this way.

kellijohnson-NOAA commented 5 years ago

@CWetzel did this go away? MH is getting the same error and I am wondering if I didn't fix it or if she needs to update packages?

James-Thorson commented 5 years ago

I don't know of course but before I forget: I recommend having your package install a specific release number of FishStatsUtils and VAST, eg 1.0.0 and 2.0.1 respectively for what was up to date as of a month ago. I continue merging developments into master branch of each, and sometimes these can require small changes to syntax, so numbered dependencies are more stable for dependent packages.

On Tue, Mar 5, 2019, 4:07 PM Kelli Johnson notifications@github.com wrote:

@CWetzel https://github.com/CWetzel did this go away? MH is getting the same error and I am wondering if I didn't fix it or if she needs to update packages?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nwfsc-assess/VASTWestCoast/issues/8#issuecomment-469910908, or mute the thread https://github.com/notifications/unsubscribe-auth/AHnqTRiFbmRaB0G7dK7v4TWgLcRM8Uygks5vTwbBgaJpZM4bXbom .

chantelwetzel-noaa commented 5 years ago

I overcame these issues by running the diagnostics function by hand and calling each library when I encountered the error and was able to get a full run with diagnostics. Hence, I have not tried with the corrections to the NAMESPACE file. Sorry I cannot give you an answer right now. However, I could test it out later this week when doing the triennial VAST run and get back to you.

On Tue, Mar 5, 2019 at 4:07 PM Kelli Johnson notifications@github.com wrote:

@CWetzel https://github.com/CWetzel did this go away? MH is getting the same error and I am wondering if I didn't fix it or if she needs to update packages?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nwfsc-assess/VASTWestCoast/issues/8#issuecomment-469910908, or mute the thread https://github.com/notifications/unsubscribe-auth/AF4tzsgQrV0QrLkowoZ5HWivDq4x7PE8ks5vTwbBgaJpZM4bXbom .

--

Chantel Wetzel, PhD Fishery Resource Analysis and Monitoring Division Northwest Fisheries Science Center National Marine Fisheries Service National Oceanic and Atmospheric Administration 2725 Montlake Blvd E https://maps.google.com/?q=2725+Montlake+Blvd+E+Seattle,+WA+98112&entry=gmail&source=g Seattle, WA 98112 https://maps.google.com/?q=2725+Montlake+Blvd+E+Seattle,+WA+98112&entry=gmail&source=g Phone: 206- <(206)%20302-2414>302- <(206)%20302-2414>1753

kellijohnson-NOAA commented 5 years ago

I know that I fixed the dev.off error with a22c540e644f92fe034113294544f0357b0e5307. I am not certain that the function will work with all model configurations, but it does appear to be working for the current sablefish model. I am leaving this closed and will work with new error messages as they come up. Thank you @CWetzel for initially reporting this and @James-Thorson for your helpful suggestions.