-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Error running tvm list command #66
Comments
In version 3.10 of python distutils is deprecated and should be changed to packaging.version. However doing so would yield Traceback (most recent call last):
File "/home/fmo/.local/bin/tvm", line 8, in <module>
sys.exit(main())
File "/home/fmo/.local/lib/python3.10/site-packages/tvm/cli.py", line 40, in main
cli()
File "/home/fmo/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/fmo/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/fmo/.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/fmo/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/fmo/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/fmo/.local/lib/python3.10/site-packages/tvm/cli.py", line 156, in list_versions
version_names = sorted(version_names, reverse=False, key=LooseVersion)
File "/usr/lib/python3/dist-packages/packaging/version.py", line 266, in __init__
raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: 'v14.0.0@tvm_env' |
Hi @felipemontoya, Thank you for reporting this, we will take it into account to be included in the next sprint that starts on March 6, to be analyzed. If you have any additional comments, feel free to post. |
Ey @felipemontoya I'm working on fix this, but I could not replicate the error: I tested in: OS: Ubuntu 22.04 Also, I created some projects:
and I don't have problems when I run the command "tvm list". |
@felipemontoya Let me know if you still have problems with this, and if you have more information to I try replicate the error. |
I know that to solve it, what I did was comment out this line: Something about LooseVersion did not want to compare strings to numbers. We could wrap the line in a try-catch to fix it. |
However in order to reach that I kinda messed up my dependencies. In the process of fixing that I decided I would rather udpate my linux and delete the ~/.tvm dir. |
I don't want to add an try except just for an isolated case, maybe is just a dependency in your computer so I want to find what is the real problem and not apply a hot fix.
|
Absolutly. The try catch should be only if we can reproduce the error. @Alec4r could you run one last test. try to create a project named with a number. I think the |
It works! I mean, it fails! Steps to reproduce:
|
I tested in: with this command and I don't have problems v14.2.2 (active)
v14.2.2@2022_dec
v14.2.3
v15.0.0
v15.0.0@survey_report
v15.1.0
v15.1.0@my-mango
v15.1.0@olmo |
And its fixed again with |
I tested in: with this command and I don't have problems v14.2.2
v14.2.2@2022_dec
v14.2.3
v15.0.0
v15.0.0@survey_report
v15.1.0
v15.1.0@my-mango
v15.1.0@olmo
v15.2.0
v15.3.0
v15.3.1 (active)
v15.3.1@2023 |
Oh wow. Im running:
|
I can't replicate this error. |
I don't know what happened these previous two weeks, but the tvm list fails me with the same Felipe's error. Traceback (most recent call last):
File "/home/edunext/.local/bin/tvm", line 8, in <module>
sys.exit(main())
File "/home/edunext/.local/lib/python3.10/site-packages/tvm/cli.py", line 40, in main
cli()
File "/home/edunext/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/edunext/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/edunext/.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/edunext/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/edunext/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/edunext/.local/lib/python3.10/site-packages/tvm/cli.py", line 145, in list_versions
version_names = sorted(version_names, reverse=False, key=LooseVersion)
File "/usr/lib/python3.10/distutils/version.py", line 52, in __lt__
c = self._cmp(other)
File "/usr/lib/python3.10/distutils/version.py", line 341, in _cmp
if self.version < other.version:
TypeError: '<' not supported between instances of 'int' and 'str' |
I created a Jira card to check this again. Link: https://edunext.atlassian.net/browse/DS-503 |
@felipemontoya @MaferMazu thanks, we are planning add this to our next sprint, so I hope have good news for you soon. |
I formatted my computer, and I can't replicate this error anymore. Right now works well, and I have:
Interesting note: starting from Python 3.10, distutils has been declared as deprecated in favor of setuptools. |
I have replicated the error mentioned in this issue on my local environment. Here are the details of my environment settings:
Error details
Note: I previously created a project named '2023-test' with the same tutor version, and I had no issues |
Still an issue in in
|
hey, I hope you all are doing great. I am passing here (sorry for the delay) to inform you that this issue was addressed and the solution involved two main changes:
If you would like more details, please go to the changes applied with PR #68. Thank you ✨ |
Describe the bug
When running
tvm list
the sorting function at https://github.com/eduNEXT/tvm/blob/main/tvm/cli.py#L145 fails because the local_versions are reported asv13.3.1@my-mango
and this conflicts with the distutils.version.LooseVersion key.To Reproduce
Steps to reproduce the behavior:
0. Have many installed versions of tutor.
tvm list
Expected behavior
I would expect the list of available versions to show up.
Desktop (please complete the following information):
Additional context
This is the current list of installations that I have and that fail.
The text was updated successfully, but these errors were encountered: