Skip to content

Commit

Permalink
matchdg as trainer
Browse files Browse the repository at this point in the history
  • Loading branch information
smilesun committed Dec 15, 2023
1 parent a0fc040 commit 2509706
Show file tree
Hide file tree
Showing 203 changed files with 4,539 additions and 7,498 deletions.
Binary file modified docs/build/doctrees/docDIAL.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/docHDUVA.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/docJiGen.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/docMatchDG.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/doc_MNIST_classification.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/doc_benchmark.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/doc_custom_nn.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/doc_diva.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/doc_examples.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/doc_extend_contribute.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/doc_output.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/doc_tasks.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/domainlab.algos.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/domainlab.algos.msels.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/domainlab.algos.observers.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/domainlab.algos.trainers.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/domainlab.compos.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/domainlab.compos.nn_zoo.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/domainlab.compos.pcr.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/domainlab.compos.vae.compos.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/domainlab.compos.vae.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/domainlab.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/domainlab.dsets.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/domainlab.exp_protocol.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/domainlab.models.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/domainlab.tasks.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/domainlab.utils.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/modules.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/readme_link.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/requirements.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/tips.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/html/.buildinfo
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: 48d0245515a1ca80bc37c0931e40c20f
config: d2e43a5090aafd748f0e5b4818bb42b0
tags: 645f666f9bcd5a90fca523b33c5a78b7
35 changes: 14 additions & 21 deletions docs/build/html/_modules/domainlab/algos/a_algo_builder.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

<!DOCTYPE html>

<html lang="en" data-content_root="../../../">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand Down Expand Up @@ -48,11 +49,12 @@


<title>domainlab.algos.a_algo_builder &#8212; domainlab documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/material.css?v=79c92029" />
<script src="../../../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/material.css" />
<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
Expand Down Expand Up @@ -104,7 +106,7 @@
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" action="../../../search.html" method="get" name="search">
<input type="text" class="md-search__input" name="q" placeholder=""Search""
<input type="text" class="md-search__input" name="q" placeholder="Search"
autocapitalize="off" autocomplete="off" spellcheck="false"
data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
Expand Down Expand Up @@ -297,9 +299,7 @@ <h1 id="modules-domainlab-algos-a-algo-builder--page-root">Source code for domai
from domainlab.utils.logger import Logger


<div class="viewcode-block" id="NodeAlgoBuilder">
<a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.a_algo_builder.NodeAlgoBuilder">[docs]</a>
class NodeAlgoBuilder(AbstractChainNodeHandler):
<div class="viewcode-block" id="NodeAlgoBuilder"><a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.a_algo_builder.NodeAlgoBuilder">[docs]</a>class NodeAlgoBuilder(AbstractChainNodeHandler):
"""
Base class for Algorithm Builder
"""
Expand All @@ -319,24 +319,17 @@ <h1 id="modules-domainlab-algos-a-algo-builder--page-root">Source code for domai
"the current class is named: ", na_class)
return type(self).__name__[len_prefix:].lower()

<div class="viewcode-block" id="NodeAlgoBuilder.is_myjob">
<a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.a_algo_builder.NodeAlgoBuilder.is_myjob">[docs]</a>
def is_myjob(self, request):
<div class="viewcode-block" id="NodeAlgoBuilder.is_myjob"><a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.a_algo_builder.NodeAlgoBuilder.is_myjob">[docs]</a> def is_myjob(self, request):
"""
:param request: string
"""
return request == self.name</div>


<div class="viewcode-block" id="NodeAlgoBuilder.init_business">
<a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.a_algo_builder.NodeAlgoBuilder.init_business">[docs]</a>
@abc.abstractmethod
<div class="viewcode-block" id="NodeAlgoBuilder.init_business"><a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.a_algo_builder.NodeAlgoBuilder.init_business">[docs]</a> @abc.abstractmethod
def init_business(self, exp):
"""
combine model, trainer, observer, task
"""</div>
</div>

"""</div></div>
</pre></div>

</article>
Expand All @@ -361,7 +354,7 @@ <h1 id="modules-domainlab-algos-a-algo-builder--page-root">Source code for domai

</div>
Created using
<a href="http://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
<a href="http://www.sphinx-doc.org/">Sphinx</a> 4.4.0.
and
<a href="https://github.com/bashtage/sphinx-material/">Material for
Sphinx</a>
Expand Down
30 changes: 13 additions & 17 deletions docs/build/html/_modules/domainlab/algos/builder_api_model.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

<!DOCTYPE html>

<html lang="en" data-content_root="../../../">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand Down Expand Up @@ -48,11 +49,12 @@


<title>domainlab.algos.builder_api_model &#8212; domainlab documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/material.css?v=79c92029" />
<script src="../../../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/material.css" />
<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
Expand Down Expand Up @@ -104,7 +106,7 @@
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" action="../../../search.html" method="get" name="search">
<input type="text" class="md-search__input" name="q" placeholder=""Search""
<input type="text" class="md-search__input" name="q" placeholder="Search"
autocapitalize="off" autocomplete="off" spellcheck="false"
data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
Expand Down Expand Up @@ -300,15 +302,11 @@ <h1 id="modules-domainlab-algos-builder-api-model--page-root">Source code for do
from domainlab.utils.utils_cuda import get_device


<div class="viewcode-block" id="NodeAlgoBuilderAPIModel">
<a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.builder_api_model.NodeAlgoBuilderAPIModel">[docs]</a>
class NodeAlgoBuilderAPIModel(NodeAlgoBuilder):
<div class="viewcode-block" id="NodeAlgoBuilderAPIModel"><a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.builder_api_model.NodeAlgoBuilderAPIModel">[docs]</a>class NodeAlgoBuilderAPIModel(NodeAlgoBuilder):
"""
build algorithm from API coded model with custom backbone
"""
<div class="viewcode-block" id="NodeAlgoBuilderAPIModel.init_business">
<a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.builder_api_model.NodeAlgoBuilderAPIModel.init_business">[docs]</a>
def init_business(self, exp):
<div class="viewcode-block" id="NodeAlgoBuilderAPIModel.init_business"><a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.builder_api_model.NodeAlgoBuilderAPIModel.init_business">[docs]</a> def init_business(self, exp):
"""
return trainer, model, observer
"""
Expand All @@ -317,9 +315,7 @@ <h1 id="modules-domainlab-algos-builder-api-model--page-root">Source code for do
model_sel = MSelOracleVisitor(MSelValPerf(max_es=args.es))
observer = ObVisitor(model_sel)
trainer = TrainerChainNodeGetter(args.trainer)(default="hyperscheduler")
return trainer, None, observer, device</div>
</div>

return trainer, None, observer, device</div></div>
</pre></div>

</article>
Expand All @@ -344,7 +340,7 @@ <h1 id="modules-domainlab-algos-builder-api-model--page-root">Source code for do

</div>
Created using
<a href="http://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
<a href="http://www.sphinx-doc.org/">Sphinx</a> 4.4.0.
and
<a href="https://github.com/bashtage/sphinx-material/">Material for
Sphinx</a>
Expand Down
23 changes: 11 additions & 12 deletions docs/build/html/_modules/domainlab/algos/builder_custom.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

<!DOCTYPE html>

<html lang="en" data-content_root="../../../">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand Down Expand Up @@ -48,11 +49,12 @@


<title>domainlab.algos.builder_custom &#8212; domainlab documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/material.css?v=79c92029" />
<script src="../../../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/material.css" />
<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
Expand Down Expand Up @@ -104,7 +106,7 @@
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" action="../../../search.html" method="get" name="search">
<input type="text" class="md-search__input" name="q" placeholder=""Search""
<input type="text" class="md-search__input" name="q" placeholder="Search"
autocapitalize="off" autocomplete="off" spellcheck="false"
data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
Expand Down Expand Up @@ -298,9 +300,7 @@ <h1 id="modules-domainlab-algos-builder-custom--page-root">Source code for domai
from domainlab.utils.utils_cuda import get_device


<div class="viewcode-block" id="make_basic_trainer">
<a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.builder_custom.make_basic_trainer">[docs]</a>
def make_basic_trainer(class_name_model):
<div class="viewcode-block" id="make_basic_trainer"><a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.builder_custom.make_basic_trainer">[docs]</a>def make_basic_trainer(class_name_model):
"""make_basic_trainer.
:param class_name_model:
"""
Expand Down Expand Up @@ -394,7 +394,6 @@ <h1 id="modules-domainlab-algos-builder-custom--page-root">Source code for domai
trainer.init_business(model, task, observer, device, args)
return trainer, model, observer, device
return NodeAlgoBuilderCustom</div>

</pre></div>

</article>
Expand All @@ -419,7 +418,7 @@ <h1 id="modules-domainlab-algos-builder-custom--page-root">Source code for domai

</div>
Created using
<a href="http://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
<a href="http://www.sphinx-doc.org/">Sphinx</a> 4.4.0.
and
<a href="https://github.com/bashtage/sphinx-material/">Material for
Sphinx</a>
Expand Down
30 changes: 13 additions & 17 deletions docs/build/html/_modules/domainlab/algos/builder_dann.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

<!DOCTYPE html>

<html lang="en" data-content_root="../../../">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand Down Expand Up @@ -48,11 +49,12 @@


<title>domainlab.algos.builder_dann &#8212; domainlab documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/material.css?v=79c92029" />
<script src="../../../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/material.css" />
<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
Expand Down Expand Up @@ -104,7 +106,7 @@
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" action="../../../search.html" method="get" name="search">
<input type="text" class="md-search__input" name="q" placeholder=""Search""
<input type="text" class="md-search__input" name="q" placeholder="Search"
autocapitalize="off" autocomplete="off" spellcheck="false"
data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
Expand Down Expand Up @@ -306,15 +308,11 @@ <h1 id="modules-domainlab-algos-builder-dann--page-root">Source code for domainl
from domainlab.utils.utils_cuda import get_device


<div class="viewcode-block" id="NodeAlgoBuilderDANN">
<a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.builder_dann.NodeAlgoBuilderDANN">[docs]</a>
class NodeAlgoBuilderDANN(NodeAlgoBuilder):
<div class="viewcode-block" id="NodeAlgoBuilderDANN"><a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.builder_dann.NodeAlgoBuilderDANN">[docs]</a>class NodeAlgoBuilderDANN(NodeAlgoBuilder):
"""
NodeAlgoBuilderDANN
"""
<div class="viewcode-block" id="NodeAlgoBuilderDANN.init_business">
<a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.builder_dann.NodeAlgoBuilderDANN.init_business">[docs]</a>
def init_business(self, exp):
<div class="viewcode-block" id="NodeAlgoBuilderDANN.init_business"><a class="viewcode-back" href="../../../domainlab.algos.html#domainlab.algos.builder_dann.NodeAlgoBuilderDANN.init_business">[docs]</a> def init_business(self, exp):
"""
return trainer, model, observer
"""
Expand Down Expand Up @@ -361,9 +359,7 @@ <h1 id="modules-domainlab-algos-builder-dann--page-root">Source code for domainl
total_steps=trainer.num_batches*args.epos,
flag_update_epoch=False,
flag_update_batch=True)
return trainer, model, observer, device</div>
</div>

return trainer, model, observer, device</div></div>
</pre></div>

</article>
Expand All @@ -388,7 +384,7 @@ <h1 id="modules-domainlab-algos-builder-dann--page-root">Source code for domainl

</div>
Created using
<a href="http://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
<a href="http://www.sphinx-doc.org/">Sphinx</a> 4.4.0.
and
<a href="https://github.com/bashtage/sphinx-material/">Material for
Sphinx</a>
Expand Down
Loading

0 comments on commit 2509706

Please sign in to comment.