Skip to content

Conversation

Wovchena
Copy link
Collaborator

@Wovchena Wovchena commented Aug 8, 2025

Ticket 171890. No Idea if it helps

@Wovchena Wovchena requested review from sbalandi and Copilot August 8, 2025 07:05
@github-actions github-actions bot added the category: WWB PR changes WWB label Aug 8, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds explicit UTF-8 encoding specification when reading text files to address potential encoding-related issues mentioned in ticket 171890.

  • Adds explicit encoding='utf-8' parameter to read_text() method call

prompts_file_path = LONG_PROMPTS_FILE if self.long_prompt else PROMPTS_FILE
data_path = files('whowhatbench.prompts').joinpath(prompts_file_path)
prompt_data = yaml.safe_load(data_path.read_text())
prompt_data = yaml.safe_load(data_path.read_text(encoding='utf-8'))
Copy link
Preview

Copilot AI Aug 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While adding explicit encoding is good practice, consider using 'utf-8-sig' encoding instead of 'utf-8' to handle files that may contain a UTF-8 BOM (Byte Order Mark), which is common in Windows environments and could cause YAML parsing issues.

Suggested change
prompt_data = yaml.safe_load(data_path.read_text(encoding='utf-8'))
prompt_data = yaml.safe_load(data_path.read_text(encoding='utf-8-sig'))

Copilot uses AI. Check for mistakes.

Ticket 171890. No Idea if it helps
Copy link
Contributor

@sbalandi sbalandi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It helps for windows, at least on dev machine, thank you for the fix !

@sbalandi sbalandi enabled auto-merge August 8, 2025 10:10
@sbalandi sbalandi added this pull request to the merge queue Aug 8, 2025
@Wovchena
Copy link
Collaborator Author

Wovchena commented Aug 8, 2025

Can you copy wwb tests to run them on Windows and mac

@sbalandi
Copy link
Contributor

sbalandi commented Aug 8, 2025

Can you copy wwb tests to run them on Windows and mac

yes, I will add tests for win/mac

Merged via the queue into openvinotoolkit:master with commit 373c001 Aug 8, 2025
110 of 114 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: WWB PR changes WWB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants