luleyleo / mlflow-rs Goto Github PK
View Code? Open in Web Editor NEWClient library for MLflow logging.
License: MIT License
Client library for MLflow logging.
License: MIT License
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.
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?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.