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

Bind "prediction.py" to /prediction #4

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

Conversation

aslakknutsen
Copy link

Description

README and QuickStart are referring to /prediction, not /predictions

!curl -X POST -H "Content-Type: application/json" --data '{"data": "hello world"}' http://localhost:5000/prediction

https://github.com/opendatahub-io/odh-manifests/blob/78085dd5e4e58b1b9ce66705894cbb0c0bbf1f8c/odh-dashboard/apps/jupyter/deploy-python-model-quickstart.yaml#L72

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

README and QuickStart are referring to /prediction, not /predictions
@LaVLaS LaVLaS requested a review from cfchase March 31, 2023 14:24
@@ -11,7 +11,7 @@ def status():
return jsonify({'status': 'ok'})


@application.route('/predictions', methods=['POST'])
@application.route('/prediction', methods=['POST'])
Copy link
Member

Choose a reason for hiding this comment

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

can we just add the route?

@application.route('/prediction', methods=['POST'])
@application.route('/predictions', methods=['POST'])

@adelton
Copy link

adelton commented Sep 15, 2023

Running

$ git grep /prediction
0_start_here.ipynb:    "!curl -X POST -H \"Content-Type: application/json\" --data '{\"data\": \"hello world\"}' http://localhost:5000/predictions\n"
0_start_here.ipynb:    "response = requests.post('http://127.0.0.1:5000/predictions', '{\"hello\":\"world\"}')\n",
2_test_flask.ipynb:    "!curl -X POST -H \"Content-Type: application/json\" --data '{\"data\": \"hello world\"}' http://localhost:5000/predictions"
2_test_flask.ipynb:    "response = requests.post('http://127.0.0.1:5000/predictions', '{\"hello\":\"world\"}')\n",
README.md:!curl -X POST -H "Content-Type: application/json" --data '{"data": "hello world"}' http://localhost:5000/prediction
README.md:!curl -X POST -H "Content-Type: application/json" --data '{"data": "hello world"}' http://rhods-project.apps.cluster/prediction
wsgi.py:@application.route('/predictions', methods=['POST'])

indicates that /predictions is used everywhere except in the README.md. So I'd just propose to fix that.

@adelton
Copy link

adelton commented Sep 15, 2023

I've filed #10 now as the alternative fix.

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.

3 participants