antadde / N-SDM

Nested-Species Distribution Modelling
MIT License
26 stars 1 forks source link

Errors occurring in glo_B.R with example data #8

Open simonrolph opened 1 year ago

simonrolph commented 1 year ago

When running the example provided I encounter this error in glo_B.R

Here's the .err file:

Loading required package: data.table
Loading required package: stringi
Loading required package: stringr
Loading required package: plyr
Loading required package: readxl
Loading required package: writexl
Loading required package: parallel
Loading required package: sp
Loading required package: raster
Loading required package: rgdal
Please note that rgdal will be retired by the end of 2023,
plan transition to sf/stars/terra functions using GDAL and PROJ
at your earliest convenience.

rgdal: version: 1.5-32, (SVN revision 1176)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 3.6.2, released 2023/01/02
Path to GDAL shared files: 
 GDAL does not use iconv for recoding strings.
GDAL binary built with GEOS: TRUE 
Loaded PROJ runtime: Rel. 9.1.0, September 1st, 2022, [PJ_VERSION: 910]
Path to PROJ shared files: /users/rolphsim/.local/share/proj:/LUMI_CONTAINER/miniconda/envs/env1/share/proj
PROJ CDN enabled: TRUE
Linking to sp version:1.5-1
To mute warnings of possible GDAL/OSR exportToProj4() degradation,
use options("rgdal_show_exportToProj4_warnings"="none") before loading sp or rgdal.
Loading required package: zoo

Attaching package: ‘zoo’

The following objects are masked from ‘package:base’:

    as.Date, as.Date.numeric

Loading required package: fst
Loading required package: tools
Loading required package: glmnet
Loading required package: Matrix
Loaded glmnet 4.1-6
Loading required package: gam
Loading required package: splines
Loading required package: foreach
Loaded gam 1.22-1

Loading required package: mgcv
Loading required package: nlme

Attaching package: ‘nlme’

The following object is masked from ‘package:raster’:

    getData

This is mgcv 1.8-42. For overview type 'help("mgcv-package")'.

Attaching package: ‘mgcv’

The following objects are masked from ‘package:gam’:

    gam, gam.control, gam.fit, s

Loading required package: randomForest
randomForest 4.7-1.1
Type rfNews() to see new features/changes/bug fixes.
Loading required package: RRF
Registered S3 method overwritten by 'RRF':
  method      from        
  plot.margin randomForest
RRF 1.9.4
Type rrfNews() to see new features/changes/bug fixes.

Attaching package: ‘RRF’

The following objects are masked from ‘package:randomForest’:

    classCenter, combine, getTree, grow, importance, margin, MDSplot,
    na.roughfix, outlier, partialPlot, treesize, varImpPlot, varUsed

Loading required package: lightgbm
Loading required package: R6
Loading required package: ranger

Attaching package: ‘ranger’

The following object is masked from ‘package:RRF’:

    importance

The following object is masked from ‘package:randomForest’:

    importance

Loading required package: maxnet
Loading required package: caret
Loading required package: ggplot2

Attaching package: ‘ggplot2’

The following object is masked from ‘package:RRF’:

    margin

The following object is masked from ‘package:randomForest’:

    margin

Loading required package: lattice
Failed to query server: Transport endpoint is not connected
Loading required package: ROCR
Loading required package: chron

Attaching package: ‘chron’

The following object is masked from ‘package:foreach’:

    times

The following objects are masked from ‘package:raster’:

    origin, origin<-

Loading required package: ggpubr

Attaching package: ‘ggpubr’

The following object is masked from ‘package:raster’:

    rotate

The following object is masked from ‘package:plyr’:

    mutate

Warning message:
In system("timedatectl", intern = TRUE) :
  running command 'timedatectl' had status 1
Warning message:
In rm(d0_datasets, d1_covsels, respcurves, imp, eval_list) :
  object 'eval_list' not found
Error: All inputs to rbind.fill must be data.frames
In addition: Warning message:
In parallel::mclapply(splits_ix, function(x) { :
  all scheduled cores encountered errors in user code
Execution halted

From a different .err file I have a different error which occurred on job 5, 10 and 15 (one for each species):

Loading required package: nsdm
Loading required package: data.table
Loading required package: stringi
Loading required package: stringr
Loading required package: plyr
Loading required package: readxl
Loading required package: writexl
Loading required package: parallel
Loading required package: sp
Loading required package: raster
Loading required package: rgdal
Please note that rgdal will be retired by the end of 2023,
plan transition to sf/stars/terra functions using GDAL and PROJ
at your earliest convenience.

rgdal: version: 1.5-32, (SVN revision 1176)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 3.6.2, released 2023/01/02
Path to GDAL shared files: 
 GDAL does not use iconv for recoding strings.
GDAL binary built with GEOS: TRUE 
Loaded PROJ runtime: Rel. 9.1.0, September 1st, 2022, [PJ_VERSION: 910]
Path to PROJ shared files: /users/rolphsim/.local/share/proj:/LUMI_CONTAINER/miniconda/envs/env1/share/proj
PROJ CDN enabled: TRUE
Linking to sp version:1.5-1
To mute warnings of possible GDAL/OSR exportToProj4() degradation,
use options("rgdal_show_exportToProj4_warnings"="none") before loading sp or rgdal.
Loading required package: zoo

Attaching package: ‘zoo’

The following objects are masked from ‘package:base’:

    as.Date, as.Date.numeric

Loading required package: fst
Loading required package: tools
Loading required package: glmnet
Loading required package: Matrix
Loaded glmnet 4.1-6
Loading required package: gam
Loading required package: splines
Loading required package: foreach
Loaded gam 1.22-1

Loading required package: mgcv
Loading required package: nlme

Attaching package: ‘nlme’

The following object is masked from ‘package:raster’:

    getData

This is mgcv 1.8-42. For overview type 'help("mgcv-package")'.

Attaching package: ‘mgcv’

The following objects are masked from ‘package:gam’:

    gam, gam.control, gam.fit, s

Loading required package: randomForest
randomForest 4.7-1.1
Type rfNews() to see new features/changes/bug fixes.
Loading required package: RRF
Registered S3 method overwritten by 'RRF':
  method      from        
  plot.margin randomForest
RRF 1.9.4
Type rrfNews() to see new features/changes/bug fixes.

Attaching package: ‘RRF’

The following objects are masked from ‘package:randomForest’:

    classCenter, combine, getTree, grow, importance, margin, MDSplot,
    na.roughfix, outlier, partialPlot, treesize, varImpPlot, varUsed

Loading required package: lightgbm
Loading required package: R6
Loading required package: ranger

Attaching package: ‘ranger’

The following object is masked from ‘package:RRF’:

    importance

The following object is masked from ‘package:randomForest’:

    importance

Loading required package: maxnet
Loading required package: caret
Loading required package: ggplot2

Attaching package: ‘ggplot2’

The following object is masked from ‘package:RRF’:

    margin

The following object is masked from ‘package:randomForest’:

    margin

Loading required package: lattice
Failed to query server: Transport endpoint is not connected
Loading required package: ROCR
Loading required package: chron

Attaching package: ‘chron’

The following object is masked from ‘package:foreach’:

    times

The following objects are masked from ‘package:raster’:

    origin, origin<-

Loading required package: ggpubr

Attaching package: ‘ggpubr’

The following object is masked from ‘package:raster’:

    rotate

The following object is masked from ‘package:plyr’:

    mutate

Warning message:
In system("timedatectl", intern = TRUE) :
  running command 'timedatectl' had status 1
Warning message:
In dir.create(tmp_path_gbm, recursive = TRUE) :
  '/scratch/project_465000357/rolphsim/uc-ces-NSDM/scratch/tmp/nsdm-project/gbm' already exists
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
[LightGBM] [Fatal] The number of features in data (0) is not the same as it was in training data (9).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
Warning message:
In mclapply(1:length(fit_j), mc.preschedule = FALSE, function(g) { :
  25 function calls resulted in an error
Error: object 'evals' not found
Execution halted

This is the error I then get in glo_C.R but I assume this is due to the error occurring in glo_B.R


Loading required package: nsdm
Loading required package: data.table
Loading required package: stringi
Loading required package: stringr
Loading required package: plyr
Loading required package: readxl
Loading required package: writexl
Loading required package: parallel
Loading required package: sp
Loading required package: raster
Loading required package: rgdal
Please note that rgdal will be retired by the end of 2023,
plan transition to sf/stars/terra functions using GDAL and PROJ
at your earliest convenience.

rgdal: version: 1.5-32, (SVN revision 1176)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 3.6.2, released 2023/01/02
Path to GDAL shared files: 
 GDAL does not use iconv for recoding strings.
GDAL binary built with GEOS: TRUE 
Loaded PROJ runtime: Rel. 9.1.0, September 1st, 2022, [PJ_VERSION: 910]
Path to PROJ shared files: /users/rolphsim/.local/share/proj:/LUMI_CONTAINER/miniconda/envs/env1/share/proj
PROJ CDN enabled: TRUE
Linking to sp version:1.5-1
To mute warnings of possible GDAL/OSR exportToProj4() degradation,
use options("rgdal_show_exportToProj4_warnings"="none") before loading sp or rgdal.
Loading required package: zoo

Attaching package: ‘zoo’

The following objects are masked from ‘package:base’:

    as.Date, as.Date.numeric

Loading required package: fst
Loading required package: tools
Loading required package: glmnet
Loading required package: Matrix
Loaded glmnet 4.1-6
Loading required package: gam
Loading required package: splines
Loading required package: foreach
Loaded gam 1.22-1

Loading required package: mgcv
Loading required package: nlme

Attaching package: ‘nlme’

The following object is masked from ‘package:raster’:

    getData

This is mgcv 1.8-42. For overview type 'help("mgcv-package")'.

Attaching package: ‘mgcv’

The following objects are masked from ‘package:gam’:

    gam, gam.control, gam.fit, s

Loading required package: randomForest
randomForest 4.7-1.1
Type rfNews() to see new features/changes/bug fixes.
Loading required package: RRF
Registered S3 method overwritten by 'RRF':
  method      from        
  plot.margin randomForest
RRF 1.9.4
Type rrfNews() to see new features/changes/bug fixes.

Attaching package: ‘RRF’

The following objects are masked from ‘package:randomForest’:

    classCenter, combine, getTree, grow, importance, margin, MDSplot,
    na.roughfix, outlier, partialPlot, treesize, varImpPlot, varUsed

Loading required package: lightgbm
Loading required package: R6
Loading required package: ranger

Attaching package: ‘ranger’

The following object is masked from ‘package:RRF’:

    importance

The following object is masked from ‘package:randomForest’:

    importance

Loading required package: maxnet
Loading required package: caret
Loading required package: ggplot2

Attaching package: ‘ggplot2’

The following object is masked from ‘package:RRF’:

    margin

The following object is masked from ‘package:randomForest’:

    margin

Loading required package: lattice
Failed to query server: Transport endpoint is not connected
Loading required package: ROCR
Loading required package: chron

Attaching package: ‘chron’

The following object is masked from ‘package:foreach’:

    times

The following objects are masked from ‘package:raster’:

    origin, origin<-

Loading required package: ggpubr

Attaching package: ‘ggpubr’

The following object is masked from ‘package:raster’:

    rotate

The following object is masked from ‘package:plyr’:

    mutate

Warning message:
In system("timedatectl", intern = TRUE) :
  running command 'timedatectl' had status 1
Error in gzfile(file, "rb") : invalid 'description' argument
Calls: readRDS -> gzfile
In addition: Warning messages:
1: In raster::readAll(maps) :
  cannot read values; there is no file associated with this RasterLayer
2: In raster::readAll(maps) :
  cannot read values; there is no file associated with this RasterLayer
Execution halted
antadde commented 1 year ago

Could you check if gbm files are properly written in 'scratch/tmp/nsdm-project/gbm'? (and also the version of the lightgbm R package?). Tested the example this morning and everything is running smoothly on my side (lightgbm_3.3.5).