File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -375,9 +375,7 @@ def _ensure_flow_exists(self):
375375 flow_id : int
376376 Flow id on the server.
377377 """
378- import sklearn
379- flow_version = 'sklearn_' + sklearn .__version__
380- _ , _ , flow_id = _check_flow_exists (self .name , flow_version )
378+ _ , _ , flow_id = _check_flow_exists (self .name , self .external_version )
381379 # TODO add numpy and scipy version!
382380
383381 if int (flow_id ) == - 1 :
@@ -413,7 +411,6 @@ def _check_flow_exists(name, version):
413411
414412 return_code , xml_response = _perform_api_call (
415413 "flow/exists/%s/%s" % (name , version ))
416- print (return_code )
417414 # TODO check with latest version of code if this raises an exception
418415 if return_code != 200 :
419416 # fixme raise appropriate error
Original file line number Diff line number Diff line change 2121from openml .testing import TestBase
2222from openml ._api_calls import _perform_api_call
2323import openml
24+ from openml .flows .sklearn_converter import _format_external_version
2425
2526
2627def get_sentinel ():
@@ -121,7 +122,8 @@ def test_publish_flow(self):
121122 components = collections .OrderedDict (),
122123 parameters = collections .OrderedDict (),
123124 parameters_meta_info = collections .OrderedDict (),
124- external_version = str (sklearn .__version__ ),
125+ external_version = _format_external_version (
126+ 'sklearn' , sklearn .__version__ ),
125127 tags = [],
126128 language = 'English' ,
127129 dependencies = '' )
@@ -139,7 +141,8 @@ def test_ensure_flow_exists(self):
139141 components = collections .OrderedDict (),
140142 parameters = collections .OrderedDict (),
141143 parameters_meta_info = collections .OrderedDict (),
142- external_version = str (sklearn .__version__ ),
144+ external_version = _format_external_version (
145+ 'sklearn' , sklearn .__version__ ),
143146 tags = [],
144147 language = 'English' ,
145148 dependencies = '' )
You can’t perform that action at this time.
0 commit comments