Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyu1994 committed Dec 17, 2024
2 parents b56b39e + 480600b commit 3bebc19
Show file tree
Hide file tree
Showing 102 changed files with 1,329 additions and 936 deletions.
2 changes: 1 addition & 1 deletion .ci/conda-envs/ci-core.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# direct imports
cffi>=1.16
dask>=2023.5.0
dask>=2023.5.0,<2024.12
joblib>=1.3.2
matplotlib-base>=3.7.3
numpy>=1.24.4
Expand Down
40 changes: 23 additions & 17 deletions .ci/install-opencl.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,37 @@ $installer = "AMD-APP-SDKInstaller-v3.0.130.135-GA-windows-F-x64.exe"

Write-Output "Downloading OpenCL platform installer"
$ProgressPreference = "SilentlyContinue" # progress bar bug extremely slows down download speed
Invoke-WebRequest -OutFile "$installer" -Uri "https://github.com/microsoft/LightGBM/releases/download/v2.0.12/$installer"
$params = @{
OutFile = "$installer"
Uri = "https://github.com/microsoft/LightGBM/releases/download/v2.0.12/$installer"
}
Invoke-WebRequest @params

if (Test-Path "$installer") {
Write-Output "Successfully downloaded OpenCL platform installer"
Write-Output "Successfully downloaded OpenCL platform installer"
} else {
Write-Output "Unable to download OpenCL platform installer"
Write-Output "Setting EXIT"
$host.SetShouldExit(-1)
exit 1
Write-Output "Unable to download OpenCL platform installer"
Write-Output "Setting EXIT"
$host.SetShouldExit(-1)
exit 1
}

# Install OpenCL platform from installer executable
Write-Output "Running OpenCL installer"
Invoke-Command -ScriptBlock { Start-Process "$installer" -ArgumentList '/S /V"/quiet /norestart /passive /log opencl.log"' -Wait }
Invoke-Command -ScriptBlock {
Start-Process "$installer" -ArgumentList '/S /V"/quiet /norestart /passive /log opencl.log"' -Wait
}

$property = Get-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors
if ($property -eq $null) {
Write-Output "Unable to install OpenCL CPU platform"
Write-Output "OpenCL installation log:"
Get-Content "opencl.log"
Write-Output "Setting EXIT"
$host.SetShouldExit(-1)
exit 1
if ($null -eq $property) {
Write-Output "Unable to install OpenCL CPU platform"
Write-Output "OpenCL installation log:"
Get-Content "opencl.log"
Write-Output "Setting EXIT"
$host.SetShouldExit(-1)
exit 1
} else {
Write-Output "Successfully installed OpenCL CPU platform"
Write-Output "Current OpenCL drivers:"
Write-Output $property
Write-Output "Successfully installed OpenCL CPU platform"
Write-Output "Current OpenCL drivers:"
Write-Output $property
}
5 changes: 5 additions & 0 deletions .ci/lint-js.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -e -E -u -o pipefail

biome ci --config-path=./biome.json --diagnostic-level=info --error-on-warnings ./
56 changes: 56 additions & 0 deletions .ci/lint-powershell.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
$settings = @{
Severity = @(
'Information',
'Warning',
'Error'
)
IncludeDefaultRules = $true
# Additional rules that are disabled by default
Rules = @{
PSAvoidExclaimOperator = @{
Enable = $true
}
PSAvoidLongLines = @{
Enable = $true
MaximumLineLength = 120
}
PSAvoidSemicolonsAsLineTerminators = @{
Enable = $true
}
PSPlaceCloseBrace = @{
Enable = $true
NoEmptyLineBefore = $true
IgnoreOneLineBlock = $true
NewLineAfter = $false
}
PSPlaceOpenBrace = @{
Enable = $true
OnSameLine = $true
NewLineAfter = $true
IgnoreOneLineBlock = $true
}
PSUseConsistentIndentation = @{
Enable = $true
IndentationSize = 4
PipelineIndentation = 'IncreaseIndentationAfterEveryPipeline'
Kind = 'space'
}
PSUseConsistentWhitespace = @{
Enable = $true
CheckInnerBrace = $true
CheckOpenBrace = $true
CheckOpenParen = $true
CheckOperator = $true
CheckSeparator = $true
CheckPipe = $true
CheckPipeForRedundantWhitespace = $true
CheckParameter = $true
IgnoreAssignmentOperatorInsideHashTable = $false
}
PSUseCorrectCasing = @{
Enable = $true
}
}
}

Invoke-ScriptAnalyzer -Path ./ -Recurse -EnableExit -Settings $settings
File renamed without changes.
1 change: 0 additions & 1 deletion .ci/lint-r-code.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

loadNamespace("lintr")

args <- commandArgs(
Expand Down
2 changes: 1 addition & 1 deletion .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ else # Linux
fi
fi

if [[ "${TASK}" != "r-package" ]] && [[ "${TASK}" != "r-rchk" ]]; then
if [[ "${TASK}" != "r-package" ]]; then
if [[ $SETUP_CONDA != "false" ]]; then
curl \
-sL \
Expand Down
Loading

0 comments on commit 3bebc19

Please sign in to comment.