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

Make client auto choose prediction endpoint #425

Merged
merged 1 commit into from
Aug 26, 2019
Merged

Make client auto choose prediction endpoint #425

merged 1 commit into from
Aug 26, 2019

Conversation

milesgranger
Copy link
Contributor

@milesgranger milesgranger commented Aug 21, 2019

Will close #400

Problem

We use to have to manually specify prediction_path to Client for either /prediction or /anomaly/prediction

Solution

Now that we are returning 422 status code if the model being served is not an AnomalyDetector, the client can default to /anomaly/prediction and when it gets a 422 can update its prediction_path to /prediction instead for all future requests.

@milesgranger milesgranger reopened this Aug 22, 2019
@milesgranger milesgranger changed the title [WIP] Make client auto choose prediction endpoint Make client auto choose prediction endpoint Aug 22, 2019
@milesgranger milesgranger requested a review from epa095 August 22, 2019 10:03
@codecov
Copy link

codecov bot commented Aug 23, 2019

Codecov Report

Merging #425 into master will decrease coverage by 0.27%.
The diff coverage is 52.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #425      +/-   ##
==========================================
- Coverage   89.23%   88.96%   -0.28%     
==========================================
  Files          52       52              
  Lines        2332     2347      +15     
==========================================
+ Hits         2081     2088       +7     
- Misses        251      259       +8
Impacted Files Coverage Δ
gordo_components/client/io.py 77.41% <40%> (-4.07%) ⬇️
gordo_components/client/client.py 82.27% <57.14%> (-2.76%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdaa851...1074009. Read the comment docs.

Copy link
Contributor

@epa095 epa095 left a comment

Choose a reason for hiding this comment

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

LGTM, but remember to change commit message!
And then you are allowed to use your mighty admin privileges to ignore the test-checks.

@milesgranger milesgranger merged commit 6690160 into equinor:master Aug 26, 2019
@milesgranger milesgranger deleted the client-auto-choose-endpoint branch August 26, 2019 13:41
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.

Update client to auto-choose endpoint
2 participants