Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STS sampler: too large population? #3

Open
FAMILIAR-project opened this issue Jun 1, 2020 · 1 comment
Open

STS sampler: too large population? #3

FAMILIAR-project opened this issue Jun 1, 2020 · 1 comment
Assignees

Comments

@FAMILIAR-project
Copy link
Owner

root@f7e546a491c6:/home/usampling-exp# python3 barbarik.py --sampler 3 --seed 42 ../samplingfm/Benchmarks/FeatureModels/FM-3.6.1-refined.cnf
Experiment: 0     of     1
constantFactor:39   boundFactor: 14.541336623567457   logBoundFactor: 3.8620879811712894  
tj: 1789   totalLoops: 2     beta: 0.8181818181818182 epsilon: 0.3       
numSolutions: 568   loThresh:82     hiThresh: 485   
Using sampler: STS
Number of solutions returned by sampler: 1
Using sampler: SPUR
Number of solutions returned by sampler: 1
Traceback (most recent call last):
  File "barbarik.py", line 961, in <module>
    ok, breakExperiment = exp.one_experiment(experiment, j, i, numExperiments, tj)
  File "barbarik.py", line 852, in one_experiment
    chainFormulaConf = chainFormulaSetup(sampleSol, unifSol, self.numSolutions)
  File "barbarik.py", line 579, in chainFormulaSetup
    sampleLitList = random.sample(sampleSol.split(), len(countList))
  File "/usr/local/lib/python3.7/random.py", line 321, in sample
    raise ValueError("Sample larger than population or is negative")
ValueError: Sample larger than population or is negative

@gperroui gperroui self-assigned this Jun 2, 2020
@gperroui
Copy link
Collaborator

gperroui commented Jun 2, 2020

The root cause of the problem comes from STS that is not able to produce samples for a number of models (including all feature models in the feature models repository). Hence, there is nothing to sample. To make it clear an assertion has been added in Barbarik script and the standard error is now collected in the uniformity result CSV: 9c9e76b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants