Repository navigation
Fix program_html evaluator race condition and empty string handling - #408
Tharun-Varshan-S wants to merge 2 commits into
Conversation
|
Hi @Tharun-Varshan-S - Thanks for the PR |
|
Hi @Surya-5555, Thanks for the review! I've run pre-commit run --all-files locally and pushed all the formatting updates. The code format checks should now pass green. Let me know if you need anything else! |
f5fa31b to
11b564d
Compare
|
Hi @Tharun-Varshan-S, Issue: In browsergym/webarenalite/src/browsergym/webarenalite/evaluators.py at line 273, except playwright.sync_api.TimeoutError: will raise NameError: name 'playwright' is not defined because playwright isn't imported at module level. Fix (line 18): Change to from playwright.sync_api import CDPSession, Page, TimeoutError |
|
Hi @Surya-5555, Thanks for catching that! I have resolved the issue:
The fix has been pushed to the branch. Thanks again for the review! |
Resolves #407
This PR implements the fixes suggested in #407:
time.sleep(3)withpage.wait_for_load_state("networkidle"), explicitly catching and toleratingTimeoutErrorso we evaluate pages with heavy background activity gracefully.except Exceptionblocks for the JS locators to assignselected_element = None(instead of""), ensuring missing elements correctly hit theis Noneguard and return 0.0 directly rather than vacuously slipping through to the string scorers.