Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fix TabError for Python 3 #11669

Merged
merged 1 commit into from
Jul 13, 2018
Merged

Fix TabError for Python 3 #11669

merged 1 commit into from
Jul 13, 2018

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Jul 12, 2018

TabError: inconsistent use of tabs and spaces in indentation is treated as a syntax error in Python 3.

./example/reinforcement-learning/ddpg/strategies.py:65:39: E999 TabError: inconsistent use of tabs and spaces in indentation
        action = policy.get_action(obs)
                                      ^

TabError: inconsistent use of tabs and spaces in indentation is treated as a syntax error in Python 3.
```
./example/reinforcement-learning/ddpg/strategies.py:65:39: E999 TabError: inconsistent use of tabs and spaces in indentation
        action = policy.get_action(obs)
                                      ^
```
@cclauss cclauss requested a review from szha as a code owner July 12, 2018 16:08
@marcoabreu
Copy link
Contributor

marcoabreu commented Jul 12, 2018

@simoncorstonoliver @ThomasDelteil any chance you guys can squeeze in example validation together with the tutorial validation? We're having a lot of problems in our examples that are hidden because we don't test them. This causes a quite bad first use experience.

@ThomasDelteil
Copy link
Contributor

@marcoabreu that's a great idea. However examples have a very big variance in terms of code quality compared to tutorials, a lot of them would need a major rewrite in the process of being made testable. That's definitely something I would like to do at some point but the scale of it significantly larger than tutorials. (1)3 reasons why:

  • Examples usually come with a bunch of arguments and problems are usually due to conflicting choices of script argument.
  • Examples can come with a lot of dependencies, sometimes on dataset download, external resources that are most of the times not automated through code at the moment
  • Examples are sometimes not end to end scripts but provide several utilities to achieve a specific task
    One thing we could do to make it more manageable is to survey them all, split them into manageable tasks and try to get a community push to resolve such tasks and increase the overall quality and have a more unified feel for our examples.
    We are currently going through the backlog of "Examples" "HowTo" "Question" "Docs" issues and aiming to close virtually all of them by the end of this quarter.

@marcoabreu
Copy link
Contributor

Excellent, thanks a lot for this detailed answer! This definitely sounds like a good approach, do you think it would be possible to request adding it to your teams long term planning - maybe as part of Q3 and the efforts to resolve the example related issues? I think a lot of these issues are based on the fact that we don't have proper test coverage for them.

We could basically start with an example and create a small guide. Then we'd make a quick sprint where everybody takes one example and adds it to CI in accordance with your instructions.

@ThomasDelteil
Copy link
Contributor

@marcoabreu can't really speak on behalf of @simoncorstonoliver but I think we have already planed out Q3 in terms of resource allocation so that might need to wait for Q4, and Q3 will focus on resolving outstanding problems that have been reported through the community github issues and questions on the forum, before moving to automated testing. That will depends also on how fast we can go through the backlog of issues while keeping up with the new ones that arise 😄

@cclauss
Copy link
Contributor Author

cclauss commented Jul 13, 2018

@marcoabreu @ThomasDelteil Can you please review ("Files changed" --> "Review changes") this change because the goal of this PR is to make a simple whitespace-only change that is easy to review. However, much text has been written above that will cause reviewers to pause.

@marcoabreu
Copy link
Contributor

Sorry, we just waited for CI to pass :)

@marcoabreu marcoabreu merged commit f22ae1d into apache:master Jul 13, 2018
@cclauss cclauss deleted the patch-2 branch July 13, 2018 08:36
@simoncorstonoliver
Copy link
Contributor

@marcoabreu a good starting point point might be a review of the examples to see which ones properly belong in the repo. Some might be better as a blog posts with independent repo rather than something that is considered an integral part of the repo for the framework.

We spent time in Nov 2017 to ensure they all worked -- it proved to be more effort than we anticipated. So let's put it on the to-do list for consideration for Q4.

Alternatively of course we're flagging issues as needing attention from new contributors. Some examples might benefit from attention from new contributors with expertise in specific fields.

XinYao1994 pushed a commit to XinYao1994/incubator-mxnet that referenced this pull request Aug 29, 2018
TabError: inconsistent use of tabs and spaces in indentation is treated as a syntax error in Python 3.
```
./example/reinforcement-learning/ddpg/strategies.py:65:39: E999 TabError: inconsistent use of tabs and spaces in indentation
        action = policy.get_action(obs)
                                      ^
```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants