Skip to content
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

2to3 converted FRED2 package #226

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

apeltzer
Copy link

@apeltzer apeltzer commented May 8, 2019

This is an automatically converted package using the Python2 to 3 convertor:

2to3 --output-dir=python3-version/mycode -W -n python2-version/mycode

Following issues remain:

@apeltzer apeltzer mentioned this pull request May 8, 2019
@apeltzer
Copy link
Author

apeltzer commented May 8, 2019

Okay, after manually compiling the pysvmlight project with the version 0.4 specified in the above mentioned repository, I got FRED2 to work just fine on Python3.7:

Using /Users/alexanderpeltzer/.conda/envs/fred2-py3-test/lib/python3.7/site-packages
Finished processing dependencies for Fred2==2.0.3
alexanderpeltzer@alexanders-mbp ~/I/Fred2> python                                                                                                                                                                          (fred2-py3-test)
Python 3.7.3 | packaged by conda-forge | (default, Mar 27 2019, 15:43:19)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import FRED2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'FRED2'
>>> import Fred2
>>> Fred2.__
Fred2.__all__             Fred2.__dict__            Fred2.__file__            Fred2.__gt__(             Fred2.__le__(             Fred2.__ne__(             Fred2.__reduce__(         Fred2.__sizeof__(
Fred2.__cached__          Fred2.__dir__(            Fred2.__format__(         Fred2.__hash__(           Fred2.__loader__          Fred2.__new__(            Fred2.__reduce_ex__(      Fred2.__spec__
Fred2.__class__(          Fred2.__doc__             Fred2.__ge__(             Fred2.__init__(           Fred2.__lt__(             Fred2.__package__         Fred2.__repr__(           Fred2.__str__(
Fred2.__delattr__(        Fred2.__eq__(             Fred2.__getattribute__(   Fred2.__init_subclass__(  Fred2.__name__            Fred2.__path__            Fred2.__setattr__(        Fred2.__subclasshook__(
>>> Fred2.__
Fred2.__all__             Fred2.__dict__            Fred2.__file__            Fred2.__gt__(             Fred2.__le__(             Fred2.__ne__(             Fred2.__reduce__(         Fred2.__sizeof__(
Fred2.__cached__          Fred2.__dir__(            Fred2.__format__(         Fred2.__hash__(           Fred2.__loader__          Fred2.__new__(            Fred2.__reduce_ex__(      Fred2.__spec__
Fred2.__class__(          Fred2.__doc__             Fred2.__ge__(             Fred2.__init__(           Fred2.__lt__(             Fred2.__package__         Fred2.__repr__(           Fred2.__str__(
Fred2.__delattr__(        Fred2.__eq__(             Fred2.__getattribute__(   Fred2.__init_subclass__(  Fred2.__name__            Fred2.__path__            Fred2.__setattr__(        Fred2.__subclasshook__(
>>> Fred2.__

@b-schubert
Copy link
Contributor

@apeltzer Thanks for doing this! That was long on my wishlist, but I just don't have the time to do it and properly test it. According to the Travis output, there are a lot of conversion issues regarding metaclasses.

Would you be willing to resolve this and also testing the parts manually that cannot be automized (prediction interfaces with third-party software under non-open licenses)

@b-schubert
Copy link
Contributor

With regards to svmlight. See also issue #220. If you find a good library that is not too overblown that can read existing svmlight models and do predictions, that would be ideal!

@apeltzer
Copy link
Author

apeltzer commented May 8, 2019

I can most likely work on updating at least the package pysvmlight to use the Python3 version instead of the python2 version.
Regarding testing, I'll talk about this with @christopher-mohr and we will see this...

@apeltzer
Copy link
Author

apeltzer commented May 8, 2019

Ah that would be quite nice actually 👍

@christopher-mohr
Copy link
Contributor

@apeltzer Thanks for doing this! That was long on my wishlist, but I just don't have the time to do it and properly test it. According to the Travis output, there are a lot of conversion issues regarding metaclasses.

Would you be willing to resolve this and also testing the parts manually that cannot be automized (prediction interfaces with third-party software under non-open licenses)

I can take over the testing of prediction interfaces with third-party software...

@Zethson
Copy link
Contributor

Zethson commented May 8, 2019

@apeltzer I thought about doing this as well, but expected this to be a lot of work since the automatic conversion doesn't always work. Glad to see that it went smoothly so far.

Note that the tool tends to delete any non .py files.
Your commit contains a lot of deleted files.

You could also up the python version in the travis build to see whether or not there are any complains. It seems to run a small test suite. @b-schubert The errors may due to the new 3 code not being 2 and 3 compatible and the travis build still being run on 2.

Glad to be able to use Fred in python 3 soon ;)

@apeltzer
Copy link
Author

apeltzer commented May 9, 2019

Yeah I guess I'll do it once more.

I also double checked the dependencies and it looks like solely the svmlight package is behaving weirdly. There is a version out there already made Python3 compatible but I think having something more reliable would be better SciKit Learn can do the same and should be feasible to be used (+ is much better maintained...)

https://scikit-learn.org/stable/modules/svm.html

@b-schubert
Copy link
Contributor

Any updates on this?

@apeltzer
Copy link
Author

apeltzer commented Jul 4, 2019

Wanted to wait until @Zethson has finished his work (and I don't really have time atm in July/August at all) ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants