@@ -31,3 +31,90 @@ function createrun(instance::MLFlow, experiment_id::String;
31
31
throw (e)
32
32
end
33
33
end
34
+ createrun (instance:: MLFlow , experiment_id:: Integer ;
35
+ run_name:: Union{String, Missing} = missing ,
36
+ start_time:: Union{Integer, Missing} = missing ,
37
+ tags:: Union{Dict{<:Any}, Array{<:Any}} = []) =
38
+ createrun (instance, string (experiment_id); run_name= run_name,
39
+ start_time= start_time, tags= tags)
40
+ createrun (instance:: MLFlow , experiment:: Experiment ;
41
+ run_name:: Union{String, Missing} = missing ,
42
+ start_time:: Union{Integer, Missing} = missing ,
43
+ tags:: Union{Dict{<:Any}, Array{<:Any}} = []) =
44
+ createrun (instance, string (experiment. experiment_id); run_name= run_name,
45
+ start_time= start_time, tags= tags)
46
+
47
+ """
48
+ deleterun(instance::MLFlow, run_id::String)
49
+ deleterun(instance::MLFlow, run::Run)
50
+
51
+ Mark a run for deletion.
52
+
53
+ # Arguments
54
+ - `instance`: [`MLFlow`](@ref) configuration.
55
+ - `run_id`: ID of the run to delete.
56
+
57
+ # Returns
58
+
59
+ `true` if successful. Otherwise, raises exception.
60
+ """
61
+ function deleterun (instance:: MLFlow , run_id:: String )
62
+ endpoint = " runs/delete"
63
+ try
64
+ mlfpost (instance, endpoint; run_id= run_id)
65
+ return true
66
+ catch e
67
+ throw (e)
68
+ end
69
+ end
70
+ deleterun (instance:: MLFlow , run:: Run ) = deleterun (instance, run. info. run_id)
71
+
72
+ """
73
+ restorerun(instance::MLFlow, run_id::String)
74
+ restorerun(instance::MLFlow, run::Run)
75
+
76
+ Restore a deleted run.
77
+
78
+ # Arguments
79
+ - `instance`: [`MLFlow`](@ref) configuration.
80
+ - `run_id`: ID of the run to restore.
81
+
82
+ # Returns
83
+
84
+ `true` if successful. Otherwise, raises exception.
85
+ """
86
+ function restorerun (instance:: MLFlow , run_id:: String )
87
+ endpoint = " runs/restore"
88
+ try
89
+ mlfpost (instance, endpoint; run_id= run_id)
90
+ return true
91
+ catch e
92
+ throw (e)
93
+ end
94
+ end
95
+ restorerun (instance:: MLFlow , run:: Run ) = restorerun (instance, run. info. run_id)
96
+
97
+ """
98
+ getrun(instance::MLFlow, run_id::String)
99
+
100
+ Get metadata, metrics, params, and tags for a run. In the case where multiple
101
+ metrics with the same key are logged for a run, return only the value with the
102
+ latest timestamp. If there are multiple values with the latest timestamp,
103
+ return the maximum of these values.
104
+
105
+ # Arguments
106
+ - `instance`: [`MLFlow`](@ref) configuration.
107
+ - `run_id`: ID of the run to fetch.
108
+
109
+ # Returns
110
+ An instance of type [`Run`](@ref).
111
+ """
112
+ function getrun (instance:: MLFlow , run_id:: String )
113
+ try
114
+ arguments = (:run_id => run_id,)
115
+ result = mlfget (instance, " runs/get" ; arguments... )
116
+ return result[" run" ] |> Run
117
+ catch e
118
+ throw (e)
119
+ end
120
+ end
0 commit comments