Skip to content

Commit

Permalink
Add scripts to fetch NNUE model from GitHub
Browse files Browse the repository at this point in the history
Bench: 1736583
  • Loading branch information
codedeliveryservice committed Apr 16, 2024
1 parent 816db2f commit bfe252c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/fetch-nnue.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$url = Invoke-RestMethod -Uri "https://api.github.com/repos/codedeliveryservice/RecklessNetworks/releases/latest" |
Select-Object -ExpandProperty assets |
Select-Object -First 1 -ExpandProperty browser_download_url

$directory = "..\networks"
if (-not (Test-Path $directory)) {
New-Item -ItemType Directory -Path $directory | Out-Null
}

Invoke-WebRequest -Uri $url -OutFile "..\networks\model.nnue"
7 changes: 7 additions & 0 deletions scripts/fetch-nnue.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

url=$(curl -s https://api.github.com/repos/codedeliveryservice/RecklessNetworks/releases/latest | \
grep -o '"browser_download_url": *"[^"]*"' | head -n 1 | cut -d '"' -f 4)

mkdir -p ../networks
wget -O ../networks/model.nnue "$url"

0 comments on commit bfe252c

Please sign in to comment.