Esempio n. 1
0
def main(config=None, timing=None, wrapping=True):
  """"""
  #define the options
  AUGUSTUS_CONSTS.check_python_version()
  usage = "usage: %prog [options]"
  version = "%prog " + AUGUSTUS_CONSTS._AUGUSTUS_VER

  options = [
    make_option("-c","--config",default="config.xml",help="The configuration file name"),
    make_option("-t","--timing",default=None,help="Output timing (information in % increments for scoring)")]
  parser = OptionParser(usage=usage, version=version, option_list=options)
  
  #parse the options
  if not config:
    (options, arguments) = parser.parse_args()
    config = options.config
    timing = options.timing
  
  #make a producer
  mine = Producer(timing, wrapping)
  #input the configurations
  mine.inputConfigs(config)
  #input the PMML
  mine.inputPMML()
  #create the statistics
  mine.getStats()
  #make the TestDistributions elements
  mine.makeTests()
  #output the PMML
  mine.outputPMML()
  #stop timing if it is going
  mine.stop()
Esempio n. 2
0
        finished = False
      else:
        finished = True
  if consumer.metadata:
    consumer.metadata['Stacksize after Scoring'] = ptools.stacksize()
    consumer.metadata['Resident Memory after Scoring'] = ptools.resident()/1e+9 #Gb
    consumer.metadata['Memory after Scoring'] = ptools.memory()/1e+9 #Gb
    consumer.metadata.collected['DataInput'] = data_input.getMetaData()
    #consumer.metadata.collected['Scoring'] = consumer.metadata.getMetaData()
    consumer.metadata.collected['Scoring'] = consumer.getMetaData()
    consumer.metadata.collected[''] = consumer.model.getMetaData()
    consumer.metadata.report()

if __name__ == '__main__':
  # configure the *root* logger.
  logging.basicConfig(level=logging.DEBUG)
  from optparse import OptionParser, make_option
  #define the options
  AUGUSTUS_CONSTS.check_python_version()
  usage = "usage: %prog [options]"
  version = "%prog " + AUGUSTUS_CONSTS._AUGUSTUS_VER
  options = [
    make_option("-c","--config",metavar="config",default='config.xml',help="The configuration file name"),
    make_option("-o","--outfile",metavar="outfile",help="The output file name"),
    make_option("-p","--port",metavar="num",help="The port number for the HTTP server")]
  parser = OptionParser(usage=usage, version=version, option_list=options)
  
  (options, arguments) = parser.parse_args()
  config = options.config
  main(options.config, options.outfile, options.port)
Esempio n. 3
0
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
"""

from distutils.core import setup
import augustus.const as AUGUSTUS_CONST

# System check
import augustus.const as CONST
CONST.check_python_version()
# End check

setup(

  name='Augustus',
  version=AUGUSTUS_CONST._AUGUSTUS_VER,
  description='Augustus - A scoring engine for statistical and data mining models based on the Predictive Model Markup Language (PMML) version ' + AUGUSTUS_CONST._PMML_VER,
  long_description=__doc__,
  author='Open Data Group',
  author_email='*****@*****.**',
  license='GPLv2',
  url='http://augustus.googlecode.com',
  download_url='http://code.google.com/p/augustus/downloads/list',
  packages=['augustus',
    'augustus.pmmllib',
Esempio n. 4
0
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
"""

from distutils.core import setup
import augustus.const as AUGUSTUS_CONST

# System check
import augustus.const as CONST
CONST.check_python_version()
# End check

setup(
    name='Augustus',
    version=AUGUSTUS_CONST._AUGUSTUS_VER,
    description=
    'Augustus - A scoring engine for statistical and data mining models based on the Predictive Model Markup Language (PMML) version '
    + AUGUSTUS_CONST._PMML_VER,
    long_description=__doc__,
    author='Open Data Group',
    author_email='*****@*****.**',
    license='GPLv2',
    url='http://augustus.googlecode.com',
    download_url='http://code.google.com/p/augustus/downloads/list',
    packages=[
Esempio n. 5
0
def main(config=None, timing=None, wrapping=True):
    """"""
    # Configure *root* logger.
    logging.basicConfig(level=logging.DEBUG)

    # gc.disable()

    # define the options
    AUGUSTUS_CONSTS.check_python_version()
    usage = "usage: %prog [options]"
    version = "%prog " + AUGUSTUS_CONSTS._AUGUSTUS_VER
    options = [
        make_option("-c", "--config", default="config.xml", help="The configuration file name"),
        make_option("-t", "--timing", default=None, help="Output timing (information in % increments for scoring)"),
    ]
    parser = OptionParser(usage=usage, version=version, option_list=options)

    # parse the options
    if not config:
        (options, arguments) = parser.parse_args()
        config = options.config
        timing = options.timing

    # make a producer
    mine = Producer(timing, wrapping)

    if not gc.isenabled():
        mine.logger.info("Python Garbage Collection of circular references is disabled.")

    producerStart = datetime.datetime.now()
    # input the configurations
    config_reader = anyReader.Reader(mine.inputConfigs, source=config, magicheader=False, autoattr=False)
    mine.logger.debug("Read Config File")
    config_reader.read_once()

    # mine.inputConfigs(config)
    # input the PMML
    mine.inputPMML()
    # create the statistics
    producerStartDataProcessing = datetime.datetime.now()
    mine.getStats()
    if mine.metadata is not None:
        mine.metadata["Time Processing Baseline Data"] += datetime.datetime.now() - producerStartDataProcessing
    # make the TestDistributions elements
    producerStartmakingPMMLTests = datetime.datetime.now()
    mine.makeTests()
    if mine.metadata is not None:
        mine.metadata["Time Creating PMML Tests"] += datetime.datetime.now() - producerStartmakingPMMLTests
    # output the PMML
    producerStartModelOutput = datetime.datetime.now()
    mine.outputPMML()
    if mine.metadata is not None:
        mine.metadata["Time Outputting Model"] += datetime.datetime.now() - producerStartModelOutput
    # stop timing if it is going
    mine.stop()
    if mine.metadata:
        mine.metadata["Total Producer Time"] += datetime.datetime.now() - producerStart
        # mine.metadata.collected['DataInput'] = data_input.getMetaData()
        mine.metadata.collected["Producing"] = mine.metadata.getMetaData()
        # mine.metadata.collected[''] = mine.model.getMetaData()
        mine.metadata.report()