outerport / paramit

Parameterize Python scripts/notebooks all from the command line and run on cloud GPUs
Apache License 2.0
96 stars 11 forks source link

if else ignored #79

Open squidrice21 opened 2 months ago

squidrice21 commented 2 months ago

Running this via paramit will set both branches to have the same assignment. a could be a variable for computation that doesn't need to take an input value:

b = 20

if b > 10:
    a = 'b is greater than 10'
else:
    a = 'b is less than 10'

The generated py in the report:

b = 20

if b > 10:
    a = 'b is less than 10'
else:
    a = 'b is less than 10'

The toml file:

[global]
b = "20"
a = "b is less than 10"

[meta]
version = "0.2.1"
created_on = "2024-08-30 16:39:18.816170"
script_path = "/home/test.py"
python_path = "/home/envs/test/bin/python"