kz930 opened a new issue, #7952:
URL: https://github.com/apache/texera/issues/7952
### What happened?
A hyperparameter row on an Advanced trainer names the parameter it sets, and
the operator emits one keyword argument per row. Nothing stops two rows from
naming the same parameter, and two rows naming one parameter emit that keyword
twice:
```
SVC(C = float ("1.0"), C = float ("2.0"),)
```
Python rejects that while it compiles the operator, before any of it runs:
```
SyntaxError: keyword argument repeated: C
```
The run ends there, and what the user is shown points at a line of generated
code rather than at the row they added.
`paraList` carries no constraint of any kind, so the form takes the second
row without comment. `uniqueItems` is not the constraint that is missing
either: two rows naming `C` with different values are distinct rows, and the
emitted code repeats the keyword all the same. What has to be unique is the
`parameter` field across the rows, which no row can state about itself.
Where to catch it is worth deciding in the PR rather than here. Refusing the
second row in the form is the earliest point. The descriptor could also refuse
it while the workflow compiles, which is where the user gets an error naming
the operator and the parameter instead of a Python traceback.
### How to reproduce?
Add an Advanced SVM Classifier Trainer, wire a numeric table to its training
port and any table to its parameter port, then set the ground truth attribute
and the selected features. Add two rows under Parameter Setting and pick `C` in
both, giving them any values. Run. The operator fails to compile with a
repeated-keyword SyntaxError. Every Advanced trainer behaves the same way, the
parameter list being the only thing that differs between them.
### Version/Branch
1.3.0-incubating-SNAPSHOT (main)
### Relevant log output
```shell
File "<string>", line 24
SyntaxError: keyword argument repeated: C
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]