Skip to content

no_improvement_counter errror? #317

Description

@cometta

2025-11-15 13:34:40,596 - INFO - Metrics: runs_successfully=1.0000, value_score=0.9723, distance_score=0.9014, combined_score=1.4349, reliability_score=1.0000
Stage 1 evaluation failed: cannot access local variable 'no_improvement_counter' where it is not associated with a value
Traceback (most recent call last):
  File "<user_folder>/openevolve/examples/function_minimization/evaluator.py", line 294, in evaluate_stage1
    result = run_with_timeout(program.run_search, timeout_seconds=5)
  File "<user_folder>/openevolve/examples/function_minimization/evaluator.py", line 30, in run_with_timeout
    result = future.result(timeout=timeout_seconds)
  File "<python_folder>/lib/python3.13/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ~~~~~~~~~~~~~~~~~^^
  File "<python_folder>/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "<python_folder>/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/var/folders/q2/kzhvc3kj5r3dgb6lpss7zzzm0000gn/T/tmp94031cri.py", line 75, in run_search
    x, y, value = search_algorithm()
                  ~~~~~~~~~~~~~~~~^^
  File "/var/folders/q2/kzhvc3kj5r3dgb6lpss7zzzm0000gn/T/tmp94031cri.py", line 31, in search_algorithm
    local_perturb_std = initial_local_perturb_std * (decay_rate ** no_improvement_counter) # Decay based on no_improvement_counter
                                                                   ^^^^^^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'no_improvement_counter' where it is not associated with a value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions