1717
1818from ..exceptions import OpenMLCacheException , OpenMLServerException
1919from ..util import URLError , version_complies
20- from .._api_calls import _perform_api_call , fileid_to_url
20+ from .._api_calls import _perform_api_call , _file_id_to_url
2121from .run import OpenMLRun , _get_version_information
2222from .trace import OpenMLRunTrace , OpenMLTraceIteration
2323
@@ -99,6 +99,17 @@ def run_task(task, model, avoid_duplicate_runs=True, flow_tags=None, seed=None):
9999
100100
101101def get_run_trace (run_id ):
102+ """Get the optimization trace object for a given run id.
103+
104+ Parameters
105+ ----------
106+ run_id : int
107+
108+ Returns
109+ -------
110+ openml.runs.OpenMLTrace
111+ """
112+
102113 trace_xml = _perform_api_call ('run/trace/%d' % run_id )
103114 run_trace = _create_trace_from_description (trace_xml )
104115 return run_trace
@@ -124,7 +135,7 @@ def initialize_model_from_run(run_id):
124135
125136def initialize_model_from_trace (run_id , repeat , fold , iteration = None ):
126137 '''
127- Initialized a model based on the parameters that were set
138+ Initialize a model based on the parameters that were set
128139 by an optimization procedure (i.e., using the exact same
129140 parameter settings)
130141
@@ -146,7 +157,7 @@ def initialize_model_from_trace(run_id, repeat, fold, iteration=None):
146157 Returns
147158 -------
148159 model : sklearn model
149- the scikitlearn model with all parameters initailized
160+ the scikit-learn model with all parameters initailized
150161 '''
151162 run_trace = get_run_trace (run_id )
152163
0 commit comments