app2scale / hdmr-opt

3 stars 2 forks source link

Command-line selection of basis function is not working #10

Closed hkayabilisim closed 1 year ago

hkayabilisim commented 1 year ago

What is the problem?

When I try to use basisFunction command-line parameter, the program gives an error message and stops.

How to repeat

By using the commit version f3dc28d, issue the following command:

$ python3 src/main.py --numSamples 1000 --numVariables 2 --function ackley_2d \ 
    --min -30 --max 30 --randomInit --basisFunction Cosine
usage: HDMR [-h] --numSamples NUMSAMPLES --numVariables NUMVARIABLES --function FUNCTION --min MIN --max MAX [--randomInit] [--basisFunction BASISFUNCTION]
            [--legendreDegree LEGENDREDEGREE] [--adaptive] [--numClosestPoints NUMCLOSESTPOINTS] [--epsilon EPSILON] [--clip CLIP]
HDMR: error: argument --basisFunction: invalid int value: 'Cosine'

It's screenshot is below.

image
YunusKaratepe commented 1 year ago

This bug is fixed with the last update. There were problems on the function parameter ordering. Now should be working good on both command line and the UI.