Hasarindu Perera

Hasarindu Perera

Joined November 5, 2024

Karma 9

Hasarindu Perera

2

Posted by hasarinduperera

What is your Python version? Try using Python 3.10. If changing your Python version is too difficult, install Conda and create an environment with Python 3.10.
Hasarindu Perera

1

Posted by hasarinduperera

Tried editing the same notebook for training, and submitting trough aqora test. Getting the same error.
Screenshot from 2025-01-12 16-07-36.png
Hasarindu Perera

1

Posted by hasarinduperera

No, actually I just tried submitting the dummy model. Now I am trying to train a model but could not because I am getting the above error. Do I need to train the model in the same notebook, and test it out using aqora test?
Hasarindu Perera

1

Posted by hasarinduperera

Sure, I will. Thanks!
Hasarindu Perera

2

Posted by hasarinduperera

Please run your submission using aqora test for now.
Got it, thanks! So basically what I have to do is, experiment with the model and run aqora test right?
Hasarindu Perera

2

Posted by hasarinduperera

PS: after the code change, notebook worked fine, I am getting above error, when running aqora test.
To clarify, in initial stage, aqora test worked, but notebook did not, now after my code change, notebook does work, aqora test is not.
Maybe I am doing something wrong or foolish, please forgive me if that's the case.
Hasarindu Perera

2

Posted by hasarinduperera

Are you running the notebook with aqora test as expected? Or do you run it using Visual Studio Code?
aqora test worked fine on terminal. But then I tried to follow the notebook (running cell by cell). That's when I got the error.
Can you quote the full error trace in the topic please?
Model output: [[1 1 2 1 2]]
Model output: [[1 1 2 1 2]]
[1 FAIL] Evaluation error
Model output: [[1 1 2 1 2]]
Traceback (most recent call last):
  File "/home/personal/Documents/Personal/Documents/aqora/quantum-signals-lob/.venv/lib/python3.10/site-packages/use_case/run.py", line 32, in score
    return compute_score(Tensor(solution), Tensor(original_input[1]))
  File "/home/personal/Documents/Personal/Documents/aqora/quantum-signals-lob/.venv/lib/python3.10/site-packages/use_case/metrics.py", line 54, in compute_score
    scores = [
  File "/home/personal/Documents/Personal/Documents/aqora/quantum-signals-lob/.venv/lib/python3.10/site-packages/use_case/metrics.py", line 55, in <listcomp>
    compute_metrics(truth[:, h], prediction[:, h])[cst.Metrics.F1.value]
  File "/home/personal/Documents/Personal/Documents/aqora/quantum-signals-lob/.venv/lib/python3.10/site-packages/use_case/metrics.py", line 19, in compute_metrics
    cr = classification_report(truth, prediction, output_dict=True, zero_division=0)
  File "/home/personal/Documents/Personal/Documents/aqora/quantum-signals-lob/.venv/lib/python3.10/site-packages/sklearn/utils/_param_validation.py", line 213, in wrapper
    return func(*args, **kwargs)
  File "/home/personal/Documents/Personal/Documents/aqora/quantum-signals-lob/.venv/lib/python3.10/site-packages/sklearn/metrics/_classification.py", line 2626, in classification_report
    y_type, y_true, y_pred = _check_targets(y_true, y_pred)
  File "/home/personal/Documents/Personal/Documents/aqora/quantum-signals-lob/.venv/lib/python3.10/site-packages/sklearn/metrics/_classification.py", line 103, in _check_targets
    check_consistent_length(y_true, y_pred)
  File "/home/personal/Documents/Personal/Documents/aqora/quantum-signals-lob/.venv/lib/python3.10/site-packages/sklearn/utils/validation.py", line 457, in check_consistent_length
    raise ValueError(
ValueError: Found input variables with inconsistent numbers of samples: [1, 32]
[2 FAIL] Evaluation error
  Failed to run pipeline                                                                                                            ERROR Oh no! Failed to run pipeline

To try and fix this, you can:
 - Check the above error and try again
Hasarindu Perera

2

Posted by hasarinduperera (edited)

Thank you for your reply, I truly appreciate your help.
When I click on "Create a .venv" (step 9), my Codespace does not show an option to select an existing virtual environment. This might just be an issue on my end, so I'll try it on a fresh Codespace to see if that resolves the problem.
Regards, Hasarindu
Screenshot from 2024-11-19 21-09-37.png
PS: I tried it on a fresh Codespace, but it still did not show the existing .venv option.