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

Added dev. container #38

Merged
merged 2 commits into from
Apr 15, 2024
Merged

Added dev. container #38

merged 2 commits into from
Apr 15, 2024

Conversation

stemann
Copy link
Contributor

@stemann stemann commented Jan 29, 2024

Contributes to #31 - notably by changing default URI to be ENV["MLFLOW_URI"] instead of http://localhost:5000

@stemann stemann marked this pull request as ready for review January 29, 2024 19:32
@stemann stemann force-pushed the feature/devcontainer branch from 13e7afe to 5fac59d Compare April 8, 2024 18:46
@stemann
Copy link
Contributor Author

stemann commented Apr 8, 2024

Updated wrt. v0.4.6

Copy link
Member

@ablaom ablaom left a 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.

@pebeto
Copy link
Member

pebeto commented Apr 9, 2024

Hi.

By the addition of .devcontainer, you are configuring a Github Codespace. Please expand about the usage, because we need to understand your modifications.

The MLFLOW_URI doesn't need to be applied as a default value in MLFlow construct. It was just applied to the test.

@pebeto pebeto self-requested a review April 9, 2024 02:33
@pebeto pebeto added the enhancement New feature or request label Apr 9, 2024
@@ -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())
Copy link
Member

@pebeto pebeto Apr 9, 2024

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.

Copy link
Contributor Author

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:

Copy link
Member

@pebeto pebeto Apr 9, 2024

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())

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@stemann
Copy link
Contributor Author

stemann commented Apr 9, 2024

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.

@stemann stemann force-pushed the feature/devcontainer branch from 5fac59d to 56479a5 Compare April 15, 2024 06:34
@stemann
Copy link
Contributor Author

stemann commented Apr 15, 2024

@pebeto Awaiting approval for tests to run.

@stemann stemann requested a review from pebeto April 15, 2024 08:54
Copy link
Member

@pebeto pebeto left a comment

Choose a reason for hiding this comment

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

lgtm

@pebeto pebeto merged commit 46b521d into JuliaAI:main Apr 15, 2024
3 checks passed
@stemann stemann deleted the feature/devcontainer branch April 15, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants