-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the Bug
I copied the basic example (https://github.com/simopt-admin/simopt?tab=readme-ov-file#basic-example) to a Python script. When I run the script, I get:
Traceback (most recent call last):
File "basic_example.py", line 10, in <module>
simopt.experiment_base.plot_progress_curves(
File "python3.12/site-packages/simopt/experiment_base.py", line 3003, in plot_progress_curves
check_common_problem_and_reference(experiments)
File "python3.12/site-packages/simopt/experiment_base.py", line 2867, in check_common_problem_and_reference
x0_list = [experiment.x0 for experiment in experiments]
^^^^^^^^^^^^^
File "python3.12/site-packages/simopt/experiment_base.py", line 766, in x0
return self.__x0
^^^^^^^^^
AttributeError: 'ProblemSolver' object has no attribute '_ProblemSolver__x0'. Did you mean: '_ProblemSolver__xstar'?
Steps To Reproduce
- Copy https://github.com/simopt-admin/simopt?tab=readme-ov-file#basic-example to a Python script. Make sure you put the code under the block
if __name__ == "__main__": - Install simopt v1.1.1 using pip
- Run the code.
Expected Behavior
Traceback (most recent call last):
File "basic_example.py", line 10, in <module>
simopt.experiment_base.plot_progress_curves(
File "python3.12/site-packages/simopt/experiment_base.py", line 3003, in plot_progress_curves
check_common_problem_and_reference(experiments)
File "python3.12/site-packages/simopt/experiment_base.py", line 2867, in check_common_problem_and_reference
x0_list = [experiment.x0 for experiment in experiments]
^^^^^^^^^^^^^
File "python3.12/site-packages/simopt/experiment_base.py", line 766, in x0
return self.__x0
^^^^^^^^^
AttributeError: 'ProblemSolver' object has no attribute '_ProblemSolver__x0'. Did you mean: '_ProblemSolver__xstar'?
Environment
Please provide some details about your environment to help us replicate the bug:
- Operating System: macOS 15.6.1
- Python Version: v3.12.11.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working