Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
cd365e97
Unverified
Commit
cd365e97
authored
Apr 30, 2024
by
James Lamb
Committed by
GitHub
Apr 30, 2024
Browse files
[R-package] [ci] Manually install 'Matrix' (fixes #6433) (#6434)
parent
92a8741b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
.ci/test_r_package.sh
.ci/test_r_package.sh
+11
-2
docs/FAQ.rst
docs/FAQ.rst
+16
-0
No files found.
.ci/test_r_package.sh
View file @
cd365e97
...
@@ -110,15 +110,24 @@ fi
...
@@ -110,15 +110,24 @@ fi
# "Warning: dependency ‘lattice’ is not available"
# "Warning: dependency ‘lattice’ is not available"
if
[[
"
${
R_MAJOR_VERSION
}
"
==
"3"
]]
;
then
if
[[
"
${
R_MAJOR_VERSION
}
"
==
"3"
]]
;
then
Rscript
--vanilla
-e
"install.packages('https://cran.r-project.org/src/contrib/Archive/lattice/lattice_0.20-41.tar.gz', repos = NULL, lib = '
${
R_LIB_PATH
}
')"
Rscript
--vanilla
-e
"install.packages('https://cran.r-project.org/src/contrib/Archive/lattice/lattice_0.20-41.tar.gz', repos = NULL, lib = '
${
R_LIB_PATH
}
')"
else
# {Matrix} needs {lattice}, so this needs to run before manually installing {Matrix}.
# This should be unnecessary on R >=4.4.0
# ref: https://github.com/microsoft/LightGBM/issues/6433
Rscript
--vanilla
-e
"install.packages('lattice', repos = '
${
CRAN_MIRROR
}
', lib = '
${
R_LIB_PATH
}
')"
fi
fi
# manually install {Matrix}, as {Matrix}=1.7-0 raised its R floor all the way to R 4.4.0
# ref: https://github.com/microsoft/LightGBM/issues/6433
Rscript
--vanilla
-e
"install.packages('https://cran.r-project.org/src/contrib/Archive/Matrix/Matrix_1.6-5.tar.gz', repos = NULL, lib = '
${
R_LIB_PATH
}
')"
# Manually install Depends and Imports libraries + 'knitr', 'markdown', 'RhpcBLASctl', 'testthat'
# Manually install Depends and Imports libraries + 'knitr', 'markdown', 'RhpcBLASctl', 'testthat'
# to avoid a CI-time dependency on devtools (for devtools::install_deps())
# to avoid a CI-time dependency on devtools (for devtools::install_deps())
# NOTE: testthat is not required when running rchk
# NOTE: testthat is not required when running rchk
if
[[
"
${
TASK
}
"
==
"r-rchk"
]]
;
then
if
[[
"
${
TASK
}
"
==
"r-rchk"
]]
;
then
packages
=
"c('data.table', 'jsonlite', 'knitr', 'markdown',
'Matrix',
'R6', 'RhpcBLASctl')"
packages
=
"c('data.table', 'jsonlite', 'knitr', 'markdown', 'R6', 'RhpcBLASctl')"
else
else
packages
=
"c('data.table', 'jsonlite', 'knitr', 'markdown',
'Matrix',
'R6', 'RhpcBLASctl', 'testthat')"
packages
=
"c('data.table', 'jsonlite', 'knitr', 'markdown', 'R6', 'RhpcBLASctl', 'testthat')"
fi
fi
compile_from_source
=
"both"
compile_from_source
=
"both"
if
[[
$OS_NAME
==
"macos"
]]
;
then
if
[[
$OS_NAME
==
"macos"
]]
;
then
...
...
docs/FAQ.rst
View file @
cd365e97
...
@@ -236,6 +236,22 @@ As of LightGBM v4.0.0, ``setinfo()`` has been replaced by a new method, ``set_fi
...
@@ -236,6 +236,22 @@ As of LightGBM v4.0.0, ``setinfo()`` has been replaced by a new method, ``set_fi
If
you
are
experiencing
this
error
when
running
``
lightgbm
``,
you
may
be
facing
the
same
issue
reported
in
`#
2715
<
https
://
github
.
com
/
microsoft
/
LightGBM
/
issues
/
2715
>`
_
and
later
in
`#
2989
<
https
://
github
.
com
/
microsoft
/
LightGBM
/
pull
/
2989
#
issuecomment
-
614374151
>`
_
.
We
have
seen
that
in
some
situations
,
using
``
data
.
table
``
1.11
.
x
results
in
this
error
.
To
get
around
this
,
you
can
upgrade
your
version
of
``
data
.
table
``
to
at
least
version
1.12.0
.
If
you
are
experiencing
this
error
when
running
``
lightgbm
``,
you
may
be
facing
the
same
issue
reported
in
`#
2715
<
https
://
github
.
com
/
microsoft
/
LightGBM
/
issues
/
2715
>`
_
and
later
in
`#
2989
<
https
://
github
.
com
/
microsoft
/
LightGBM
/
pull
/
2989
#
issuecomment
-
614374151
>`
_
.
We
have
seen
that
in
some
situations
,
using
``
data
.
table
``
1.11
.
x
results
in
this
error
.
To
get
around
this
,
you
can
upgrade
your
version
of
``
data
.
table
``
to
at
least
version
1.12.0
.
4.
package
‘
Matrix
’
is
not
available
In
April
2024
,
``
Matrix
==
1.7
-
0
``
was
published
to
CRAN
.
That
version
had
a
floor
of
``
R
(>=
4.4.0
)``.
``{
Matrix
}``
is
a
hard
runtime
dependency
of
``{
lightgbm
}``,
so
on
any
version
of
R
older
than
``
4.4.0
``,
running
``
install
.
packages
(
"lightgbm"
)``
results
in
something
like
the
following
.
..
code
-
block
::
text
package
‘
Matrix
’
is
not
available
for
this
version
of
R
To
fix
that
without
upgrading
to
R
4.4.0
or
greater
,
manually
install
an
older
version
of
``{
Matrix
}``.
..
code
-
block
::
R
install
.
packages
(
'https://cran.r-project.org/src/contrib/Archive/Matrix/Matrix_1.6-5.tar.gz'
,
repos
=
NULL
)
------
------
Python
-
package
Python
-
package
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment