Loading ...
Sorry, an error occurred while loading the content.

Re: [vowpal_wabbit] inconsistent bit max in vw codebase

Expand Messages
  • John Langford
    Incorporated. -John
    Message 1 of 4 , Feb 18, 2012
    View Source
    • 0 Attachment
      Incorporated.

      -John

      On 02/14/2012 12:30 PM, Nikos Karampatziakis wrote:
      >
      >
      > On Tue, Feb 14, 2012 at 7:04 PM, John Langford <jl@...
      > <mailto:jl@...>> wrote:
      >
      > I fixed this. The answer should be 29 bits on a 32 bit system.
      > That's been sufficient for me on all systems so far, but if someone
      > hits the limit it's easy to go larger on a 64 bit system.
      >
      > -John
      >
      >
      > It's not to hard to have it both ways automatically. Instead of 29,
      > one can use sizeof(void*)*8-3 ?
      >
      > -Nikos
      >
      >
      >
      > On 2/14/12, Carter Schonwald <carter.schonwald@...
      > <mailto:carter.schonwald%40gmail.com>> wrote:
      > > Hey All,
      > > I've been looking through the VW code for understanding the code
      > base and
      > > sorting out some of the implicit details in the code, and I
      > noticed this
      > > little bit of inconsistency.
      > > Namely, that the bit precision input validation code appears
      > redundantly
      > > (see below) . Is this intentional or just accidental accumulation?
      > >
      > > vowpal_wabbit/vowpalwabbit/parse_args.cc:
      > > 65 ("audit,a", "print weights of features")
      > > 66 ("bit_precision,b", po::value<size_t>(),
      > > 67: "number of bits in the feature table")
      > > 68 ("bfgs", "use bfgs optimization")
      > > 69 ("cache,c", "Use a cache. The default is <data>.cache")
      > > ..
      > > 172 global.sequence = false;
      > > 173 global.stride = 1;
      > > 174: global.num_bits = 18;
      > > 175: global.default_bits = true;
      > > 176 global.daemon = false;
      > > 177
      > > ...
      > > 310 if (vm.count("bit_precision"))
      > > 311 {
      > > 312: global.default_bits = false;
      > > 313: global.num_bits = vm["bit_precision"].as< size_t>();
      > > 314: if (global.num_bits > 29)
      > > 315 {
      > > 316: cout << "Only 29 or fewer bits allowed. If this is a serious
      > > limit, speak up." << endl;
      > > 317 exit(1);
      > > 318 }
      > > ...
      > > 333 par->sort_features = true;
      > > 334
      > > 335: if (global.num_bits > 30) {
      > > 336: cerr << "The system limits at 30 bits of precision!\n" << endl;
      > > 337 exit(1);
      > > 338 }
      > >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.