cars 1.0.0a2__cp310-cp310-win_amd64.whl → 1.0.0a4__cp310-cp310-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cars might be problematic. Click here for more details.

Files changed (144) hide show
  1. cars/__init__.py +3 -3
  2. cars/applications/__init__.py +0 -3
  3. cars/applications/application.py +14 -6
  4. cars/applications/application_template.py +42 -0
  5. cars/applications/auxiliary_filling/abstract_auxiliary_filling_app.py +12 -2
  6. cars/applications/auxiliary_filling/auxiliary_filling_algo.py +2 -2
  7. cars/applications/auxiliary_filling/auxiliary_filling_from_sensors_app.py +95 -46
  8. cars/applications/auxiliary_filling/auxiliary_filling_wrappers.py +7 -6
  9. cars/applications/dem_generation/abstract_dem_generation_app.py +9 -5
  10. cars/applications/dem_generation/dem_generation_algo.py +1 -1
  11. cars/applications/dem_generation/dem_generation_wrappers.py +44 -59
  12. cars/applications/dem_generation/dichotomic_generation_app.py +9 -6
  13. cars/applications/dem_generation/rasterization_app.py +112 -43
  14. cars/applications/dense_match_filling/__init__.py +1 -1
  15. cars/applications/dense_match_filling/abstract_dense_match_filling_app.py +2 -15
  16. cars/applications/dense_match_filling/fill_disp_algo.py +32 -373
  17. cars/applications/dense_match_filling/fill_disp_wrappers.py +0 -343
  18. cars/applications/dense_match_filling/zero_padding_app.py +10 -5
  19. cars/applications/dense_matching/abstract_dense_matching_app.py +2 -1
  20. cars/applications/dense_matching/census_mccnn_sgm_app.py +48 -60
  21. cars/applications/dense_matching/cpp/dense_matching_cpp.cp310-win_amd64.dll.a +0 -0
  22. cars/applications/dense_matching/cpp/dense_matching_cpp.cp310-win_amd64.pyd +0 -0
  23. cars/applications/dense_matching/dense_matching_algo.py +48 -14
  24. cars/applications/dense_matching/dense_matching_wrappers.py +11 -3
  25. cars/applications/dense_matching/disparity_grid_algo.py +95 -79
  26. cars/applications/dense_matching/loaders/config_mapping.json +13 -0
  27. cars/applications/dense_matching/loaders/global_land_cover_map.tif +0 -0
  28. cars/applications/dense_matching/loaders/pandora_loader.py +169 -34
  29. cars/applications/dsm_filling/border_interpolation_app.py +11 -12
  30. cars/applications/dsm_filling/bulldozer_filling_app.py +16 -15
  31. cars/applications/dsm_filling/exogenous_filling_app.py +14 -14
  32. cars/applications/grid_generation/abstract_grid_generation_app.py +1 -1
  33. cars/applications/grid_generation/epipolar_grid_generation_app.py +4 -2
  34. cars/applications/grid_generation/grid_correction_app.py +4 -1
  35. cars/applications/grid_generation/grid_generation_algo.py +7 -2
  36. cars/applications/ground_truth_reprojection/abstract_ground_truth_reprojection_app.py +1 -1
  37. cars/applications/ground_truth_reprojection/direct_localization_app.py +2 -2
  38. cars/applications/ground_truth_reprojection/ground_truth_reprojection_algo.py +2 -1
  39. cars/applications/point_cloud_fusion/abstract_pc_fusion_app.py +0 -155
  40. cars/applications/point_cloud_fusion/mapping_to_terrain_tiles_app.py +0 -658
  41. cars/applications/point_cloud_fusion/pc_fusion_algo.py +0 -1339
  42. cars/applications/point_cloud_fusion/pc_fusion_wrappers.py +0 -869
  43. cars/applications/point_cloud_outlier_removal/abstract_outlier_removal_app.py +11 -6
  44. cars/applications/point_cloud_outlier_removal/outlier_removal_algo.py +9 -8
  45. cars/applications/point_cloud_outlier_removal/small_components_app.py +101 -270
  46. cars/applications/point_cloud_outlier_removal/statistical_app.py +120 -277
  47. cars/applications/rasterization/abstract_pc_rasterization_app.py +2 -1
  48. cars/applications/rasterization/rasterization_algo.py +18 -6
  49. cars/applications/rasterization/rasterization_wrappers.py +2 -1
  50. cars/applications/rasterization/simple_gaussian_app.py +88 -116
  51. cars/applications/resampling/abstract_resampling_app.py +1 -1
  52. cars/applications/resampling/bicubic_resampling_app.py +3 -1
  53. cars/applications/resampling/resampling_algo.py +60 -53
  54. cars/applications/resampling/resampling_wrappers.py +3 -1
  55. cars/applications/sparse_matching/abstract_sparse_matching_app.py +1 -1
  56. cars/applications/sparse_matching/sift_app.py +5 -25
  57. cars/applications/sparse_matching/sparse_matching_algo.py +3 -2
  58. cars/applications/sparse_matching/sparse_matching_wrappers.py +1 -1
  59. cars/applications/triangulation/abstract_triangulation_app.py +1 -1
  60. cars/applications/triangulation/line_of_sight_intersection_app.py +13 -11
  61. cars/applications/triangulation/pc_transform.py +552 -0
  62. cars/applications/triangulation/triangulation_algo.py +6 -4
  63. cars/applications/triangulation/triangulation_wrappers.py +1 -0
  64. cars/bundleadjustment.py +6 -6
  65. cars/cars.py +11 -9
  66. cars/core/cars_logging.py +80 -49
  67. cars/core/constants.py +0 -1
  68. cars/core/datasets.py +5 -2
  69. cars/core/geometry/abstract_geometry.py +364 -22
  70. cars/core/geometry/shareloc_geometry.py +112 -82
  71. cars/core/inputs.py +72 -19
  72. cars/core/outputs.py +1 -1
  73. cars/core/preprocessing.py +17 -3
  74. cars/core/projection.py +126 -6
  75. cars/core/tiling.py +10 -3
  76. cars/data_structures/cars_dataset.py +12 -10
  77. cars/data_structures/corresponding_tiles_tools.py +0 -103
  78. cars/data_structures/format_transformation.py +4 -1
  79. cars/devibrate.py +6 -3
  80. cars/extractroi.py +20 -21
  81. cars/orchestrator/cluster/abstract_cluster.py +15 -5
  82. cars/orchestrator/cluster/abstract_dask_cluster.py +6 -2
  83. cars/orchestrator/cluster/dask_jobqueue_utils.py +1 -1
  84. cars/orchestrator/cluster/log_wrapper.py +149 -22
  85. cars/orchestrator/cluster/mp_cluster/multiprocessing_cluster.py +12 -4
  86. cars/orchestrator/cluster/mp_cluster/multiprocessing_profiler.py +2 -2
  87. cars/orchestrator/cluster/pbs_dask_cluster.py +1 -1
  88. cars/orchestrator/cluster/sequential_cluster.py +5 -4
  89. cars/orchestrator/cluster/slurm_dask_cluster.py +1 -1
  90. cars/orchestrator/orchestrator.py +15 -4
  91. cars/orchestrator/registry/id_generator.py +1 -0
  92. cars/orchestrator/registry/saver_registry.py +2 -2
  93. cars/pipelines/conf_resolution/conf_final_resolution.json +5 -3
  94. cars/pipelines/default/default_pipeline.py +461 -1052
  95. cars/pipelines/parameters/advanced_parameters.py +91 -64
  96. cars/pipelines/parameters/advanced_parameters_constants.py +6 -5
  97. cars/pipelines/parameters/application_parameters.py +71 -0
  98. cars/pipelines/parameters/depth_map_inputs.py +0 -314
  99. cars/pipelines/parameters/dsm_inputs.py +40 -4
  100. cars/pipelines/parameters/output_parameters.py +44 -8
  101. cars/pipelines/parameters/sensor_inputs.py +122 -73
  102. cars/pipelines/parameters/sensor_inputs_constants.py +0 -2
  103. cars/pipelines/parameters/sensor_loaders/__init__.py +4 -3
  104. cars/pipelines/parameters/sensor_loaders/basic_classif_loader.py +106 -0
  105. cars/pipelines/parameters/sensor_loaders/{basic_sensor_loader.py → basic_image_loader.py} +16 -22
  106. cars/pipelines/parameters/sensor_loaders/pivot_classif_loader.py +121 -0
  107. cars/pipelines/parameters/sensor_loaders/{pivot_sensor_loader.py → pivot_image_loader.py} +10 -21
  108. cars/pipelines/parameters/sensor_loaders/sensor_loader.py +4 -6
  109. cars/pipelines/parameters/sensor_loaders/sensor_loader_template.py +1 -3
  110. cars/pipelines/pipeline_template.py +1 -3
  111. cars/pipelines/unit/unit_pipeline.py +676 -1070
  112. cars/starter.py +4 -3
  113. cars-1.0.0a4.dist-info/DELVEWHEEL +2 -0
  114. {cars-1.0.0a2.dist-info → cars-1.0.0a4.dist-info}/METADATA +135 -53
  115. {cars-1.0.0a2.dist-info → cars-1.0.0a4.dist-info}/RECORD +120 -134
  116. cars.libs/libgcc_s_seh-1-b2494fcbd4d80cf2c98fdd5261f6d850.dll +0 -0
  117. cars.libs/libstdc++-6-e9b0d12ae0e9555bbae55e8dfd08c3f7.dll +0 -0
  118. cars.libs/libwinpthread-1-7882d1b093714ccdfaf4e0789a817792.dll +0 -0
  119. cars/applications/dense_match_filling/cpp/__init__.py +0 -0
  120. cars/applications/dense_match_filling/cpp/dense_match_filling_cpp.cp310-win_amd64.dll.a +0 -0
  121. cars/applications/dense_match_filling/cpp/dense_match_filling_cpp.cp310-win_amd64.pyd +0 -0
  122. cars/applications/dense_match_filling/cpp/dense_match_filling_cpp.py +0 -72
  123. cars/applications/dense_match_filling/cpp/includes/dense_match_filling.hpp +0 -46
  124. cars/applications/dense_match_filling/cpp/meson.build +0 -9
  125. cars/applications/dense_match_filling/cpp/src/bindings.cpp +0 -11
  126. cars/applications/dense_match_filling/cpp/src/dense_match_filling.cpp +0 -142
  127. cars/applications/dense_match_filling/plane_app.py +0 -556
  128. cars/applications/hole_detection/__init__.py +0 -30
  129. cars/applications/hole_detection/abstract_hole_detection_app.py +0 -125
  130. cars/applications/hole_detection/cloud_to_bbox_app.py +0 -346
  131. cars/applications/hole_detection/hole_detection_algo.py +0 -144
  132. cars/applications/hole_detection/hole_detection_wrappers.py +0 -53
  133. cars/applications/point_cloud_denoising/__init__.py +0 -29
  134. cars/applications/point_cloud_denoising/abstract_pc_denoising_app.py +0 -273
  135. cars/applications/point_cloud_fusion/__init__.py +0 -30
  136. cars/applications/point_cloud_fusion/cloud_fusion_constants.py +0 -39
  137. cars/applications/sparse_matching/pandora_sparse_matching_app.py +0 -0
  138. cars/pipelines/parameters/depth_map_inputs_constants.py +0 -25
  139. cars-1.0.0a2.dist-info/DELVEWHEEL +0 -2
  140. cars.libs/libgcc_s_seh-1-f2b6825d483bdf14050493af93b5997d.dll +0 -0
  141. cars.libs/libstdc++-6-6b0059df6bc601df5a0f18a5805eea05.dll +0 -0
  142. cars.libs/libwinpthread-1-e01b8e85fd67c2b861f64d4ccc7df607.dll +0 -0
  143. {cars-1.0.0a2.dist-info → cars-1.0.0a4.dist-info}/WHEEL +0 -0
  144. {cars-1.0.0a2.dist-info → cars-1.0.0a4.dist-info}/entry_points.txt +0 -0
@@ -21,11 +21,12 @@
21
21
  """
22
22
  Contains functions for wrapper logs
23
23
  """
24
- # pylint: disable=too-many-lines
24
+ # pylint: disable=C0302
25
25
 
26
26
  import copy
27
27
  import cProfile
28
28
  import datetime
29
+ import functools
29
30
  import gc
30
31
  import io
31
32
  import logging
@@ -44,6 +45,8 @@ import numpy as np
44
45
  import pandas as pd
45
46
  import psutil
46
47
  from json_checker import Checker
48
+ from matplotlib.backends.backend_pdf import PdfPages
49
+ from PIL import Image
47
50
 
48
51
  from cars.core import cars_logging
49
52
  from cars.core.utils import safe_makedirs
@@ -496,11 +499,37 @@ def log_delta_memory(func, memory_start, memory_end):
496
499
  log_message(func, message)
497
500
 
498
501
 
502
+ def exception_safe(func):
503
+ """
504
+ Decorator for consistent exception handling in profiling functions
505
+
506
+ :param func: function to wrap
507
+ :return: wrapped function
508
+ """
509
+
510
+ @functools.wraps(func)
511
+ def wrapper(*args, **kwargs):
512
+ """
513
+ Catch error
514
+ """
515
+ try:
516
+ return func(*args, **kwargs)
517
+ except Exception as exc:
518
+ error_msg = (
519
+ f"Error in {func.__name__}: {type(exc).__name__}: {str(exc)}"
520
+ )
521
+ logging.error(error_msg)
522
+ cars_logging.add_profiling_message(f"ERROR - {error_msg}")
523
+ return None
524
+
525
+ return wrapper
526
+
527
+
528
+ @exception_safe
499
529
  def generate_summary(out_dir, used_conf, clean_worker_logs=False):
500
530
  """
501
531
  Generate Profiling summary
502
532
  """
503
-
504
533
  nb_workers = 1
505
534
  if "orchestrator" not in used_conf:
506
535
  first_key = next(iter(used_conf))
@@ -510,16 +539,15 @@ def generate_summary(out_dir, used_conf, clean_worker_logs=False):
510
539
  if "nb_workers" in used_conf["orchestrator"]:
511
540
  nb_workers = used_conf["orchestrator"]["nb_workers"]
512
541
 
513
- workers_log_dir = os.path.join(out_dir, "logs", "workers_log")
542
+ workers_log_dir = os.path.join(out_dir, "workers_log")
543
+ os.makedirs(workers_log_dir, exist_ok=True)
514
544
 
515
545
  log_file_main = os.path.join(
516
546
  workers_log_dir,
517
547
  "profiling.log",
518
548
  )
519
549
 
520
- out_profiling_main = os.path.join(
521
- out_dir, "logs", "profiling", "profiling.log"
522
- )
550
+ out_profiling_main = os.path.join(out_dir, "profiling", "profiling.log")
523
551
 
524
552
  log_files = [log_file_main, out_profiling_main]
525
553
 
@@ -640,7 +668,7 @@ def generate_summary(out_dir, used_conf, clean_worker_logs=False):
640
668
  cars_logging.add_profiling_message(message)
641
669
 
642
670
  # Generate png
643
- _, axs = plt.subplots(4, 2, figsize=(15, 15), layout="tight")
671
+ _, axs = plt.subplots(3, 2, figsize=(20, 20), layout="tight")
644
672
  # Fill
645
673
 
646
674
  generate_boxplot(
@@ -689,6 +717,14 @@ def generate_summary(out_dir, used_conf, clean_worker_logs=False):
689
717
  "calls",
690
718
  )
691
719
 
720
+ # file_name
721
+ profiling_plot = os.path.join(
722
+ out_dir,
723
+ "profiling",
724
+ "profiling_plots_histograms.png",
725
+ )
726
+ plt.savefig(profiling_plot)
727
+
692
728
  # Pie chart
693
729
 
694
730
  (name_task_workers, summary_workers) = filter_lists(
@@ -704,7 +740,7 @@ def generate_summary(out_dir, used_conf, clean_worker_logs=False):
704
740
  )
705
741
 
706
742
  (_, [pipeline_time]) = filter_lists(
707
- summary_names, summary_total_time, lambda name: "pipeline" in name
743
+ summary_names, summary_total_time, lambda name: "unit_pipeline" in name
708
744
  )
709
745
 
710
746
  (_, [multiprocessing_time]) = filter_lists(
@@ -717,8 +753,10 @@ def generate_summary(out_dir, used_conf, clean_worker_logs=False):
717
753
 
718
754
  total_time_workers = nb_workers * multiprocessing_time
719
755
 
756
+ _, axs2 = plt.subplots(2, 1, figsize=(40, 40), layout="tight")
757
+
720
758
  generate_pie_chart(
721
- axs.flat[6],
759
+ axs2.flat[0],
722
760
  name_task_workers,
723
761
  100 * np.array(summary_workers) / total_time_workers,
724
762
  "Total time in parallel tasks ({} workers) : {}".format(
@@ -728,7 +766,7 @@ def generate_summary(out_dir, used_conf, clean_worker_logs=False):
728
766
  )
729
767
 
730
768
  generate_pie_chart(
731
- axs.flat[7],
769
+ axs2.flat[1],
732
770
  name_task_main,
733
771
  100 * np.array(summary_main) / sequential_time,
734
772
  "Total time in sequential tasks : {}".format(
@@ -736,19 +774,103 @@ def generate_summary(out_dir, used_conf, clean_worker_logs=False):
736
774
  ),
737
775
  )
738
776
 
739
- # file_name
740
- profiling_plot = os.path.join(
777
+ profiling_plot2 = os.path.join(
741
778
  out_dir,
742
- "logs",
743
779
  "profiling",
744
- "profiling_plots.png",
780
+ "profiling_plots_pie_chart.png",
745
781
  )
746
- plt.savefig(profiling_plot)
782
+ plt.savefig(profiling_plot2)
747
783
 
748
784
  if clean_worker_logs and os.path.exists(workers_log_dir):
749
785
  shutil.rmtree(workers_log_dir)
750
786
 
751
787
 
788
+ def generate_pdf_profiling(log_dir):
789
+ """
790
+ Generate PDF profiling summary for all res
791
+ """
792
+
793
+ pages_data = {}
794
+ resolutions = []
795
+
796
+ for item in os.listdir(log_dir):
797
+ item_path = os.path.join(log_dir, item)
798
+ if os.path.isdir(item_path) and item.startswith("res"):
799
+ # Get resolution
800
+ res = int(item[4:])
801
+ resolutions.append(res)
802
+
803
+ # Add paths
804
+ pages_data[res] = {
805
+ "function_profiling_histo": os.path.join(
806
+ item_path, "profiling", "profiling_plots_histo.png"
807
+ ),
808
+ "function_profiling_pie_chart": os.path.join(
809
+ item_path, "profiling", "profiling_plots_pie_chart.png"
810
+ ),
811
+ "global_profiling": os.path.join(
812
+ item_path, "profiling", "memory_profiling.png"
813
+ ),
814
+ }
815
+
816
+ # ordered resolutions
817
+ resolutions.sort(reverse=True)
818
+
819
+ # Build pdf
820
+ pdf_path = os.path.join(log_dir, "profiling_summary.pdf")
821
+
822
+ with PdfPages(pdf_path) as pdf:
823
+ for res in resolutions:
824
+ # function_profiling
825
+ if os.path.exists(pages_data[res]["function_profiling_histo"]):
826
+ img = Image.open(pages_data[res]["function_profiling_histo"])
827
+ fig, axis = plt.subplots(1, 1, figsize=(11.69, 8.27), dpi=300)
828
+ axis.imshow(img, interpolation="none")
829
+ axis.set_title(
830
+ f"Function Profiling Histograms - "
831
+ f"Epipolar Resolution {res}",
832
+ fontsize=16,
833
+ fontweight="bold",
834
+ )
835
+ axis.axis("off")
836
+ plt.subplots_adjust(left=0, right=1, top=0.95, bottom=0)
837
+ pdf.savefig(fig, bbox_inches="tight", dpi=300)
838
+ plt.close(fig)
839
+
840
+ if os.path.exists(pages_data[res]["function_profiling_pie_chart"]):
841
+ img = Image.open(
842
+ pages_data[res]["function_profiling_pie_chart"]
843
+ )
844
+ fig, axis = plt.subplots(1, 1, figsize=(11.69, 8.27), dpi=300)
845
+ axis.imshow(img, interpolation="none")
846
+ axis.set_title(
847
+ f"Function Profiling Pie Chart - Epipolar Resolution {res}",
848
+ fontsize=16,
849
+ fontweight="bold",
850
+ )
851
+ axis.axis("off")
852
+ plt.subplots_adjust(left=0, right=1, top=0.95, bottom=0)
853
+ pdf.savefig(fig, bbox_inches="tight", dpi=300)
854
+ plt.close(fig)
855
+
856
+ # global_profiling
857
+ if os.path.exists(pages_data[res]["global_profiling"]):
858
+ img = Image.open(pages_data[res]["global_profiling"])
859
+ fig, axis = plt.subplots(1, 1, figsize=(11.69, 8.27), dpi=300)
860
+ axis.imshow(img, interpolation="none")
861
+ axis.set_title(
862
+ f"Global Profiling - Epipolar Resolution {res}",
863
+ fontsize=16,
864
+ fontweight="bold",
865
+ )
866
+ axis.axis("off")
867
+ plt.subplots_adjust(left=0, right=1, top=0.95, bottom=0)
868
+ pdf.savefig(fig, bbox_inches="tight", dpi=300)
869
+ plt.close(fig)
870
+
871
+ logging.info("PDF profiling summary generated: {}".format(pdf_path))
872
+
873
+
752
874
  def filter_lists(names, data, cond):
753
875
  """
754
876
  Filter lists with condition on name
@@ -776,7 +898,7 @@ def generate_boxplot(axis, names, data_full, title, data_type):
776
898
  axis.set_title(title)
777
899
 
778
900
 
779
- def generate_histo(
901
+ def generate_histo( # pylint: disable=too-many-positional-arguments
780
902
  axis, names, data, title, data_type, data_min_err=None, data_max_err=None
781
903
  ):
782
904
  """
@@ -815,8 +937,14 @@ def generate_pie_chart(axis, names, data, title):
815
937
  data.append(others)
816
938
  names.append("other")
817
939
 
818
- axis.pie(data, labels=names, autopct="%1.1f%%")
819
- axis.set_title(title)
940
+ axis.pie(
941
+ data,
942
+ labels=names,
943
+ autopct="%1.1f%%",
944
+ labeldistance=1.1,
945
+ textprops={"fontsize": 30},
946
+ )
947
+ axis.set_title(title, fontsize=40)
820
948
 
821
949
 
822
950
  def cars_profile(name=None, interval=0.1):
@@ -926,15 +1054,14 @@ class CarsMemProf(Thread):
926
1054
  # Get memory
927
1055
  current_mem = self.process.memory_info().rss
928
1056
 
929
- if current_mem > max_mem:
930
- max_mem = current_mem
1057
+ max_mem = max(max_mem, current_mem)
931
1058
 
932
1059
  # Get cpu max
933
1060
  current_cpu = self.process.cpu_percent(
934
1061
  interval=self.cpu_interval
935
1062
  )
936
- if current_cpu > max_cpu:
937
- max_cpu = current_cpu
1063
+
1064
+ max_cpu = max(max_cpu, current_cpu)
938
1065
 
939
1066
  if stop:
940
1067
  break
@@ -21,7 +21,7 @@
21
21
  """
22
22
  Contains abstract function for multiprocessing Cluster
23
23
  """
24
- # pylint: disable=too-many-lines
24
+ # pylint: disable=C0302
25
25
 
26
26
  import copy
27
27
  import itertools
@@ -83,8 +83,13 @@ class MultiprocessingCluster(abstract_cluster.AbstractCluster):
83
83
 
84
84
  # pylint: disable=too-many-instance-attributes
85
85
  @cars_profile(name="Multiprocessing orchestrator initialization")
86
- def __init__(
87
- self, conf_cluster, out_dir, launch_worker=True, data_to_propagate=None
86
+ def __init__( # pylint: disable=too-many-positional-arguments
87
+ self,
88
+ conf_cluster,
89
+ out_dir,
90
+ log_dir,
91
+ launch_worker=True,
92
+ data_to_propagate=None,
88
93
  ):
89
94
  """
90
95
  Init function of MultiprocessingCluster
@@ -102,10 +107,12 @@ class MultiprocessingCluster(abstract_cluster.AbstractCluster):
102
107
  logging.warning(message)
103
108
 
104
109
  self.out_dir = out_dir
110
+ self.log_dir = log_dir
105
111
  # call parent init
106
112
  super().__init__(
107
113
  conf_cluster,
108
114
  out_dir,
115
+ log_dir,
109
116
  launch_worker=launch_worker,
110
117
  data_to_propagate=data_to_propagate,
111
118
  )
@@ -202,7 +209,7 @@ class MultiprocessingCluster(abstract_cluster.AbstractCluster):
202
209
 
203
210
  self.profiler = MultiprocessingProfiler(
204
211
  self.pool,
205
- self.out_dir,
212
+ self.log_dir,
206
213
  self.checked_conf_cluster["max_ram_per_worker"],
207
214
  mp_dataframe=mp_dataframe,
208
215
  timer=timer,
@@ -459,6 +466,7 @@ class MultiprocessingCluster(abstract_cluster.AbstractCluster):
459
466
 
460
467
  return object_future
461
468
 
469
+ # pylint: disable=too-many-positional-arguments
462
470
  @staticmethod # noqa: C901
463
471
  def refresh_task_cache( # noqa: C901
464
472
  pool,
@@ -73,7 +73,7 @@ class MultiprocessingProfiler: # pylint: disable=too-few-public-methods
73
73
  Used to profile memory in processes
74
74
  """
75
75
 
76
- def __init__(
76
+ def __init__( # pylint: disable=too-many-positional-arguments
77
77
  self, pool, out_dir, max_ram_per_worker, mp_dataframe=None, timer=None
78
78
  ):
79
79
  """
@@ -88,7 +88,7 @@ class MultiprocessingProfiler: # pylint: disable=too-few-public-methods
88
88
  self.pool = pool
89
89
  self.out_dir = out_dir
90
90
  self.file_plot = os.path.join(
91
- self.out_dir, "logs", "profiling", "memory_profiling.png"
91
+ self.out_dir, "profiling", "memory_profiling.png"
92
92
  )
93
93
  os.makedirs(os.path.dirname(self.file_plot), exist_ok=True)
94
94
  self.max_ram_per_worker = max_ram_per_worker
@@ -108,7 +108,7 @@ class PbsDaskCluster(abstract_dask_cluster.AbstractDaskCluster):
108
108
  logging.info("Dask cluster closed")
109
109
 
110
110
 
111
- def start_cluster(
111
+ def start_cluster( # pylint: disable=too-many-positional-arguments
112
112
  nb_workers,
113
113
  walltime,
114
114
  out_dir,
@@ -37,7 +37,7 @@ class SequentialCluster(abstract_cluster.AbstractCluster):
37
37
  SequentialCluster
38
38
  """
39
39
 
40
- def __init__(self, conf_cluster, out_dir, launch_worker=True):
40
+ def __init__(self, conf_cluster, out_dir, log_dir, launch_worker=True):
41
41
  """
42
42
  Init function of SequentialCluster
43
43
 
@@ -45,7 +45,9 @@ class SequentialCluster(abstract_cluster.AbstractCluster):
45
45
 
46
46
  """
47
47
  # call parent init
48
- super().__init__(conf_cluster, out_dir, launch_worker=launch_worker)
48
+ super().__init__(
49
+ conf_cluster, out_dir, log_dir, launch_worker=launch_worker
50
+ )
49
51
 
50
52
  # retrieve parameters
51
53
  self.profiling = self.checked_conf_cluster["profiling"]
@@ -134,5 +136,4 @@ class SequentialCluster(abstract_cluster.AbstractCluster):
134
136
  :param future_list: future_list list
135
137
  """
136
138
 
137
- for future in future_list:
138
- yield future
139
+ yield from future_list
@@ -120,7 +120,7 @@ class SlurmDaskCluster(abstract_dask_cluster.AbstractDaskCluster):
120
120
  logging.info("Dask cluster closed")
121
121
 
122
122
 
123
- def start_cluster(
123
+ def start_cluster( # pylint: disable=too-many-positional-arguments
124
124
  nb_workers,
125
125
  walltime,
126
126
  out_dir,
@@ -22,7 +22,7 @@
22
22
  this module contains the orchestrator class
23
23
  """
24
24
 
25
- # pylint: disable=too-many-lines
25
+ # pylint: disable=C0302
26
26
 
27
27
  import collections
28
28
  import logging
@@ -80,10 +80,11 @@ class Orchestrator:
80
80
  # pylint: disable=too-many-instance-attributes
81
81
 
82
82
  # flake8: noqa: C901
83
- def __init__(
83
+ def __init__( # pylint: disable=too-many-positional-arguments
84
84
  self,
85
85
  orchestrator_conf=None,
86
86
  out_dir=None,
87
+ log_dir=None,
87
88
  launch_worker=True,
88
89
  out_json_path=None,
89
90
  ):
@@ -105,6 +106,11 @@ class Orchestrator:
105
106
  self.add_to_clean(self.out_dir)
106
107
  logging.debug("No out_dir defined")
107
108
 
109
+ if log_dir is not None:
110
+ self.log_dir = log_dir
111
+ else:
112
+ self.log_dir = os.path.join(self.out_dir, "logs")
113
+
108
114
  self.launch_worker = launch_worker
109
115
 
110
116
  # overload orchestrator_conf
@@ -137,7 +143,10 @@ class Orchestrator:
137
143
 
138
144
  # init cluster
139
145
  self.cluster = AbstractCluster( # pylint: disable=E0110
140
- orchestrator_conf, self.out_dir, launch_worker=self.launch_worker
146
+ orchestrator_conf,
147
+ self.out_dir,
148
+ self.log_dir,
149
+ launch_worker=self.launch_worker,
141
150
  )
142
151
  self.conf = self.cluster.get_conf()
143
152
 
@@ -202,7 +211,8 @@ class Orchestrator:
202
211
 
203
212
  return self.conf
204
213
 
205
- def add_to_save_lists(
214
+ @cars_profile(name="Add to save lists", interval=0.5)
215
+ def add_to_save_lists( # pylint: disable=too-many-positional-arguments
206
216
  self,
207
217
  file_name,
208
218
  tag,
@@ -546,6 +556,7 @@ class Orchestrator:
546
556
  self.cluster = AbstractCluster( # pylint: disable=E0110
547
557
  self.orchestrator_conf,
548
558
  self.out_dir,
559
+ self.log_dir,
549
560
  launch_worker=self.launch_worker,
550
561
  data_to_propagate=data_to_propagate,
551
562
  )
@@ -72,6 +72,7 @@ class IdGenerator:
72
72
  # Check if dataset already registered
73
73
  registered = False
74
74
  allready_registered_id = None
75
+ returned_id = None
75
76
  for registry in self.registries:
76
77
  (
77
78
  is_registered,
@@ -158,7 +158,7 @@ class CarsDatasetsRegistrySaver(AbstractCarsDatasetRegistry):
158
158
  else:
159
159
  logging.debug("Future result tile is None -> not saved")
160
160
 
161
- def add_file_to_save(
161
+ def add_file_to_save( # pylint: disable=too-many-positional-arguments
162
162
  self,
163
163
  file_name,
164
164
  cars_ds,
@@ -247,7 +247,7 @@ class SingleCarsDatasetSaver:
247
247
  self.count = 0
248
248
  self.folder_name = None
249
249
 
250
- def add_file(
250
+ def add_file( # pylint: disable=too-many-positional-arguments
251
251
  self,
252
252
  file_name,
253
253
  tag=None,
@@ -1,7 +1,9 @@
1
1
  {
2
- "dense_matching": {
3
- "confidence_filtering": {
4
- "activated": false
2
+ "applications" : {
3
+ "dense_matching": {
4
+ "confidence_filtering": {
5
+ "activated": false
6
+ }
5
7
  }
6
8
  }
7
9
  }