diff options
author | mguetlein <martin.guetlein@gmail.com> | 2010-05-14 11:25:03 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2010-05-14 11:25:03 +0200 |
commit | 61475e273035cb1128033d57ff464a00585281f2 (patch) | |
tree | fcd822535bff43c1eaf27f8a43daabb3d9411a1d /lib/model.rb | |
parent | a266f6e2ec0e083d9c42be4ec6f6e35c5bf2d137 (diff) |
remove ambit hack, add accept-header for model prediction
Diffstat (limited to 'lib/model.rb')
-rw-r--r-- | lib/model.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/model.rb b/lib/model.rb index 8c4614f..9573450 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -44,12 +44,6 @@ module OpenTox def self.build( algorithm_uri, algorithm_params ) - if algorithm_uri =~ /ambit2/ - LOGGER.warn "Ambit hack, replacing 'prediction_feature' with 'target'" - algorithm_params[:target] = algorithm_params[:prediction_feature] - algorithm_params.delete(:prediction_feature) - end - LOGGER.debug "Build model, algorithm_uri:"+algorithm_uri.to_s+", algorithm_parms: "+algorithm_params.inspect.to_s uri = OpenTox::RestClientWrapper.post(algorithm_uri,algorithm_params).to_s LOGGER.debug "Build model done: "+uri.to_s @@ -60,7 +54,7 @@ module OpenTox def predict_dataset( dataset_uri ) LOGGER.debug "Predict dataset: "+dataset_uri.to_s+" with model "+@uri.to_s - uri = RestClientWrapper.post(@uri, {:dataset_uri=>dataset_uri}) + uri = RestClientWrapper.post(@uri, {:accept => "text/uri-list", :dataset_uri=>dataset_uri}) RestClientWrapper.raise_uri_error("Prediciton result no dataset uri: "+uri.to_s, @uri, {:dataset_uri=>dataset_uri} ) unless Utils.dataset_uri?(uri) uri end |