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

Do not evaluate failing mlr3::lrn chunk (#1111 hotfix) #1117

Merged
merged 18 commits into from
Sep 25, 2024

Conversation

Robinlovelace
Copy link
Collaborator

No description provided.

@Robinlovelace Robinlovelace linked an issue Sep 24, 2024 that may be closed by this pull request
@Robinlovelace
Copy link
Collaborator Author

eco chapter failed with

58/70 [15-eco-26]        
Error in `.__Learner__encapsulate()`:
! unused argument (rhs = rhs)
Backtrace:
  1. base::eval(...)
 19. mlr3 (local) `<fn>`()
Warning messages:
1: In warn_deprecated("Task$data_formats") :
  Task$data_formats is deprecated and will be removed in the future.
2: In warn_deprecated("DataBackend$data_formats") :
  DataBackend$data_formats is deprecated and will be removed in the future.
3: In warn_deprecated("Learner$data_formats") :
  Learner$data_formats is deprecated and will be removed in the future.

Quitting from lines 519-520 [15-eco-26] (15-eco.Rmd)
Execution halted
Error in Rscript_render(f, render_args, render_meta, add1, add2) : 
  Failed to compile 15-eco.Rmd
Calls: <Anonymous> -> render_new_session -> Rscript_render
Execution halted

So I've tried evaluating the train stage. Whack-a-mole!

https://github.com/geocompx/geocompr/actions/runs/11009162777/job/30568217959#step:4:1992

@Robinlovelace
Copy link
Collaborator Author

Robinlovelace commented Sep 24, 2024

Latest error after commit above FYI @jannes-m:

! The backend of Task 'mongon' has been removed. Set `store_backends` to `TRUE` during model fitting to conserve it.
Backtrace:
  1. base::eval(...)
 27. mlr3 (local) `<fn>`()
 28. mlr3:::.__Task__groups(...)
 29. mlr3:::assert_has_backend(self)
 30. mlr3misc::stopf(...)
Warning messages:
1: In warn_deprecated("Task$data_formats") :
  Task$data_formats is deprecated and will be removed in the future.
2: In warn_deprecated("DataBackend$data_formats") :
  DataBackend$data_formats is deprecated and will be removed in the future.
3: In warn_deprecated("Learner$data_formats") :
  Learner$data_formats is deprecated and will be removed in the future.
Quitting from lines 519-520 [15-eco-26] (15-eco.Rmd)
Execution halted
Error in Rscript_render(f, render_args, render_meta, add1, add2) : 
  Failed to compile 15-eco.Rmd
Calls: <Anonymous> -> render_new_session -> Rscript_render
Execution halted

Please prioritise this over proof-reading.

@@ -8,6 +8,8 @@ jobs:
name: Render-Book
runs-on: ubuntu-latest
container: geocompr/geocompr:suggests
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix for GH API maxxing out.

@Robinlovelace
Copy link
Collaborator Author

Latest error arises here I think:

`r if (knitr:::is_html_output()) '
# References {-}
'`

Message:

Error in eval(quote({ : 
  The number of arguments passed to Rscript should be 3.
Calls: local -> eval.parent -> eval -> eval -> eval -> eval

Source: https://github.com/geocompx/geocompr/actions/runs/11011451046/job/30575558670?pr=1117#step:4:2041

Any ideas @Nowosad?

Seems like a new one.

@Nowosad
Copy link
Member

Nowosad commented Sep 24, 2024

@Robinlovelace my guess would be that the error is related to some code change before...

@Robinlovelace
Copy link
Collaborator Author

@Nowosad there are no changes that could explain this, right? https://github.com/geocompx/geocompr/pull/1117/files

references.Rmd Outdated
# References {-}
'`

<!-- Todo: re-add if (knitr:::is_html_output()) bit? -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Robinlovelace maybe try reinstate this? I looked at the changes and I cannot guess what is the source of the issue...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@Nowosad
Copy link
Member

Nowosad commented Sep 24, 2024

@Robinlovelace you may also try to render a single chapter to isolate the source of the issue

@Robinlovelace
Copy link
Collaborator Author

@Robinlovelace you may also try to render a single chapter to isolate the source of the issue

Good idea. Additional commits to this branch welcome.

This reverts commit b3c30b7.
@Robinlovelace
Copy link
Collaborator Author

Suggestion: let's merge this to check the same behaviour happens on deployment workflow. Plan to do so this evening.

@Robinlovelace
Copy link
Collaborator Author

Latest hypothesis: xfun-related yihui/xfun@7dabf85

@jannes-m
Copy link
Collaborator

Again, I cannot reproduce the error in our container, ok, I should be more specific, I am using ghcr.io/geocompx/docker:qgis. Mmh, this is not the container gha is using which is geocompr/geocompr:suggests. Ok, I'll try this one as well.

@Robinlovelace
Copy link
Collaborator Author

Going to merge this, it's a mixxed bag but overall positive. We can re-evaluate the chunks later is my thinking @jannes-m, sorry for the hassle.

@Robinlovelace Robinlovelace merged commit d067f36 into main Sep 25, 2024
3 checks passed
@Robinlovelace Robinlovelace deleted the 1111-fieldbinding-is-read-only-actions-failing branch September 25, 2024 09:04
Copy link
Collaborator

@jannes-m jannes-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we pls revert most of the changes in the mlr3 chunks? Otw we will never know if there were breaking changes to the mlr3verse (sorry, but atm I don't use machine learning at all). We should also use the cache=TRUE, cache.lazy=FALSE stuff again. Not using this led to trouble with terra/raster in the past

github-actions bot pushed a commit that referenced this pull request Sep 25, 2024
…ng-is-read-only-actions-failing

Do not evaluate failing mlr3::lrn chunk (#1111 hotfix) d067f36
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

Successfully merging this pull request may close these issues.

! Field/Binding is read-only (Actions failing)
3 participants