question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Troubles I met when trying to update docs

See original GitHub issue

I ran tools/update_doc.sh to update the docs.

I found

  1. (solved by myself in #2478) The version of ONNX schema version has been updated to 11, however, the onnx model has not been uploaded. For example, https://s3.amazonaws.com/download.onnx/models/opset_11/bvlc_alexnet.tar.gz is an invaild url.

    When running tools/update_doc.sh, the urls in data.json are edited to opset 11 (link and link), and are loaded in link. As a result, the process of updating docs cannot succeed.

    The download will be skipped if there are already models of the same name on the disk. This could be the reason why the problem got ignored. However, this problem prevents new contributors from contributing to ONNX.

  2. (Solved by myself in #2050) The script echoes “Please run this script in the ONNX root folder” when “onnx/defs/gen_doc.py” exists.

  3. (Solved by myself in #2050) The script runs python setup.py develop without --user. So the script can only be run as a root user. It’s not the best practice. What’s more, the script will create or edit many files, and they will be all owned by root. As a result, the regular user cannot delete, edit or git add them anymore without running chown manually.

  4. (Unsolved) I got the following error when running onnx/defs/gen_doc.py.

    Traceback (most recent call last): File “/home/daquexian/repos/onnx/onnx/defs/gen_doc.py”, line 350, in <module> main(Args) File “/home/daquexian/repos/onnx/onnx/defs/gen_doc.py”, line 240, in main s += display_schema(schema, [schema]) File “/home/daquexian/repos/onnx/onnx/defs/gen_doc.py”, line 196, in display_schema type_constraint.type_param_str, allowedTypeStr) UnboundLocalError: local variable ‘allowedTypeStr’ referenced before assignment

    After digging into it, I found a strange thing

    Python 3.7.3 (default, Mar 26 2019, 21:43:19)
    [GCC 8.2.1 20181127] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import onnx
    >>> a=onnx.defs.get_all_schemas_with_history()[1]
    >>> a.type_constraints[0].allowed_type_strs
    ['tensor(float)', 'tensor(double)', 'tensor(int64)', 'tensor(int32)']
    >>> a.type_constraints[0].allowed_type_strs
    []
    >>> a.inputs[0].name
    'X'
    >>> a.inputs[0].name
    ''
    

    It is this strange thing that causes the above error. However I don’t know the reason. It only happens when installing onnx by python setup.py install but not installing wheel from pypi. I validated it on both python 3.7 and python 3.6.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:22 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
daquexiancommented, Aug 26, 2019

What’s more, I always have a mess of diff on the generated models after running ./tools/update_doc.sh (screenshot from sublime merge):

image

I believe not only me are suffering from these problems. I’m very curious that how did other people propose their PRs

1reaction
raymondxyangcommented, Jun 7, 2019

I am taking a look… got same issue reported earlier

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Google Docs, Sheets, Slides & Forms error ...
If you get an error message such as "Something went wrong. Reload" or "Unable to load file" preventing you from making edits on...
Read more >
Windows Update Troubleshooter - Microsoft Support
Select Start > Settings > Windows Update > Check for updates and then install any available updates. If the problems aren't all resolved,...
Read more >
iOS update and restore errors - Apple Support
iOS update and restore errors · Try these steps first · Choose your error number or message · Update the software on your...
Read more >
Troubleshoot damaged InDesign documents - Adobe Support
If you're facing this issue with file save, try changing the file name and location. Input/output device issues. InDesign cannot open or save...
Read more >
Troubleshooting - Unity - Manual
If you are still experiencing difficulties, try rebooting your computer as well. Unable to add package from Git URL. See Repository not found....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found