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

python cli detect imgmanip -o appears not to follow osrc/otarg map #41

Open
xkortex opened this issue Jul 14, 2020 · 0 comments
Open

python cli detect imgmanip -o appears not to follow osrc/otarg map #41

xkortex opened this issue Jul 14, 2020 · 0 comments

Comments

@xkortex
Copy link

xkortex commented Jul 14, 2020

If I understand the spec correctly, the client should always see paths which make sense relative to its own bindmounts; likewise the server should see only valid paths to the server's mounts. That should mean that all URIs on the proto wire are with respect to the server, since all translation is handled in cli.py.

Here is what I currently observe:

client = MediforClient(src='/tmp/CLI', targ='/tmp/SERV', )
req = ImageManipulationRequest(image={'uri': '/tmp'})
resp = client.img_manip('/tmp/CLI/in/hi.txt', '/tmp/CLI/out')
print('_________')
print('I am Client. I see Response:\n {}'.format(resp))

Out:

I am Server. I see Request:
 request_id: "d1de5fa4-c3ea-4068-a8e5-7b91036aa94e"
image {
  uri: "/tmp/SERV/in/hi.txt"
}
out_dir: "/tmp/SERV/out"

_________
I am Client. I see Response:
 localization {
  mask {
    uri: "/tmp/SERV/in/hi.txt.d"
  }
}

However, what I expect is:

I am Server. I see Request:
 request_id: "60c2c38a-8a28-4fa3-b724-861ac296fddb"
image {
  uri: "/tmp/SERV/in/hi.txt"
}
out_dir: "/tmp/SERV/out"

_________
I am Client. I see Response:
 localization {
  mask {
    uri: "/tmp/CLI/in/hi.txt.d"
  }
}

It would appear there is code somewhat like this missing in mediforclient.py:img_manip, mediforclient.py:vid_manip, and perhaps elsewhere :

        out_uri = self.o_unmap(resp.localization.mask.uri)
xkortex added a commit to xkortex/medifor-lite that referenced this issue Jul 22, 2020
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

No branches or pull requests

1 participant