Skip to content

Commit fecf87a

Browse files
committed
Reverting from MLFLOW_API_URI to MLFLOW_TRACKING_URI, allowing compatibility with mlflow ENV standard
1 parent b98cb57 commit fecf87a

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- uses: julia-actions/julia-buildpkg@v1
5151
- uses: julia-actions/julia-runtest@v1
5252
env:
53-
MLFLOW_API_URI: "http://localhost:5000/api"
53+
MLFLOW_TRACKING_URI: "http://localhost:5000/api"
5454
- uses: julia-actions/julia-processcoverage@v1
5555
- uses: codecov/codecov-action@v2
5656
with:

src/types/mlflow.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Default is `false`, using the REST API endpoint.
1212
# Constructors
1313
1414
- `MLFlow(apiroot; apiversion=2.0,headers=Dict())`
15-
- `MLFlow()` - defaults to `MLFlow(ENV["MLFLOW_API_URI"])` or `MLFlow("http://localhost:5000")`
15+
- `MLFlow()` - defaults to `MLFlow(ENV["MLFLOW_TRACKING_URI"])` or `MLFlow("http://localhost:5000/api")`
1616
1717
# Examples
1818
@@ -34,8 +34,8 @@ end
3434
MLFlow(apiroot; apiversion=2.0, headers=Dict()) = MLFlow(apiroot, apiversion, headers)
3535
function MLFlow()
3636
apiroot = "http://localhost:5000/api"
37-
if haskey(ENV, "MLFLOW_API_URI")
38-
apiroot = ENV["MLFLOW_API_URI"]
37+
if haskey(ENV, "MLFLOW_TRACKING_URI")
38+
apiroot = ENV["MLFLOW_TRACKING_URI"]
3939
end
4040
return MLFlow(apiroot)
4141
end

test/base.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function mlflow_server_is_running(mlf::MLFlow)
1313
end
1414

1515
# creates an instance of mlf
16-
# skips test if mlflow is not available on default location, ENV["MLFLOW_API_URI"]
16+
# skips test if mlflow is not available on default location, ENV["MLFLOW_TRACKING_URI"]
1717
macro ensuremlf()
1818
e = quote
1919
mlf = MLFlow()

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
if ~haskey(ENV, "MLFLOW_API_URI")
2-
error("WARNING: MLFLOW_API_URI is not set. To run this tests, you need to set the URI of your MLFlow server API")
1+
if ~haskey(ENV, "MLFLOW_TRACKING_URI")
2+
error("WARNING: MLFLOW_TRACKING_URI is not set. To run this tests, you need to set the URI of your MLFlow server API")
33
end
44

55
include("base.jl")

test/test_functional.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@testset "MLFlow" begin
22
mlf = MLFlow()
3-
@test mlf.apiroot == ENV["MLFLOW_API_URI"]
3+
@test mlf.apiroot == ENV["MLFLOW_TRACKING_URI"]
44
@test mlf.apiversion == 2.0
55
@test mlf.headers == Dict()
66
mlf = MLFlow("https://localhost:5001/api", apiversion=3.0)

0 commit comments

Comments
 (0)