Hi,

You can set a local verbosity level for your feature function, e.g.:

        CoarseBiLM name=CoarseBiLM100 verbosity=<int-value>

If you use the macros FEATUREVERBOSE(level,str),
FEATUREVERBOSE2(level,str), or IFFEATUREVERBOSE(level) in your feature
function code, the verbose output will only be printed to cerr if
int-value >= level.

(Note that it only works once SetParameter() has been called. If you
need verbosity in the constructor, you need to resort to the normal
VERBOSE macro.)

Those macros are defined in moses/Util.h . They are fairly new. Not too
many feature functions make use of them yet. However, I'd highly
recommend them, since they allow you to suppress any global verbosity
and only print what you actually want to see.

FEATUREVERBOSE prints the name of the feature function in square
brackets with every verbose output, without you having to do that
yourself. FEATUREVERBOSE2 doesn't print the name of the feature
function. 
IFFEATUREVERBOSE starts a conditional block, which is helpful if the
verbosity code is a bit more complex.

Cheers,
Matthias


On Fri, 2016-02-12 at 23:39 +0000, Hieu Hoang wrote:
> you can run the decoder
>    ./moses -v 3
> however, you should put debugging messages in your feature functions to 
> find out where the problem is. It looks like its in the Load() method so 
> add lots of debugging message in there and all functions it calls
> 
> On 12/02/16 23:34, Jasneet Sabharwal wrote:
> > Thanks Hieu for your reply.
> >
> > Is it possible to do a verbose output of what’s happening, so that I 
> > can identify when it’s going out of memory? I’m only running it for 
> > 1928 sentences. I have almost 170gb of free memory and additional 
> > 400gb memory in buffer.
> >
> > Thanks,
> > Jasneet
> >
> >> On Feb 12, 2016, at 2:36 PM, Hieu Hoang <hieuho...@gmail.com 
> >> <mailto:hieuho...@gmail.com>> wrote:
> >>
> >> looks like it's run out of memory.
> >>
> >> On 11/02/16 23:23, Jasneet Sabharwal wrote:
> >>> Hi,
> >>>
> >>> I was adding a new feature function in Moses 
> >>> (https://github.com/KonceptGeek/mosesdecoder/blob/master/moses/FF/CoarseBiLM.cpp).
> >>>  
> >>> It works fine when I test it for 1-2 sentences, but when I’m trying 
> >>> to tune my parameters, I’m getting segmentation faults or sometimes 
> >>> it is bad_alloc. Following was one of the commands that was executed 
> >>> during the tuning process which caused the Segmentation Fault or 
> >>> bad_alloc:
> >>>
> >>> moses -threads 40 -v 0 -config filtered/moses.ini -weight-overwrite 
> >>> 'CoarseLM100= 0.075758 LM0= 0.075758 CoarseBiLMNotClustered= 
> >>> 0.075758 WordPenalty0= -0.151515 PhrasePenalty0= 0.030303 
> >>> CoarseBiLMClustered= 0.075758 TranslationModel0= 0.030303 0.030303 
> >>> 0.030303 0.030303 Distortion0= 0.045455 CoarseLM1600= 0.075758 
> >>> LexicalReordering0= 0.045455 0.045455 0.045455 0.045455 0.045455 
> >>> 0.045455' -n-best-list run1.best100.out 100 distinct -input-file 
> >>> tune.word.lc.cn <http://tune.word.lc.cn/>
> >>>
> >>> The log is enclosed in this email.
> >>>
> >>> Any pointers would be very useful.
> >>>
> >>> Thanks,
> >>> Jasneet
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> Moses-support mailing list
> >>> Moses-support@mit.edu
> >>> http://mailman.mit.edu/mailman/listinfo/moses-support
> >>
> >> -- 
> >> Hieu Hoang
> >> http://www.hoang.co.uk/hieu
> >
> 
> _______________________________________________
> Moses-support mailing list
> Moses-support@mit.edu
> http://mailman.mit.edu/mailman/listinfo/moses-support



-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

_______________________________________________
Moses-support mailing list
Moses-support@mit.edu
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to