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

Fix zero-shot learn for ov model #3601

Merged
merged 7 commits into from
Jun 13, 2024

Conversation

sungchul2
Copy link
Contributor

@sungchul2 sungchul2 commented Jun 11, 2024

Summary

This PR includes:

  • Fix index error when concatenating original self.used_indices and label.
    • self.used_indices was numpy array with ndim=1, but label was numpy array with ndim=0 or single integer.
      ...
         self.used_indices: np.ndarray = np.concatenate((self.used_indices, label))
      ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 1 dimension(s) and the array at index 1 has 0 dimension(s)
  • Enable to handle threshold and num_bg_points for infer through args
  • Update related tests
  • Add integration tests for infer without pre-defined reference_info in tests/integration/cli/test_export_inference.py
    • order for tests:
      • otx train
      • otx test w/o reference_info -> implicitly re-run otx train for torch model
      • otx test w/ reference_info
      • otx export
      • otx test exported model w/o reference_info -> implicitly re-run otx train for exported model
      • otx test exported model w/ reference_info
      • otx optimize
      • otx test optimized model w/o reference_info -> implicitly re-run otx train for optimized model
      • otx test optimized model w/ reference_info

How to test

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have ran e2e tests and there is no issues.
  • I have added the description of my changes into CHANGELOG in my target branch (e.g., CHANGELOG in develop).​
  • I have updated the documentation in my target branch accordingly (e.g., documentation in develop).
  • I have linked related issues.

License

  • I submit my code changes under the same Apache License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below).
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

@github-actions github-actions bot added TEST Any changes in tests OTX 2.0 labels Jun 11, 2024
@sovrasov
Copy link
Contributor

@sungchul2 do we have now an integration test for OVModel.learn()?

@sungchul2
Copy link
Contributor Author

@sungchul2 do we have now an integration test for OVModel.learn()?

Added at 6c524ff.

@sungchul2 sungchul2 merged commit 7425861 into openvinotoolkit:develop Jun 13, 2024
13 checks passed
@sungchul2 sungchul2 deleted the fix-zsl-ov-learn branch June 13, 2024 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TEST Any changes in tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants