Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MPQEditor] Update MPQCircleSelector for visq processing #1549

Merged
merged 1 commit into from
May 11, 2023

Conversation

stamalakhov
Copy link
Contributor

This commit updates MPQCircleSelector for visq processing.

Its correctness is tested in #1543

Fresh draft: #1543
Full draft: #1505
Related: #1491

ONE-vscode-DCO-1.0-Signed-off-by: s.malakhov [email protected]

This commit updates MPQCircleSelector for visq processing.

ONE-vscode-DCO-1.0-Signed-off-by: s.malakhov <[email protected]>
@stamalakhov stamalakhov requested review from seanshpark and dayo09 May 2, 2023 10:02
@stamalakhov stamalakhov self-assigned this May 2, 2023

// check whether _visqData pretend to be valid
if (!("error" in this._visqData) || !("meta" in this._visqData)) {
this.onInvalidVISQData(visqPath);
Copy link
Contributor

@dayo09 dayo09 May 3, 2023

Choose a reason for hiding this comment

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

Q. What to you mean by 'pretend to be valid' here..?
This condition says that there is one "error" or one "meta" or none of them. It only excludes the case that both "error" and "meta" inside the json, so...?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The condition says, that _visqData should contain error section and meta section, otherwise (doesn't contain error or doesn't contain meta) it is treated as invalid.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The condition was meant to prevent user from loading other file, so it is very simple.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dayo09
The simplest form for _visqData to be valid is that it contains both "error" and "meta", otherwise it can be treated as invalid.
So negation of

("error" in _visqData) and ("meta" in _visqData)

gives us

("eror" isn't in _visqData) or ("meta" isn't in _visqData)

i.e. if _visqData doesn't contain either "error" or "meta" it can be treated as invalid.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dayo09
Do i need to remove this condition for now?

Copy link
Contributor

@dayo09 dayo09 May 3, 2023

Choose a reason for hiding this comment

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

Aha... I didn't know that. What I thought was: if it includes 'error', than isn't it 'invalid' itself?

The simplest form for _visqData to be valid is that it contains both "error" and "meta"

If so, I think if you make a function that describes the assumption, it will be easy to understand.!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aha... I didn't know that. What I thought was: if it includes 'error', than isn't it 'invalid' itself?

No. It's valid. Valid visq.json file should contain error along with meta section at least.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, sorry that now I understand it. So 'Error' is the error ratio. I thought it's a problematic log. Thanks for the explanation.

@stamalakhov stamalakhov requested a review from dayo09 May 3, 2023 05:35
@dayo09
Copy link
Contributor

dayo09 commented May 9, 2023

@seanshpark PTAL :-D

@seanshpark seanshpark requested review from a team and removed request for seanshpark May 10, 2023 01:31
Copy link
Collaborator

@jyoungyun jyoungyun left a comment

Choose a reason for hiding this comment

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

LGTM

@seanshpark seanshpark merged commit fae6d95 into Samsung:main May 11, 2023
@stamalakhov stamalakhov deleted the manual_MPQ_sel_br branch May 11, 2023 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants