Skip to content

Accuracy check YML#277

Open
Semyon1104 wants to merge 50 commits intomainfrom
Semyon1104/Acc_Parametrized
Open

Accuracy check YML#277
Semyon1104 wants to merge 50 commits intomainfrom
Semyon1104/Acc_Parametrized

Conversation

@Semyon1104
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Mar 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.49%. Comparing base (dd595d7) to head (879d51d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #277   +/-   ##
=======================================
  Coverage   84.49%   84.49%           
=======================================
  Files          59       59           
  Lines        3632     3632           
  Branches     2184     2184           
=======================================
  Hits         3069     3069           
  Misses        278      278           
  Partials      285      285           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@aobolensk aobolensk left a comment

Choose a reason for hiding this comment

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

General: please make pre-commit check smaller and leave full scope testing for nightly

Comment on lines +56 to +57
if (num_photo < 1 || num_photo > 50000) {
std::cerr << "Warning: num_photo should be between 1 and 10000 "
Copy link
Member

Choose a reason for hiding this comment

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

10000 or 50000?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

there are 50k photos in the dataset, and in theory, you can specify 50k

Copy link
Member

Choose a reason for hiding this comment

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

Please, fix the Warning string

std::cerr << "No images found in dataset path: " << dataset_path << '\n';
return 1;
}
size_t images_per_class_base = num_photo / 1000;
Copy link
Member

Choose a reason for hiding this comment

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

explain magic constant 1000

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

num of output classes

Copy link
Member

Choose a reason for hiding this comment

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

Can we create a variable (constant) with that name in the code and use it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

accuracy_value_${{ matrix.model }}.txt

- name: Update README for model (master only)
if: github.ref == 'refs/heads/master'
Copy link
Member

Choose a reason for hiding this comment

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

Our main branch is called main this code will not be run whatsoever

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed


parser = argparse.ArgumentParser(description='Конвертация моделей в JSON формат')
parser.add_argument('model_name', type=str,
choices=['googlenet', 'densenet', 'resnet', 'yolo', 'alexnet'],
Copy link
Member

Choose a reason for hiding this comment

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

"alexnet" is not present in model_files and output_files dict keys. Is that expected?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Comment on lines +577 to +580
else
echo "Плейсхолдер для ${{ matrix.model }} не найден в README, добавляем в конец"
echo -e "\n## ${{ matrix.model }} Accuracy\n<!--ACCURACY_${{ matrix.model }}_PLACEHOLDER-->Accuracy: ${ACCURACY}% (updated: ${DATE})<!--END_ACCURACY_${{ matrix.model }}-->\n" >> README.md
fi
Copy link
Member

Choose a reason for hiding this comment

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

It is better to report an error if we didn't find something

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

ACCURACY=$(cat accuracy_value_${{ matrix.model }}.txt | sed 's/%//g')
DATE=$(date '+%Y-%m-%d')

if grep -q "<!--ACCURACY_${{ matrix.model }}_PLACEHOLDER-->" README.md; then
Copy link
Member

Choose a reason for hiding this comment

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

Should we update README in that regard? Since we have more model and only one placeholder as of now

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

options.threads = std::stoi(argv[++i]);
} else {
try {
num_photo = std::stoi(argv[i]);
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we inctrment i here as it is already done in the other options?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't understand, we'll have a loop iteration, and i will be correctly assigned to numPhoto. We don't specify --numPhoto

Copy link
Member

Choose a reason for hiding this comment

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

I'm just not sure why it differs from other optons handling

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The difference is that num_photo is a positional argument, not a flag with a parameter. For other options (--model, --threads, etc.), we first read the flag and then its value. For num_photo, we simply read the number directly.

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.

3 participants