From 21c4311471ebe66e25a883b86175a9b093375052 Mon Sep 17 00:00:00 2001 From: tremblap Date: Tue, 21 Feb 2023 11:59:39 +0000 Subject: [PATCH 1/7] Knnregressor multiout (#153) Amend `KNNRegressor` to multi-dimensional mapping --- .../Classes/FluidKNNRegressor.sc | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/release-packaging/Classes/FluidKNNRegressor.sc b/release-packaging/Classes/FluidKNNRegressor.sc index 992b67e..5f009e5 100644 --- a/release-packaging/Classes/FluidKNNRegressor.sc +++ b/release-packaging/Classes/FluidKNNRegressor.sc @@ -23,23 +23,27 @@ FluidKNNRegressor : FluidModelObject { ^this.prMakeMsg(\predict,this.id,sourceDataSet.id,targetDataSet.id) } - predict{ |sourceDataSet, targetDataSet,action| + predict{ |sourceDataSet, targetDataSet, action| actions[\predict] = [nil, action]; this.prSendMsg(this.predictMsg(sourceDataSet, targetDataSet)); } - predictPointMsg { |buffer| - ^this.prMakeMsg(\predictPoint,id, this.prEncodeBuffer(buffer)); + predictPointMsg { |sourceBuffer, targetBuffer| + ^this.prMakeMsg(\predictPoint,id, + this.prEncodeBuffer(sourceBuffer), + this.prEncodeBuffer(targetBuffer), + ["/b_query", targetBuffer.asUGenInput]); } - predictPoint { |buffer, action| - actions[\predictPoint] = [number(FluidMessageResponse,_,_),action]; - this.prSendMsg(this.predictPointMsg(buffer)); + predictPoint { |sourceBuffer, targetBuffer, action| + actions[\predictPoint] = [nil,{action.value(targetBuffer)}]; + this.predictPointMsg(sourceBuffer, targetBuffer); + this.prSendMsg(this.predictPointMsg(sourceBuffer, targetBuffer)); } - kr{|trig, inputBuffer,outputBuffer| + kr{|trig, inputBuffer, outputBuffer, numNeighbours, weight| ^FluidKNNRegressorQuery.kr(K2A.ar(trig), - this, this.numNeighbours, this.weight, + this, numNeighbours??{this.numNeighbours}, weight??{this.weight}, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer)); } From 5251e2efcb65261c29660e39a6b086d60976e4cd Mon Sep 17 00:00:00 2001 From: Owen Green Date: Tue, 21 Feb 2023 12:48:29 +0000 Subject: [PATCH 2/7] replace `set-output` with environment file --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4a6b4e..1949697 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,7 +73,7 @@ jobs: path: install/FluCoMa-SC-Linux.tar.gz - id: get-version - run: echo "::set-output name=version::$(cat flucoma.version.rc)" + run: echo "version=$(cat flucoma.version.rc)" >> $GITHUB_OUTPUT working-directory: build/_deps/flucoma-core-src release: From bf19c3b5935beb1b62fc44c299c5ccbda7aee7ad Mon Sep 17 00:00:00 2001 From: tremblap Date: Tue, 21 Feb 2023 14:17:07 +0000 Subject: [PATCH 3/7] KDTree KR supports the same behaviour than the NRT query --- release-packaging/Classes/FluidKDTree.sc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/release-packaging/Classes/FluidKDTree.sc b/release-packaging/Classes/FluidKDTree.sc index f850d7f..53b4fb6 100644 --- a/release-packaging/Classes/FluidKDTree.sc +++ b/release-packaging/Classes/FluidKDTree.sc @@ -48,13 +48,9 @@ FluidKDTree : FluidModelObject this.prSendMsg(this.kNearestDistMsg(buffer,k)); } - kr{|trig, inputBuffer,outputBuffer, numNeighbours = 1, lookupDataSet| - /* this.numNeighbours_(numNeighbours); - lookupDataSet = lookupDataSet ? -1; - this.lookupDataSet_(lookupDataSet);*/ - + kr{|trig, inputBuffer, outputBuffer, numNeighbours, radius, lookupDataSet| ^FluidKDTreeQuery.kr(trig, - this, numNeighbours, this.radius,lookupDataSet.asUGenInput, + this, numNeighbours??{this.numNeighbours}, radius??{this.radius}, lookupDataSet.asUGenInput, inputBuffer,outputBuffer); } @@ -62,8 +58,8 @@ FluidKDTree : FluidModelObject FluidKDTreeQuery : FluidRTMultiOutUGen { - *kr{ |trig, tree, numNeighbours, radius,lookupDataSet, inputBuffer, outputBuffer | - ^this.multiNew('control',trig, tree.asUGenInput, numNeighbours, radius,lookupDataSet!?(_.asUGenInput)??{-1}, inputBuffer.asUGenInput, outputBuffer.asUGenInput) + *kr{ |trig, tree, numNeighbours, radius, lookupDataSet, inputBuffer, outputBuffer | + ^this.multiNew('control', trig, tree.asUGenInput, numNeighbours, radius, lookupDataSet!?(_.asUGenInput)??{-1}, inputBuffer.asUGenInput, outputBuffer.asUGenInput) } init { arg ... theInputs; From 19657261dfc6cad7fb218391be411da55720bf85 Mon Sep 17 00:00:00 2001 From: Owen Green Date: Tue, 21 Feb 2023 18:56:49 +0000 Subject: [PATCH 4/7] release: pull from invoked branch --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1949697..6dab9c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: - uses: flucoma/actions/env@main - uses: flucoma/actions/sc@main with: - branch: origin/production + branch: origin/${{ github.ref_name }} - name: sign binaries uses: flucoma/actions/distribution@main @@ -38,7 +38,7 @@ jobs: - uses: flucoma/actions/env@main - uses: flucoma/actions/sc@main with: - branch: origin/production + branch: origin/${{ github.ref_name }} - name: remove pdb files run: Remove-Item install -Recurse -Include *.pdb @@ -61,7 +61,7 @@ jobs: - uses: flucoma/actions/env@main - uses: flucoma/actions/sc@main with: - branch: origin/production + branch: origin/${{ github.ref_name }} - name: compress archive run: tar -zcvf FluCoMa-SC-Linux.tar.gz FluidCorpusManipulation From 35874eafe883387785c77763c255d39951195ea6 Mon Sep 17 00:00:00 2001 From: Owen Green Date: Wed, 22 Feb 2023 10:50:08 +0000 Subject: [PATCH 5/7] Tag release to correct commit --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6dab9c1..1607cfd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,5 +101,6 @@ jobs: files: FluCoMa* prerelease: true tag_name: ${{ needs.linuxbuild.outputs.version }} + target_commitish: ${{ github.sha }} draft: false From 8403b25256ca65f29ebe8b4ca956c924ecdd3cf0 Mon Sep 17 00:00:00 2001 From: Owen Green Date: Wed, 22 Feb 2023 13:13:25 +0000 Subject: [PATCH 6/7] release: delete pre-existing --- .github/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1607cfd..3bb3b0d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,6 +93,14 @@ jobs: with: name: linuxbuild + - name: delete pre-existing release + uses: dev-drprasad/delete-tag-and-release@v0.2.0 + with: + delete_release: true # default: false + tag_name: ${{ needs.linuxbuild.outputs.version }} # tag name to delete + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: package and upload uses: softprops/action-gh-release@v1 with: From 1491a7cb1a23ea6819f5a15f7d29869c0e5d9491 Mon Sep 17 00:00:00 2001 From: tremblap Date: Tue, 28 Mar 2023 14:06:42 +0100 Subject: [PATCH 7/7] amended script tag management version --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3bb3b0d..5e03eb2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -94,7 +94,7 @@ jobs: name: linuxbuild - name: delete pre-existing release - uses: dev-drprasad/delete-tag-and-release@v0.2.0 + uses: dev-drprasad/delete-tag-and-release@v0.2.1 with: delete_release: true # default: false tag_name: ${{ needs.linuxbuild.outputs.version }} # tag name to delete