generated from ashleve/lightning-hydra-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ fff0149 🚀
- Loading branch information
1 parent
0d16c8b
commit c60e800
Showing
30 changed files
with
97 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 7da5eb014733f8246883ccbde337b5e1 | ||
config: 0bf5b48386bd7abd7f3121a47b659865 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Overview: module code — lidar_prod V1.10.2 documentation</title> | ||
<title>Overview: module code — lidar_prod V1.10.3 documentation</title> | ||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" /> | ||
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" /> | ||
<link rel="stylesheet" type="text/css" href="../_static/sphinx_paramlinks.css" /> | ||
|
@@ -15,7 +15,7 @@ | |
|
||
<script src="../_static/jquery.js?v=5d32c60e"></script> | ||
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="../_static/documentation_options.js?v=40ba251f"></script> | ||
<script src="../_static/documentation_options.js?v=e4c2a106"></script> | ||
<script src="../_static/doctools.js?v=888ff710"></script> | ||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>lidar_prod.commons.commons — lidar_prod V1.10.2 documentation</title> | ||
<title>lidar_prod.commons.commons — lidar_prod V1.10.3 documentation</title> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx_paramlinks.css" /> | ||
|
@@ -15,7 +15,7 @@ | |
|
||
<script src="../../../_static/jquery.js?v=5d32c60e"></script> | ||
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="../../../_static/documentation_options.js?v=40ba251f"></script> | ||
<script src="../../../_static/documentation_options.js?v=e4c2a106"></script> | ||
<script src="../../../_static/doctools.js?v=888ff710"></script> | ||
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>lidar_prod.run — lidar_prod V1.10.2 documentation</title> | ||
<title>lidar_prod.run — lidar_prod V1.10.3 documentation</title> | ||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=80d5e7a1" /> | ||
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" /> | ||
<link rel="stylesheet" type="text/css" href="../../_static/sphinx_paramlinks.css" /> | ||
|
@@ -15,7 +15,7 @@ | |
|
||
<script src="../../_static/jquery.js?v=5d32c60e"></script> | ||
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="../../_static/documentation_options.js?v=40ba251f"></script> | ||
<script src="../../_static/documentation_options.js?v=e4c2a106"></script> | ||
<script src="../../_static/doctools.js?v=888ff710"></script> | ||
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>lidar_prod.tasks.building_completion — lidar_prod V1.10.2 documentation</title> | ||
<title>lidar_prod.tasks.building_completion — lidar_prod V1.10.3 documentation</title> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx_paramlinks.css" /> | ||
|
@@ -15,7 +15,7 @@ | |
|
||
<script src="../../../_static/jquery.js?v=5d32c60e"></script> | ||
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="../../../_static/documentation_options.js?v=40ba251f"></script> | ||
<script src="../../../_static/documentation_options.js?v=e4c2a106"></script> | ||
<script src="../../../_static/doctools.js?v=888ff710"></script> | ||
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>lidar_prod.tasks.building_identification — lidar_prod V1.10.2 documentation</title> | ||
<title>lidar_prod.tasks.building_identification — lidar_prod V1.10.3 documentation</title> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx_paramlinks.css" /> | ||
|
@@ -15,7 +15,7 @@ | |
|
||
<script src="../../../_static/jquery.js?v=5d32c60e"></script> | ||
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="../../../_static/documentation_options.js?v=40ba251f"></script> | ||
<script src="../../../_static/documentation_options.js?v=e4c2a106"></script> | ||
<script src="../../../_static/doctools.js?v=888ff710"></script> | ||
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>lidar_prod.tasks.building_validation — lidar_prod V1.10.2 documentation</title> | ||
<title>lidar_prod.tasks.building_validation — lidar_prod V1.10.3 documentation</title> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx_paramlinks.css" /> | ||
|
@@ -15,7 +15,7 @@ | |
|
||
<script src="../../../_static/jquery.js?v=5d32c60e"></script> | ||
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="../../../_static/documentation_options.js?v=40ba251f"></script> | ||
<script src="../../../_static/documentation_options.js?v=e4c2a106"></script> | ||
<script src="../../../_static/doctools.js?v=888ff710"></script> | ||
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>lidar_prod.tasks.building_validation_optimization — lidar_prod V1.10.2 documentation</title> | ||
<title>lidar_prod.tasks.building_validation_optimization — lidar_prod V1.10.3 documentation</title> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx_paramlinks.css" /> | ||
|
@@ -15,7 +15,7 @@ | |
|
||
<script src="../../../_static/jquery.js?v=5d32c60e"></script> | ||
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="../../../_static/documentation_options.js?v=40ba251f"></script> | ||
<script src="../../../_static/documentation_options.js?v=e4c2a106"></script> | ||
<script src="../../../_static/doctools.js?v=888ff710"></script> | ||
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script> | ||
|
@@ -156,6 +156,8 @@ <h1>Source code for lidar_prod.tasks.building_validation_optimization</h1><div c | |
|
||
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span> | ||
<span class="kn">import</span> <span class="nn">optuna</span> | ||
<span class="kn">import</span> <span class="nn">yaml</span> | ||
<span class="kn">from</span> <span class="nn">omegaconf</span> <span class="kn">import</span> <span class="n">DictConfig</span><span class="p">,</span> <span class="n">OmegaConf</span> | ||
<span class="kn">from</span> <span class="nn">sklearn.metrics</span> <span class="kn">import</span> <span class="n">confusion_matrix</span> | ||
<span class="kn">from</span> <span class="nn">tqdm</span> <span class="kn">import</span> <span class="n">tqdm</span> | ||
|
||
|
@@ -355,6 +357,8 @@ <h1>Source code for lidar_prod.tasks.building_validation_optimization</h1><div c | |
<span class="n">mts_gt</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="n">c</span><span class="o">.</span><span class="n">target</span> <span class="k">for</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">clusters</span><span class="p">])</span> | ||
<span class="n">metrics_dict</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">evaluate_decisions</span><span class="p">(</span><span class="n">mts_gt</span><span class="p">,</span> <span class="n">decisions</span><span class="p">)</span> | ||
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="se">\n</span><span class="s2"> Results:</span><span class="se">\n</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_get_results_logs_str</span><span class="p">(</span><span class="n">metrics_dict</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">_save_results_to_yaml</span><span class="p">(</span><span class="n">metrics_dict</span><span class="p">)</span> | ||
|
||
<span class="k">return</span> <span class="n">metrics_dict</span></div> | ||
|
||
|
||
|
@@ -697,7 +701,31 @@ <h1>Source code for lidar_prod.tasks.building_validation_optimization</h1><div c | |
<span class="o">+</span> <span class="s2">"</span><span class="se">\n</span><span class="s2">Confusion Matrix (normalized)</span><span class="se">\n</span><span class="s2">"</span> | ||
<span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">metrics_dict</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">design</span><span class="o">.</span><span class="n">metrics</span><span class="o">.</span><span class="n">confusion_matrix_norm</span><span class="p">]</span><span class="o">.</span><span class="n">round</span><span class="p">(</span><span class="mi">3</span><span class="p">))</span> | ||
<span class="p">)</span> | ||
<span class="k">return</span> <span class="n">results_logs</span></div> | ||
<span class="k">return</span> <span class="n">results_logs</span> | ||
|
||
<span class="k">def</span> <span class="nf">_save_results_to_yaml</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">metrics_dict</span><span class="p">:</span> <span class="nb">dict</span><span class="p">):</span> | ||
<span class="n">out_dict</span> <span class="o">=</span> <span class="n">metrics_dict</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span> | ||
<span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">out_dict</span><span class="o">.</span><span class="n">items</span><span class="p">():</span> | ||
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">):</span> | ||
<span class="n">out_dict</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">v</span><span class="o">.</span><span class="n">tolist</span><span class="p">()</span> | ||
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">):</span> | ||
<span class="n">out_dict</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> | ||
|
||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">paths</span><span class="o">.</span><span class="n">evaluation_results_yaml</span><span class="p">:</span> | ||
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">paths</span><span class="o">.</span><span class="n">evaluation_results_yaml</span><span class="p">,</span> <span class="s2">"w"</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span> | ||
<span class="n">yaml</span><span class="o">.</span><span class="n">safe_dump</span><span class="p">(</span><span class="n">out_dict</span><span class="p">,</span> <span class="n">f</span><span class="p">)</span> | ||
|
||
<div class="viewcode-block" id="BuildingValidationOptimizer.save_config_with_optimized_thresolds"> | ||
<a class="viewcode-back" href="../../../apidoc/lidar_prod.tasks.html#lidar_prod.tasks.building_validation_optimization.BuildingValidationOptimizer.save_config_with_optimized_thresolds">[docs]</a> | ||
<span class="k">def</span> <span class="nf">save_config_with_optimized_thresolds</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">config</span><span class="p">:</span> <span class="n">DictConfig</span><span class="p">):</span> | ||
<span class="w"> </span><span class="sd">"""Save config the thresholds in the building_validation.application</span> | ||
<span class="sd"> part replaced by optimized thresholds"""</span> | ||
<span class="k">if</span> <span class="s2">"optimize"</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">todo</span><span class="p">:</span> | ||
<span class="n">optimized_cfg</span> <span class="o">=</span> <span class="n">config</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span> | ||
<span class="n">optimized_cfg</span><span class="o">.</span><span class="n">building_validation</span><span class="o">.</span><span class="n">application</span><span class="o">.</span><span class="n">thresholds</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">thresholds</span> | ||
<span class="n">out_path</span> <span class="o">=</span> <span class="n">config</span><span class="o">.</span><span class="n">building_validation</span><span class="o">.</span><span class="n">optimization</span><span class="o">.</span><span class="n">paths</span><span class="o">.</span><span class="n">output_optimized_config</span> | ||
<span class="n">OmegaConf</span><span class="o">.</span><span class="n">save</span><span class="p">(</span><span class="n">config</span><span class="o">=</span><span class="n">optimized_cfg</span><span class="p">,</span> <span class="n">f</span><span class="o">=</span><span class="n">out_path</span><span class="p">,</span> <span class="n">resolve</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span></div> | ||
</div> | ||
|
||
</pre></div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>lidar_prod.tasks.cleaning — lidar_prod V1.10.2 documentation</title> | ||
<title>lidar_prod.tasks.cleaning — lidar_prod V1.10.3 documentation</title> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx_paramlinks.css" /> | ||
|
@@ -15,7 +15,7 @@ | |
|
||
<script src="../../../_static/jquery.js?v=5d32c60e"></script> | ||
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="../../../_static/documentation_options.js?v=40ba251f"></script> | ||
<script src="../../../_static/documentation_options.js?v=e4c2a106"></script> | ||
<script src="../../../_static/doctools.js?v=888ff710"></script> | ||
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>lidar_prod.tasks.utils — lidar_prod V1.10.2 documentation</title> | ||
<title>lidar_prod.tasks.utils — lidar_prod V1.10.3 documentation</title> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" /> | ||
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx_paramlinks.css" /> | ||
|
@@ -15,7 +15,7 @@ | |
|
||
<script src="../../../_static/jquery.js?v=5d32c60e"></script> | ||
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="../../../_static/documentation_options.js?v=40ba251f"></script> | ||
<script src="../../../_static/documentation_options.js?v=e4c2a106"></script> | ||
<script src="../../../_static/doctools.js?v=888ff710"></script> | ||
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/mermaid.min.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.