You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/07/16 03:42:18 UTC

[GitHub] [tvm] guberti opened a new pull request, #12114: [microTVM] Arduino retry on flash failure

guberti opened a new pull request, #12114:
URL: https://github.com/apache/tvm/pull/12114

   Previously, the `flash` function would sometimes lock up indefinitely without failing, stalling for hours or more. This pull request changes it to have a 60-second timeout (more than enough time to upload a sketch), and adds the ability to retry the command if it fails.
   
   This pull request also adds a unit test for this functionality, and also makes a few changes to `microtvm_api_server.py` to better comply with `pylint`. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] guberti commented on pull request #12114: [microTVM] Arduino retry on flash failure

Posted by GitBox <gi...@apache.org>.
guberti commented on PR #12114:
URL: https://github.com/apache/tvm/pull/12114#issuecomment-1194400312

   Oops, this totally slipped my mind. Thanks for the change @gromero !


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] gromero commented on pull request #12114: [microTVM] Arduino retry on flash failure

Posted by GitBox <gi...@apache.org>.
gromero commented on PR #12114:
URL: https://github.com/apache/tvm/pull/12114#issuecomment-1194198652

   @guberti FYI I've just created https://github.com/apache/tvm/pull/12175 fixing the f-strings since I'm using it for some tests regarding the tvm-bot on merge.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] areusch merged pull request #12114: [microTVM] Arduino retry on flash failure

Posted by GitBox <gi...@apache.org>.
areusch merged PR #12114:
URL: https://github.com/apache/tvm/pull/12114


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] guberti commented on pull request #12114: [microTVM] Arduino retry on flash failure

Posted by GitBox <gi...@apache.org>.
guberti commented on PR #12114:
URL: https://github.com/apache/tvm/pull/12114#issuecomment-1190351138

   Oops - nice catch @gromero! I'll send a follow up to fix that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] gromero commented on pull request #12114: [microTVM] Arduino retry on flash failure

Posted by GitBox <gi...@apache.org>.
gromero commented on PR #12114:
URL: https://github.com/apache/tvm/pull/12114#issuecomment-1189599755

   @guberti Thanks for the enhancement, I remember facing this issue sometimes in my setup in the past. The changes LGTM (although already merged by @areusch -- he merged right when I was about to finish the review lol, but no worries since you tagged me 4 days ago so fair enough! heh). The only thing I think that needs to get fixed on a follow-on PR are these two f-strings here:
   
   ```
   diff --git a/apps/microtvm/arduino/template_project/microtvm_api_server.py b/apps/microtvm/arduino/template_project/microtvm_api_server.py
   index 053acefa3..047164eff 100644
   --- a/apps/microtvm/arduino/template_project/microtvm_api_server.py
   +++ b/apps/microtvm/arduino/template_project/microtvm_api_server.py
   @@ -495,12 +495,12 @@ class Handler(server.ProjectAPIHandler):
                # be caught.
                except subprocess.TimeoutExpired:
                    _LOG.warning(
   -                    "Upload attempt to port {port} timed out after {self.FLASH_TIMEOUT_SEC} seconds"
   +                    f"Upload attempt to port {port} timed out after {self.FLASH_TIMEOUT_SEC} seconds"
                    )
    
            else:
                raise RuntimeError(
   -                "Unable to flash Arduino board after {self.FLASH_MAX_RETRIES} attempts"
   +                f"Unable to flash Arduino board after {self.FLASH_MAX_RETRIES} attempts"
                )
    
        def open_transport(self, options):
   ```
   Cheers.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] gromero commented on pull request #12114: [microTVM] Arduino retry on flash failure

Posted by GitBox <gi...@apache.org>.
gromero commented on PR #12114:
URL: https://github.com/apache/tvm/pull/12114#issuecomment-1190357057

   > Oops - nice catch @gromero! I'll send a follow up to fix that.
   
   @guberti ok! tag me on the PR and this time I promise I'll be quicker on reviewing it :) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org