Giter VIP home page Giter VIP logo

mlflow-rs's People

Contributors

luleyleo avatar nikitavbv avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

mlflow-rs's Issues

TrackingRun cannot be used to track metrics continuously

Looking at how TrackingRun is implemented, I noticed that there is no way to use it continuously, and the only supported way is to log all the collected metrics once by calling submit.

If I have some long-running training job and want it to submit metrics while it is still running (instead of receiving all metrics in one batch once it is finished), I am forced to call the client directly instead of using TrackingRun.

One way to fix that is to make submit() take &mut self instead of self, create run only if it has not been created before, and clean metric buffer after sending. Also, add a function finish() to mark that the run is finished.

What do you think? If you like the idea, I will be glad to send a PR implementing it.

Sending request body inside GET requests causes issues when using with reverse proxy

Hi! First of all, thank you for working on this crate.

I have noticed that getting an experiment by name fails with a 400 error for me. In other words, I am doing something as simple as:

client.get_experiment_by_name(experiment_name)

And getting a response which looks like this:

Err(Storage(Unknown 400 error:
<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 400 (Bad Request)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
  </style>
  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
  <p><b>400.</b> <ins>That’s an error.</ins>
  <p>Your client has issued a malformed or illegal request.  <ins>That’s all we know.</ins>
))

After a quick troubleshooting session, I figured out that I don't get this error with MLflow instance running locally, but I do get the error above when working with MLflow instance deployed to Google Cloud Run.

That is quite easy to explain: Google Cloud Run uses a reverse proxy, which forwards all the requests to the actual container. And if I understood correctly from the way GetExperimentByName is implemented, this crate sends a message body inside the request body. While that is something that is not prohibited by HTTP spec, some proxy implementations reject some requests (as Google Frontend proxy does in my case) and it is usually advised to avoid sending request body when using GET (see here).

I tried hacking execute method a bit to use query params and seems that it works fine that way.

The proposed fix for this is to switch to query params for all GET requests. What do you think?

Check for doublicated prams and tags.

If you accidentally log two parameters with the same name, MLFlow will simply throw a 500 Internal Server Error with no additional information.

To catch this, it would be great if TrackingRun checked those.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.