-
Notifications
You must be signed in to change notification settings - Fork 10
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
Added dev. container #38
Conversation
13e7afe
to
5fac59d
Compare
Updated wrt. v0.4.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stemann Thanks for this contribution.
I don't understand the .devcontainer business. I guess this is Windows-specific?
However, the other changes indeed address #31 from my point-of-view (have tested this).
@pebeto @deyandyankov Can one of you comment on the addition of the .devcontainer folder?
@stemann If we don't get a response in the next week or so, please ping.
Hi. By the addition of The |
src/types/mlflow.jl
Outdated
@@ -31,5 +31,5 @@ struct MLFlow | |||
headers::Dict | |||
end | |||
MLFlow(baseuri; apiversion=2.0,headers=Dict()) = MLFlow(baseuri, apiversion,headers) | |||
MLFlow() = MLFlow("http://localhost:5000", 2.0, Dict()) | |||
MLFlow() = MLFlow(ENV["MLFLOW_URI"], 2.0, Dict()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't consider this as a way to go. The default location must be the mlflow
default location (http://localhost:5000
).
MLFlowClient.jl
is just a communication layer, directly related to mlflow
and not to MLJ
. Everything related to MLJ
must be applied in MLJFlow.jl
. However, the way of adding ENV["MLFLOW_URI"]
in terms of testing is correct, and discussed and implemented in JuliaAI/MLJFlow.jl#30.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default URI is only http://localhost:5000
if running an MLFlow instance on localhost:5000 - this is not the case if running in a docker-compose set-up, and not the case in a GitLab CI context - just to mention a few examples.
But this part of the change was indeed a bit half-baked. Querying the env. var without checking if the env. var. is set is definitely bad. But I would argue that the implementation should use an env. var. if one such is set.
The Python API seems to query the env. var MLFLOW_TRACKING_URI
if no tracking_uri
is provided:
- https://github.com/mlflow/mlflow/blob/v2.11.3/mlflow/tracking/client.py#L92
- https://github.com/mlflow/mlflow/blob/v2.11.3/mlflow/tracking/_tracking_service/utils.py#L88-L117
- https://github.com/mlflow/mlflow/blob/v2.11.3/mlflow/environment_variables.py#L81
- https://mlflow.org/docs/latest/getting-started/logging-first-model/step2-mlflow-client.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the info. We need to ensure that the end-user will get a fully working environment as default. That's why we define mlflow
default URI and port. If the end-user changes those values or uses GitLab CI endpoints, that's something the end-user need to be aware of. That's not our business.
Please don't use MLFLOW_URI
and rename it into MLFLOW_TRACKING_URI
to match names. Also, as you mention, a check is needed. It can be something like:
MLFlow() = MLFlow(
haskey(ENV, "MLFLOW_TRACKING_URI") ? ENV["MLFLOW_TRACKING_URI"] : "http://localhost:5000",
2.0, Dict())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dev. container was primarily intended for running locally (on any platform) - it enables VS Code (and other editors?) to open a dev. env. - in this case with a running MLFlow instance - ready for running tests. |
5fac59d
to
56479a5
Compare
@pebeto Awaiting approval for tests to run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Contributes to #31 - notably by changing default URI to be ENV["MLFLOW_URI"] instead of http://localhost:5000