mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lance Norskog (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (MAHOUT-743) Allow use of random seeds during unit tests
Date Mon, 27 Jun 2011 23:11:18 GMT

    [ https://issues.apache.org/jira/browse/MAHOUT-743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13056183#comment-13056183
] 

Lance Norskog edited comment on MAHOUT-743 at 6/27/11 11:10 PM:
----------------------------------------------------------------

bq. You correctly describe the behavior; is there a concrete problem that it solves? In general
you don't want to write code with fixed seeds.
There are use cases for deterministic randomness. For example, parallel algorithms that depend
on each actor participating in the same space.


      was (Author: lancenorskog):
    bq. You correctly describe the behavior; is there a concrete problem that it solves? In
general you don't want to write code with fixed seeds.
There are use cases for deterministic randomness. For example,
parallel algorithms that depend on each actor participating in the same space.

  
> Allow use of random seeds during unit tests
> -------------------------------------------
>
>                 Key: MAHOUT-743
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-743
>             Project: Mahout
>          Issue Type: Improvement
>            Reporter: Lance Norskog
>            Assignee: Sean Owen
>             Fix For: 0.6
>
>         Attachments: MAHOUT-743.patch, RandomWrapper.patch
>
>
> The RandomUtils package has a trick for running unit tests repeatably. All random generators
created with RandomUtils.getRandom() are started with seed 0. Unfortunately, all random generators
started with RandomUtils.getRandom(seed) effectively run from a seed of 0. Thus, code which
deliberately creates Random objects with seeds does not work correctly under unit tests.
> The problem is that the logic in RandomWrapper tests for unit test mode and settable
seed mode in the wrong order.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message