generated from ChewKeanHo/AutomataCI
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init: layout single image execution controller
Since we developing the single image execution codes, we should proceed to layout its controller layer first. Hence, let's do this. This patch layouts single image execution controller in init/ directory. Co-authored-by: Shuralyov, Jean <jean.shuralyov@proton.me> Co-authored-by: Galyna, Cory <cory.galyna@gmail.com> Co-authored-by: (Holloway) Chew, Kean Ho <hollowaykeanho@gmail.com> Signed-off-by: (Holloway) Chew, Kean Ho <hollowaykeanho@gmail.com>
- Loading branch information
1 parent
b9130b3
commit ac2d971
Showing
8 changed files
with
434 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# BSD 3-Clause License | ||
# | ||
# Copyright (c) 2024 (Holloway) Chew, Kean Ho | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# | ||
# 1. Redistributions of source code must retain the above copyright notice, this | ||
# list of conditions and the following disclaimer. | ||
# | ||
# 2. Redistributions in binary form must reproduce the above copyright notice, | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# | ||
# 3. Neither the name of the copyright holder nor the names of its | ||
# contributors may be used to endorse or promote products derived from | ||
# this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
. "${env:LIBS_UPSCALER}\services\i18n\__printer.ps1" | ||
|
||
|
||
|
||
|
||
function I18N-Report-Info { | ||
param( | ||
[string]$___batch, | ||
[string]$___video, | ||
[string]$___model, | ||
[string]$___scale, | ||
[string]$___format, | ||
[string]$___parallel, | ||
[string]$___gpu, | ||
[string]$___input, | ||
[string]$___output | ||
) | ||
|
||
# execute | ||
switch (${env:UPSCALER_LANG}) { | ||
{ $_ -in "DE", "de" } { | ||
# german | ||
if ($___batch -eq 1) { | ||
$___batch_job = "ja" | ||
} else { | ||
$___batch_job = "nein" | ||
} | ||
|
||
if ($___video -eq 1) { | ||
$___video_job = "ja" | ||
} else { | ||
$___video_job = "nein" | ||
} | ||
|
||
$null = I18N-Status-Print "info" @" | ||
Stapelverarbeitung : ${___batch_job} | ||
Videoaufgabe : ${___video_job} | ||
Modell : ${___model} | ||
Skalierungsfaktor : ${___scale} | ||
Ausgewähltes Format : ${___format} | ||
Parallelität : ${___parallel} | ||
Ausgewählte GPU : ${___gpu} | ||
Bereitgestellter Input : ${___input} | ||
Ausgabe-Speicherort : ${___output} | ||
"@ | ||
} default { | ||
# fallback to default english | ||
if ($___batch -eq 1) { | ||
$___batch_job = "yes" | ||
} else { | ||
$___batch_job = "no" | ||
} | ||
|
||
if ($___video -eq 1) { | ||
$___video_job = "yes" | ||
} else { | ||
$___video_job = "no" | ||
} | ||
|
||
$null = I18N-Status-Print "info" @" | ||
Batch Job : ${___batch_job} | ||
Video Job : ${___video_job} | ||
Model : ${___model} | ||
Scaling Factor : ${___scale} | ||
Selected Format : ${___format} | ||
Parallelism : ${___parallel} | ||
Selected GPU : ${___gpu} | ||
Provided Input : ${___input} | ||
Output Location : ${___output} | ||
"@ | ||
}} | ||
|
||
|
||
# report status | ||
return 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# BSD 3-Clause License | ||
# | ||
# Copyright (c) 2024 (Holloway) Chew, Kean Ho | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# | ||
# 1. Redistributions of source code must retain the above copyright notice, this | ||
# list of conditions and the following disclaimer. | ||
# | ||
# 2. Redistributions in binary form must reproduce the above copyright notice, | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# | ||
# 3. Neither the name of the copyright holder nor the names of its | ||
# contributors may be used to endorse or promote products derived from | ||
# this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
. "${LIBS_UPSCALER}/services/i18n/__printer.sh" | ||
|
||
|
||
|
||
|
||
I18N_Report_Info() { | ||
#___batch="$1" | ||
#___video="$2" | ||
#___model="$3" | ||
#___scale="$4" | ||
#___format="$5" | ||
#___parallel="$6" | ||
#___gpu="$7" | ||
#___input="$8" | ||
#___output="$9" | ||
|
||
|
||
# execute | ||
case "$UPSCALER_LANG" in | ||
DE|de) | ||
# German | ||
if [ "$1" = "1" ]; then | ||
___batch_job="ja" | ||
else | ||
___batch_job="nein" | ||
fi | ||
|
||
if [ "$2" = "1" ]; then | ||
___video_job="ja" | ||
else | ||
___video_job="nein" | ||
fi | ||
|
||
I18N_Status_Print "info" " | ||
Stapelverarbeitung : ${___batch_job} | ||
Videoaufgabe : ${___video_job} | ||
Modell : ${3} | ||
Skalierungsfaktor : ${4} | ||
Ausgewähltes Format : ${5} | ||
Parallelität : ${6} | ||
Ausgewählte GPU : ${7} | ||
Bereitgestellter Input : ${8} | ||
Ausgabe-Speicherort : ${9} | ||
" | ||
;; | ||
*) | ||
# fallback to default english | ||
if [ "$1" = "1" ]; then | ||
___batch_job="yes" | ||
else | ||
___batch_job="no" | ||
fi | ||
|
||
if [ "$2" = "1" ]; then | ||
___video_job="yes" | ||
else | ||
___video_job="no" | ||
fi | ||
|
||
I18N_Status_Print "info" " | ||
Batch Job : ${___batch_job} | ||
Video Job : ${___video_job} | ||
Model : ${3} | ||
Scaling Factor : ${4} | ||
Selected Format : ${5} | ||
Parallelism : ${6} | ||
Selected GPU : ${7} | ||
Provided Input : ${8} | ||
Output Location : ${9} | ||
" | ||
;; | ||
esac | ||
|
||
|
||
# report status | ||
return 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# BSD 3-Clause License | ||
# | ||
# Copyright (c) 2024 (Holloway) Chew, Kean Ho | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# | ||
# 1. Redistributions of source code must retain the above copyright notice, this | ||
# list of conditions and the following disclaimer. | ||
# | ||
# 2. Redistributions in binary form must reproduce the above copyright notice, | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# | ||
# 3. Neither the name of the copyright holder nor the names of its | ||
# contributors may be used to endorse or promote products derived from | ||
# this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
. "${env:LIBS_UPSCALER}\services\i18n\__printer.ps1" | ||
|
||
|
||
|
||
|
||
function I18N-Report-Success { | ||
# execute | ||
switch (${env:UPSCALER_LANG}) { | ||
{ $_ -in "DE", "de" } { | ||
# german | ||
$null = I18N-Status-Print "success" "Hochskaliert abgeschlossen.`n" | ||
} default { | ||
# fallback to default english | ||
$null = I18N-Status-Print "success" "Upscaled completed.`n" | ||
}} | ||
|
||
|
||
# report status | ||
return 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# BSD 3-Clause License | ||
# | ||
# Copyright (c) 2024 (Holloway) Chew, Kean Ho | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# | ||
# 1. Redistributions of source code must retain the above copyright notice, this | ||
# list of conditions and the following disclaimer. | ||
# | ||
# 2. Redistributions in binary form must reproduce the above copyright notice, | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# | ||
# 3. Neither the name of the copyright holder nor the names of its | ||
# contributors may be used to endorse or promote products derived from | ||
# this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
. "${LIBS_UPSCALER}/services/i18n/__printer.sh" | ||
|
||
|
||
|
||
|
||
I18N_Report_Success() { | ||
# execute | ||
case "$UPSCALER_LANG" in | ||
DE|de) | ||
# German | ||
I18N_Status_Print "sucesss" "Hochskaliert abgeschlossen.\n" | ||
;; | ||
*) | ||
# fallback to default english | ||
I18N_Status_Print "success" "Upscaled completed.\n" | ||
;; | ||
esac | ||
|
||
|
||
# report status | ||
return 0 | ||
} |
Oops, something went wrong.