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 client - SyntaxError #551

Closed
Sharathmk99 opened this issue May 8, 2019 · 10 comments
Closed

Python client - SyntaxError #551

Sharathmk99 opened this issue May 8, 2019 · 10 comments

Comments

@Sharathmk99
Copy link

Hi,

I'm using python3
python3 --version
Python 3.5.2

I installed seldon-core using
pip3 install seldon-core

When i try using seldon-core-tester, i'm getting SyntaxError. Please find below complete error,
Traceback (most recent call last): File "/home/seldon/.local/bin/seldon-core-tester", line 7, in <module> from seldon_core.microservice_tester import main File "/home/seldon/.local/lib/python3.5/site-packages/seldon_core/microservice_tester.py", line 60 raise SeldonTesterException(f"Unknown dtype in reconciliate_cont_type {dtype}") ^ SyntaxError: invalid syntax seldon@mlseldon:~/seldon-test$ python3 /home/seldon/.local/lib/python3.5/site-packages/seldon_core/microservice_tester.py File "/home/seldon/.local/lib/python3.5/site-packages/seldon_core/microservice_tester.py", line 60 raise SeldonTesterException(f"Unknown dtype in reconciliate_cont_type {dtype}") ^ SyntaxError: invalid syntax

@jklaise
Copy link
Contributor

jklaise commented May 8, 2019

What is the full command you're calling including all arguments? Also do you have the latest version of the pip package (0.2.7)?

@Sharathmk99
Copy link
Author

I checked the version of pip its,
pip 19.1.1

@jklaise
Copy link
Contributor

jklaise commented May 9, 2019

Sorry, I meant the seldon_core package from pip. Also it would be helpful to have the full command with arguments to see why it failed.

@Sharathmk99
Copy link
Author

Yes its 0.2.7
seldon-core 0.2.7

@jklaise
Copy link
Contributor

jklaise commented May 9, 2019

What is the full command you used?

@ghost
Copy link

ghost commented May 21, 2019

getting the same error here

@jklaise
Copy link
Contributor

jklaise commented May 21, 2019

@arun-muthy @Sharathmk99 looks like you haven't set the correct dtype in the contract.json, it has to be one of FLOAT or INT, if you're trying to test string or binary data it won't work:

if dtype == "FLOAT":
return feature
elif dtype == "INT":
return (feature + 0.5).astype(int).astype(float)
else:
raise SeldonTesterException(f"Unknown dtype in reconciliate_cont_type {dtype}")

@ghost
Copy link

ghost commented May 24, 2019

@jklaise thanks for that.. i'll see what i'm working with

@ghost
Copy link

ghost commented May 24, 2019

still no luck, i'm going through examples provided by seldon, here's the json: https://github.com/SeldonIO/seldon-core/blob/master/examples/models/sklearn_iris/contract.json

@ukclivecox
Copy link
Contributor

Is this still an issue @arun-muthy Please reopen if it is.

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

3 participants