Skip to content

Fix Py 2 to 3 encoding errors#410

Open
vbhavank wants to merge 2 commits intomasterfrom
Py2to3fix
Open

Fix Py 2 to 3 encoding errors#410
vbhavank wants to merge 2 commits intomasterfrom
Py2to3fix

Conversation

@vbhavank
Copy link
Copy Markdown
Collaborator

@vbhavank vbhavank commented Jul 7, 2020

This merges changes made to path encodings in Caffe descriptor generator and fixed error during file upload.

@vbhavank vbhavank requested a review from Purg July 7, 2020 17:54
@lgtm-com
Copy link
Copy Markdown

lgtm-com Bot commented Jul 7, 2020

This pull request introduces 1 alert when merging 13060fb into 9697837 - view on LGTM.com

new alerts:

  • 1 for Unused import

self._log.debug("Initializing network")
self._log.debug("Loading Caffe network from network/model configs")
self.network = caffe.Net(self.network_prototxt.write_temp(),
self.network = caffe.Net(self.network_prototxt,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.network_prototxt here, as well as self.network_model below, should be DataElement instances at this stage. I believe Caffe 1 wanted filepaths here, thus the previous write_temp() calls. Is this not the case any more? I realize that the caffe 1 generator might be getting a little stale at this point.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still seems to accept a string as input. I can change the documentation in Linehttps://github.com/Kitware/SMQTK/blob/654f69e0db89ce7b0a2fd13b27ef503ed4523e6b/python/smqtk/algorithms/descriptor_generator/caffe_descriptor.py#L58 to string and the setstate function to reflect the same. Please let me know if you think that sounds right.

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.

2 participants