Skip to content

dev.yml.j2: fix etiss ref #534

dev.yml.j2: fix etiss ref

dev.yml.j2: fix etiss ref #534

GitHub Actions / Black failed Feb 3, 2024 in 0s

10 errors

Black found 10 errors

Annotations

Check failure on line 140 in /home/runner/work/mlonmcu/mlonmcu/mlonmcu/cli/common.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/mlonmcu/mlonmcu/mlonmcu/cli/common.py#L117-L140

                 dest="feature_gen" + suffix,
                 type=str,
                 metavar="FEATURES",
                 nargs="+",
                 action="append",
-                help=f"Generator statement for features. (Also available: --feature-gen2 ... --feature-gen{number})"
-                if i == 0
-                else argparse.SUPPRESS,
+                help=(
+                    f"Generator statement for features. (Also available: --feature-gen2 ... --feature-gen{number})"
+                    if i == 0
+                    else argparse.SUPPRESS
+                ),
             )
             flow_parser.add_argument(
                 "--config-gen" + suffix,
                 dest="config_gen" + suffix,
                 metavar="KEY=VALUE",
                 nargs="+",
                 action="append",
-                help=f"Generator statement for configs. (Also available: --config-gen2 ... --config-gen{number})"
-                if i == 0
-                else argparse.SUPPRESS,
+                help=(
+                    f"Generator statement for configs. (Also available: --config-gen2 ... --config-gen{number})"
+                    if i == 0
+                    else argparse.SUPPRESS
+                ),
             )
 
     add_gen_args(flow_parser, NUM_GEN_ARGS)
     flow_parser.add_argument(
         "--parallel",

Check failure on line 404 in /home/runner/work/mlonmcu/mlonmcu/mlonmcu/flow/tvm/backend/backend.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/mlonmcu/mlonmcu/mlonmcu/flow/tvm/backend/backend.py#L391-L404

             num_threads=self.num_threads,
             debug_cfg=self.relay_debug,
         )
         if self.use_tlcpack:
             pre = ["tvmc"]
-            return utils.exec_getout(
-                *pre, command, *args, live=self.print_outputs, env=env, cwd=cwd
-            )
+            return utils.exec_getout(*pre, command, *args, live=self.print_outputs, env=env, cwd=cwd)
         else:
             if self.tvmc_custom_script is None:
                 pre = ["-m", "tvm.driver.tvmc"]
             else:
                 pre = [self.tvmc_custom_script]

Check failure on line 154 in /home/runner/work/mlonmcu/mlonmcu/mlonmcu/target/target.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/mlonmcu/mlonmcu/mlonmcu/target/target.py#L144-L154

             if temp is None:
                 temp = code
             if handle_exit is not None:
                 temp = handle_exit(temp, out=out)
             return temp
+
         if self.print_outputs:
             out = self.exec(elf, *args, cwd=directory, live=True, handle_exit=_handle_exit)
         else:
             out = self.exec(
                 elf, *args, cwd=directory, live=False, print_func=lambda *args, **kwargs: None, handle_exit=_handle_exit

Check failure on line 315 in /home/runner/work/mlonmcu/mlonmcu/mlonmcu/target/riscv/vicuna.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/mlonmcu/mlonmcu/mlonmcu/target/riscv/vicuna.py#L305-L315

             if temp is None:
                 temp = code
             if handle_exit is not None:
                 temp = handle_exit(temp, out=out)
             return temp
+
         if self.print_outputs:
             self.prepare_simulator(cwd=directory, live=True)
         else:
             self.prepare_simulator(cwd=directory, live=False, print_func=lambda *args, **kwargs: None)
         simulation_start = time.time()

Check failure on line 793 in /home/runner/work/mlonmcu/mlonmcu/mlonmcu/session/run.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/mlonmcu/mlonmcu/mlonmcu/session/run.py#L780-L793

                     codegen_dir, self.target
                 )  # TODO: has to go into different dirs
                 # artifacts = self.compile_platform.artifacts
                 if isinstance(artifacts, dict):
                     new = {
-                        key
-                        if name in ["", "default"]
-                        else (f"{name}_{key}" if key not in ["", "default"] else name): value
+                        (
+                            key
+                            if name in ["", "default"]
+                            else (f"{name}_{key}" if key not in ["", "default"] else name)
+                        ): value
                         for key, value in artifacts.items()
                     }
                 else:
                     new = {name if name in ["", "default"] else f"{name}": artifacts}
                 self.artifacts_per_stage[RunStage.COMPILE].update(new)

Check failure on line 37 in /home/runner/work/mlonmcu/mlonmcu/scripts/gen_tflmc_benchmarks.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/mlonmcu/mlonmcu/scripts/gen_tflmc_benchmarks.py#L21-L37

 
     def post_session(self, report):
         """Called at the end of a session."""
         df = report.post_df.copy()
         df["Kernels"] = df.apply(
-            lambda row: "muRISCV-NN"
-            if row.get("feature_muriscvnn") or row.get("feature_muriscvnnbyoc")
-            else (
-                "CMSIS-NN"
-                if row.get("feature_cmsisnn") or row.get("feature_cmsisnnbyoc")
-                else ("Autotuned" if row.get("feature_autotuned") else "Default")
+            lambda row: (
+                "muRISCV-NN"
+                if row.get("feature_muriscvnn") or row.get("feature_muriscvnnbyoc")
+                else (
+                    "CMSIS-NN"
+                    if row.get("feature_cmsisnn") or row.get("feature_cmsisnnbyoc")
+                    else ("Autotuned" if row.get("feature_autotuned") else "Default")
+                )
             ),
             axis=1,
         )
         report.post_df = df
 

Check failure on line 56 in /home/runner/work/mlonmcu/mlonmcu/scripts/gen_muriscnn_benchmarks.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/mlonmcu/mlonmcu/scripts/gen_muriscnn_benchmarks.py#L23-L56

 
     def post_session(self, report):
         """Called at the end of a session."""
         df = report.post_df.copy()
         df["Kernels"] = df.apply(
-            lambda row: "muRISCV-NN"
-            if row.get("feature_muriscvnn") or row.get("feature_muriscvnnbyoc")
-            else (
-                "CMSIS-NN"
-                if row.get("feature_cmsisnn") or row.get("feature_cmsisnnbyoc")
-                else ("Autotuned" if row.get("feature_autotuned") else "Default")
+            lambda row: (
+                "muRISCV-NN"
+                if row.get("feature_muriscvnn") or row.get("feature_muriscvnnbyoc")
+                else (
+                    "CMSIS-NN"
+                    if row.get("feature_cmsisnn") or row.get("feature_cmsisnnbyoc")
+                    else ("Autotuned" if row.get("feature_autotuned") else "Default")
+                )
             ),
             axis=1,
         )
         # TODO: allow combinations
         df["Extensions"] = df.apply(
-            lambda row: "VEXT+PEXT"
-            if row.get("feature_vext") and row.get("feature_pext")
-            else (
-                "VEXT"
-                if row.get("feature_vext")
+            lambda row: (
+                "VEXT+PEXT"
+                if row.get("feature_vext") and row.get("feature_pext")
                 else (
-                    "PEXT"
-                    if row.get("feature_pext")
+                    "VEXT"
+                    if row.get("feature_vext")
                     else (
-                        "MVEI+DSP"
-                        if row.get("feature_arm_mvei") and row.get("feature_arm_dsp")
-                        else ("MVEI" if row.get("feature_arm_mvei") else ("DSP" if row.get("feature_arm_dsp") else ""))
+                        "PEXT"
+                        if row.get("feature_pext")
+                        else (
+                            "MVEI+DSP"
+                            if row.get("feature_arm_mvei") and row.get("feature_arm_dsp")
+                            else (
+                                "MVEI" if row.get("feature_arm_mvei") else ("DSP" if row.get("feature_arm_dsp") else "")
+                            )
+                        )
                     )
                 )
             ),
             axis=1,
         )

Check failure on line 7 in /home/runner/work/mlonmcu/mlonmcu/tests/integration-tests/toolchains/test_riscv_llvm.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/mlonmcu/mlonmcu/tests/integration-tests/toolchains/test_riscv_llvm.py#L1-L7

 """Test used RISC-V GCC Toolchains"""
+
 # import pytest
 
 # from mlonmcu.environment.config import PathConfig
 # from mlonmcu.session.run import RunStage
 # from mlonmcu.target.riscv.riscv import RISCVTarget

Check failure on line 49 in /home/runner/work/mlonmcu/mlonmcu/scripts/gen_tvm_riscv_benchmarks.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/mlonmcu/mlonmcu/scripts/gen_tvm_riscv_benchmarks.py#L23-L49

 
     def post_session(self, report):
         """Called at the end of a session."""
         df = report.post_df.copy()
         df["Schedules"] = df.apply(
-            lambda row: "ARM (Tuned)"
-            if row.get("config_tvmaot.target_device", "") == "arm_cpu" and row.get("feature_autotuned")
-            else "ARM"
-            if row.get("config_tvmaot.target_device", "") == "arm_cpu"
-            else "RISC-V (Tuned)"
-            if row.get("feature_target_optimized") and row.get("feature_autotuned")
-            else "RISC-V"
-            if row.get("feature_target_optimized")
-            else ("Default (Tuned)" if row.get("feature_autotuned") else "Default"),
+            lambda row: (
+                "ARM (Tuned)"
+                if row.get("config_tvmaot.target_device", "") == "arm_cpu" and row.get("feature_autotuned")
+                else (
+                    "ARM"
+                    if row.get("config_tvmaot.target_device", "") == "arm_cpu"
+                    else (
+                        "RISC-V (Tuned)"
+                        if row.get("feature_target_optimized") and row.get("feature_autotuned")
+                        else (
+                            "RISC-V"
+                            if row.get("feature_target_optimized")
+                            else ("Default (Tuned)" if row.get("feature_autotuned") else "Default")
+                        )
+                    )
+                )
+            ),
             axis=1,
         )
         # TODO: allow combinations
         df["Extensions"] = df.apply(
-            lambda row: "VEXT+PEXT"
-            if row.get("feature_vext") and row.get("feature_pext")
-            else ("VEXT" if row.get("feature_vext") else ("PEXT" if row.get("feature_pext") else (None))),
+            lambda row: (
+                "VEXT+PEXT"
+                if row.get("feature_vext") and row.get("feature_pext")
+                else ("VEXT" if row.get("feature_vext") else ("PEXT" if row.get("feature_pext") else (None)))
+            ),
             axis=1,
         )
         report.post_df = df
 
 

Check failure on line 7 in /home/runner/work/mlonmcu/mlonmcu/tests/integration-tests/toolchains/test_riscv_gcc.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/mlonmcu/mlonmcu/tests/integration-tests/toolchains/test_riscv_gcc.py#L1-L7

 """Test used RISC-V GCC Toolchains"""
+
 import pytest
 
 # from mlonmcu.session.run import RunStage
 from mlonmcu.testing.riscv_toolchain import (
     _get_target_config,