@@ -109,26 +109,24 @@ end
109
109
@test isa (exp, MLFlowExperiment)
110
110
exprun = createrun (mlf, exp)
111
111
@test isa (exprun, MLFlowRun)
112
- emptyrun = createrun (mlf, exp)
113
- @test_throws SystemError logartifact (mlf, exprun, " /etc/shadow" )
114
-
115
- tmpfiletoupload = " sometempfilename.txt"
116
- f = open (tmpfiletoupload, " w" )
117
- write (f, " samplecontents" )
118
- close (f)
119
- artifactpath = logartifact (mlf, exprun, tmpfiletoupload)
120
- @test isfile (artifactpath)
121
- rm (tmpfiletoupload)
122
- artifactpath = logartifact (mlf, exprun, " randbytes.bin" , b " some rand bytes here" )
123
- @test isfile (artifactpath)
124
-
125
112
# only run the below if artifact_uri is a local directory
126
113
# i.e. when running mlflow server as a separate process next to the testset
127
114
# when running mlflow in a container, the below tests will be skipped
128
115
# this is what happens in github actions - mlflow runs in a container, the artifact_uri is not immediately available, and tests are skipped
129
116
artifact_uri = exprun. info. artifact_uri
130
- @show artifact_uri
131
117
if isdir (artifact_uri)
118
+ @test_throws SystemError logartifact (mlf, exprun, " /etc/shadow" )
119
+
120
+ tmpfiletoupload = " sometempfilename.txt"
121
+ f = open (tmpfiletoupload, " w" )
122
+ write (f, " samplecontents" )
123
+ close (f)
124
+ artifactpath = logartifact (mlf, exprun, tmpfiletoupload)
125
+ @test isfile (artifactpath)
126
+ rm (tmpfiletoupload)
127
+ artifactpath = logartifact (mlf, exprun, " randbytes.bin" , b " some rand bytes here" )
128
+ @test isfile (artifactpath)
129
+
132
130
mkdir (joinpath (artifact_uri, " newdir" ))
133
131
artifactpath = logartifact (mlf, exprun, joinpath (" newdir" , " randbytesindir.bin" ), b " bytes here" )
134
132
artifactpath = logartifact (mlf, exprun, joinpath (" newdir" , " randbytesindir2.bin" ), b " bytes here" )
0 commit comments