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

Make shortcuts for imports #543

Closed
wants to merge 6 commits into from

Conversation

mimi030
Copy link

@mimi030 mimi030 commented Apr 19, 2024

Amendments Overview:
This pull request introduces the following improvements:

  • Simplified import statements in the 'losses' module.
  • Simplified imports from the 'miners' module.
  • Simplified import paths for the 'models' module.
  • Simplified import statements in the 'samplers' module.
  • Simplified import examples in the 'Features Extraction' documentation.
  • Simplified imports from 'losses', 'models', 'miners', and 'samplers' within the '/oml' module.

Notes:
After implementing these changes, running make run_short_tests revealed 29 errors in test files that remain untouched. Further guidance is needed to determine whether the tests require updating or additional actions.


================================== short test summary info ==================================
ERROR tests/test_integrations/test_lightning/test_parser.py
ERROR tests/test_integrations/test_lightning/test_pipeline.py
ERROR tests/test_integrations/test_lightning/test_train_with_sequence.py
ERROR tests/test_integrations/test_retrieval_validation.py
ERROR tests/test_integrations/test_train_with_mining.py
ERROR tests/test_oml/test_datasets/test_list_dataest.py
ERROR tests/test_oml/test_ddp/test_ddp_inference.py
ERROR tests/test_oml/test_ddp/test_loader_patcher.py
ERROR tests/test_oml/test_losses/test_logs_for_triplet_with_bank.py
ERROR tests/test_oml/test_losses/test_triplet.py
ERROR tests/test_oml/test_metrics/test_embedding_metrics.py
ERROR tests/test_oml/test_miners/test_cross_batch.py
ERROR tests/test_oml/test_miners/test_inbatch_all_tri.py
ERROR tests/test_oml/test_miners/test_inbatch_hard_cluster.py
ERROR tests/test_oml/test_miners/test_inbatch_hard_tri.py
ERROR tests/test_oml/test_miners/test_inbatch_nhard_tri.py
ERROR tests/test_oml/test_miners/test_miner_with_bank.py
ERROR tests/test_oml/test_models/test_models_creation.py
ERROR tests/test_oml/test_models/test_siamese.py
ERROR tests/test_oml/test_models/test_utils.py
ERROR tests/test_oml/test_models/test_visualisations.py
ERROR tests/test_oml/test_postprocessor/test_pairwise_embeddings.py
ERROR tests/test_oml/test_postprocessor/test_pairwise_images.py
ERROR tests/test_oml/test_registry/test_registry.py
ERROR tests/test_oml/test_samplers/test_balance.py
ERROR tests/test_oml/test_samplers/test_category_balance.py
ERROR tests/test_oml/test_transforms/test_image_augs.py
ERROR tests/test_runs/test_ddp_cases/test_experiments_equality.py
ERROR tests/test_runs/test_ddp_cases/test_train_with_metrics.py
!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 29 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!
====================== 53 deselected, 17 warnings, 29 errors in 8.83s =======================
make: *** [run_short_tests] Error 2

@AlekseySh AlekseySh added this to In progress in OML-planning via automation Apr 20, 2024
@AlekseySh AlekseySh linked an issue Apr 20, 2024 that may be closed by this pull request
@AlekseySh
Copy link
Contributor

Hey! Most likely you faced with circular imports problem. So, you can either avoid making shortcuts for some objects, or to move the objects leading to the errors to other .py files or create new ones for them.
PS. I was expecting it may happen... so, nobody said it would be easy. I hope you will find a solution. :)

@mimi030
Copy link
Author

mimi030 commented Apr 24, 2024

I see, will work on this week :)

@AlekseySh
Copy link
Contributor

seems like we have more fresh version of this here: #554

@AlekseySh AlekseySh closed this May 10, 2024
OML-planning automation moved this from In progress to Done May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Make shortcuts for imports
2 participants