You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Franck <fr...@yahoo.fr.INVALID> on 2016/04/01 18:12:30 UTC

Re: Dynamically set configuration parameters in delegates.

Hi Richard,
thanks for your answer. I thought about it but didn't want to reconfigure the descriptors each time before running the pipeline. The parameters I want to set only concern my own AEs, so I guess the solution would then be to create a new annotation with all the parameters I need, change my AEs so that they read the values, and set this annotation before calling process().
Cheers from Darmstadt :)Franck


      De : Richard Eckart de Castilho <re...@apache.org>
 À : user@uima.apache.org 
 Envoyé le : Mercredi 30 mars 2016 15h24
 Objet : Re: Dynamically set configuration parameters in delegates.
   
Hi,

I would recommend reconfiguring a single AE instance, but rather generating new (aggregate) engine descriptions as you need them and uimaFIT SimplePipeline to run them.

I believe there is no standard way of reconfiguring components within already instantiated aggregates.

Best,

-- Richard

> On 29.03.2016, at 14:56, Franck Valentin <am...@yahoo.fr> wrote:
> 
> Hi,
> 
> I use UIMA 2.6 and uimaFIT 2.1.0 to create an aggregate AE. 
> I would like to set specific parameters for each delegate before running 
> analyses (i.e. before running process()).
> So far I tried to use configuration parameters but without success. If I 
> use a simple AE alone then calling 
> setConfigParameterValue() works but it doesn't when using an aggregate AE.
> I stumbled also on a strange behavior: if the configuration parameter is 
> not defined in the engine description but its value is 
> set by setConfigParameterValue() then its name doesn't appear with 
> getConfigParameterNames() but its value is correctly retrieved 
> with getConfigParameterValue()!
> 
> Below is a simple code to test the aggregate (it's in Scala but should be 
> easily understandable).


  

Re: Dynamically set configuration parameters in delegates.

Posted by Richard Eckart de Castilho <re...@apache.org>.
On 01.04.2016, at 18:12, Franck <fr...@yahoo.fr.INVALID> wrote:
> 
> Hi Richard,
> thanks for your answer. I thought about it but didn't want to reconfigure the descriptors each time before running the pipeline. The parameters I want to set only concern my own AEs, so I guess the solution would then be to create a new annotation with all the parameters I need, change my AEs so that they read the values, and set this annotation before calling process().
> Cheers from Darmstadt :)Franck


UIMA supports defining overrides in aggregates [1] such that parameter of a component within an aggregate can be exposed as an aggregate parameter. uimaFIT has no explicit support for this, but the descriptors that uimaFIT creates are regular UIMA descriptors and you should be able to locate the proper methods to define overrides on an aggregate descriptor returned by uimaFIT.

What I do not know is whether these overrides remain in effect after the aggregate has been instantiated - i.e. whether you can call reconfigure() on the aggregate such that it would transitively reconfigure the delegate engines in the aggregate.

... but you could try it :) (or somebody more in the know may tell us)

Best,

-- Richard

[1] https://uima.apache.org/d/uimaj-current/references.html#ugr.ref.xml.component_descriptor.aes.aggregate.configuration_parameter_overrides