1
1
"""
2
- createrun(mlf::MLFlow, experiment_id; start_time=missing, tags=missing)
2
+ createrun(mlf::MLFlow, experiment_id; run_name=missing, start_time=missing, tags=missing)
3
3
4
4
Creates a run associated to an experiment.
5
5
@@ -8,27 +8,28 @@ Creates a run associated to an experiment.
8
8
- `experiment_id`: experiment identifier.
9
9
10
10
# Keywords
11
+ - `run_name`: run name. If not specified, MLFlow sets it.
11
12
- `start_time`: if provided, must be a UNIX timestamp in milliseconds. By default, set to current time.
12
13
- `tags`: if provided, must be a key-value structure such as a dictionary.
13
14
14
15
# Returns
15
16
- an instance of type [`MLFlowRun`](@ref)
16
17
"""
17
- function createrun (mlf:: MLFlow , experiment_id; start_time= missing , tags= missing )
18
+ function createrun (mlf:: MLFlow , experiment_id; run_name = missing , start_time= missing , tags= missing )
18
19
endpoint = " runs/create"
19
20
if ismissing (start_time)
20
21
start_time = Int (trunc (datetime2unix (now (UTC)) * 1000 ))
21
22
end
22
- result = mlfpost (mlf, endpoint; experiment_id= experiment_id, start_time= start_time, tags= tags)
23
+ result = mlfpost (mlf, endpoint; experiment_id= experiment_id, run_name = run_name, start_time= start_time, tags= tags)
23
24
MLFlowRun (result[" run" ][" info" ], result[" run" ][" data" ])
24
25
end
25
26
"""
26
- createrun(mlf::MLFlow, experiment::MLFlowExperiment; start_time=missing, tags=missing)
27
+ createrun(mlf::MLFlow, experiment::MLFlowExperiment; run_name=missing, start_time=missing, tags=missing)
27
28
28
- Dispatches to `createrun(mlf::MLFlow, experiment_id; start_time=start_time, tags=tags)`
29
+ Dispatches to `createrun(mlf::MLFlow, experiment_id; run_name=run_name, start_time=start_time, tags=tags)`
29
30
"""
30
- createrun (mlf:: MLFlow , experiment:: MLFlowExperiment ; start_time= missing , tags= missing ) =
31
- createrun (mlf, experiment. experiment_id; start_time= start_time, tags= tags)
31
+ createrun (mlf:: MLFlow , experiment:: MLFlowExperiment ; run_name = missing , start_time= missing , tags= missing ) =
32
+ createrun (mlf, experiment. experiment_id; run_name = run_name, start_time= start_time, tags= tags)
32
33
33
34
"""
34
35
getrun(mlf::MLFlow, run_id)
@@ -59,13 +60,15 @@ Updates the status of an experiment's run.
59
60
- `status`: either `String` and one of ["RUNNING", "SCHEDULED", "FINISHED", "FAILED", "KILLED"], or an instance of `MLFlowRunStatus`
60
61
61
62
# Keywords
63
+ - `run_name`: if provided, must be a String. By default, not set.
62
64
- `end_time`: if provided, must be a UNIX timestamp in milliseconds. By default, set to current time.
63
65
"""
64
- function updaterun (mlf:: MLFlow , run_id:: String , status:: MLFlowRunStatus ; end_time= missing )
66
+ function updaterun (mlf:: MLFlow , run_id:: String , status:: MLFlowRunStatus ; run_name = missing , end_time= missing )
65
67
endpoint = " runs/update"
66
68
kwargs = Dict (
67
69
:run_id => run_id,
68
70
:status => status. status,
71
+ :run_name => run_name,
69
72
:end_time => end_time
70
73
)
71
74
if ismissing (end_time) && status. status == " FINISHED"
@@ -75,16 +78,16 @@ function updaterun(mlf::MLFlow, run_id::String, status::MLFlowRunStatus; end_tim
75
78
result = mlfpost (mlf, endpoint; kwargs... )
76
79
MLFlowRun (result[" run_info" ])
77
80
end
78
- updaterun (mlf:: MLFlow , run_id:: String , status:: String ; end_time= missing ) =
79
- updaterun (mlf, run_id, MLFlowRunStatus (status); end_time= end_time)
80
- updaterun (mlf:: MLFlow , run_info:: MLFlowRunInfo , status:: String ; end_time= missing ) =
81
- updaterun (mlf, run_info. run_id, MLFlowRunStatus (status); end_time= end_time)
82
- updaterun (mlf:: MLFlow , run:: MLFlowRun , status:: String ; end_time= missing ) =
83
- updaterun (mlf, run. info, MLFlowRunStatus (status), end_time= end_time)
84
- updaterun (mlf:: MLFlow , run_info:: MLFlowRunInfo , status:: MLFlowRunStatus ; end_time= missing ) =
85
- updaterun (mlf, run_info. run_id, status, end_time= end_time)
86
- updaterun (mlf:: MLFlow , run:: MLFlowRun , status:: MLFlowRunStatus ; end_time= missing ) =
87
- updaterun (mlf, run. info, status; end_time= end_time)
81
+ updaterun (mlf:: MLFlow , run_id:: String , status:: String ; run_name = missing , end_time= missing ) =
82
+ updaterun (mlf, run_id, MLFlowRunStatus (status); run_name = run_name, end_time= end_time)
83
+ updaterun (mlf:: MLFlow , run_info:: MLFlowRunInfo , status:: String ; run_name = missing , end_time= missing ) =
84
+ updaterun (mlf, run_info. run_id, MLFlowRunStatus (status); run_name = run_name, end_time= end_time)
85
+ updaterun (mlf:: MLFlow , run:: MLFlowRun , status:: String ; run_name = missing , end_time= missing ) =
86
+ updaterun (mlf, run. info, MLFlowRunStatus (status); run_name = run_name , end_time= end_time)
87
+ updaterun (mlf:: MLFlow , run_info:: MLFlowRunInfo , status:: MLFlowRunStatus ; run_name = missing , end_time= missing ) =
88
+ updaterun (mlf, run_info. run_id, status; run_name = run_name , end_time= end_time)
89
+ updaterun (mlf:: MLFlow , run:: MLFlowRun , status:: MLFlowRunStatus ; run_name = missing , end_time= missing ) =
90
+ updaterun (mlf, run. info, status; run_name = run_name, end_time= end_time)
88
91
89
92
"""
90
93
deleterun(mlf::MLFlow, run)
0 commit comments