From d2d8e79d7a2a67b7983603b53a429af44c8396ac Mon Sep 17 00:00:00 2001 From: jllllll <3887729+jllllll@users.noreply.github.com> Date: Fri, 17 Nov 2023 17:39:38 -0600 Subject: [PATCH] Minor fix --- .github/workflows/build-wheels-oobabooga.yml | 6 +++--- .github/workflows/build-wheels-rocm-full.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-wheels-oobabooga.yml b/.github/workflows/build-wheels-oobabooga.yml index 8b52ad10..06cb869f 100644 --- a/.github/workflows/build-wheels-oobabooga.yml +++ b/.github/workflows/build-wheels-oobabooga.yml @@ -175,10 +175,10 @@ jobs: New-Item 'pyproject.toml' -itemType File -value $newpyproject -force New-Item 'CMakeLists.txt' -itemType File -value $cmakelists.Replace('llama_cpp','llama_cpp_cuda') -force - if ($packageVersion -gt [version]'0.2.13' -and $packageVersion -lt [version]'0.2.19') + if ($packageVersion -gt [version]'0.2.13') { - $pyScripts = (dir '.\llama_cpp_cuda\*.py') - $pyScripts.fullname.foreach({New-Item $_ -itemType File -value (cat $_ -raw).replace('import llama_cpp.llama','from . import llama') -force}) + $pyScripts = (Get-ChildItem $(Join-Path '.' 'llama_cpp_cuda' '*.py')) + $pyScripts.fullname.foreach({New-Item $_ -itemType File -value (Get-Content $_ -raw).replace('import llama_cpp.llama','from . import llama') -force}) } - name: Build Wheel diff --git a/.github/workflows/build-wheels-rocm-full.yml b/.github/workflows/build-wheels-rocm-full.yml index 4d7da9c2..115a69dd 100644 --- a/.github/workflows/build-wheels-rocm-full.yml +++ b/.github/workflows/build-wheels-rocm-full.yml @@ -170,10 +170,10 @@ jobs: New-Item 'pyproject.toml' -itemType File -value $newpyproject -force New-Item 'CMakeLists.txt' -itemType File -value $cmakelists.Replace('llama_cpp','llama_cpp_cuda') -force - if ($packageVersion -gt [version]'0.2.13' -and $packageVersion -lt [version]'0.2.19') + if ($packageVersion -gt [version]'0.2.13') { - $pyScripts = (dir '.\llama_cpp_cuda\*.py') - $pyScripts.fullname.foreach({New-Item $_ -itemType File -value (cat $_ -raw).replace('import llama_cpp.llama','from . import llama') -force}) + $pyScripts = (Get-ChildItem $(Join-Path '.' 'llama_cpp_cuda' '*.py')) + $pyScripts.fullname.foreach({New-Item $_ -itemType File -value (Get-Content $_ -raw).replace('import llama_cpp.llama','from . import llama') -force}) } - name: Build Wheel