diff --git a/AUTHORS.rst b/AUTHORS.rst new file mode 100644 index 0000000..258a092 --- /dev/null +++ b/AUTHORS.rst @@ -0,0 +1,5 @@ +============ +Contributors +============ + +* Mohannad Elhamod diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 0000000..226e6f5 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,10 @@ +========= +Changelog +========= + +Version 0.1 +=========== + +- Feature A added +- FIX: nasty bug #1729 fixed +- add your changes here! diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..d0d5772 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Mohannad Elhamod + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 1954514..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -# myhelpers diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..28650cf --- /dev/null +++ b/README.rst @@ -0,0 +1,19 @@ +========= +myhelpers +========= + + +utilities for ML stuff related to BGNN + + +Description +=========== + +A longer description of your project goes here... + + +Note +==== + +This project has been set up using PyScaffold 3.2.3. For details and usage +information on PyScaffold see https://pyscaffold.org/. diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..99ff57d --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,193 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = ../build/sphinx/ +AUTODOCDIR = api +AUTODOCBUILD = sphinx-apidoc +PROJECT = myhelpers +MODULEDIR = ../src/myhelpers + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext doc-requirements + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR)/* $(AUTODOCDIR) + +$(AUTODOCDIR): $(MODULEDIR) + mkdir -p $@ + $(AUTODOCBUILD) -f -o $@ $^ + +doc-requirements: $(AUTODOCDIR) + +html: doc-requirements + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: doc-requirements + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: doc-requirements + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: doc-requirements + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: doc-requirements + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: doc-requirements + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: doc-requirements + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/$(PROJECT).qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/$(PROJECT).qhc" + +devhelp: doc-requirements + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $HOME/.local/share/devhelp/$(PROJECT)" + @echo "# ln -s $(BUILDDIR)/devhelp $HOME/.local/share/devhelp/$(PROJEC)" + @echo "# devhelp" + +epub: doc-requirements + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +patch-latex: + find _build/latex -iname "*.tex" | xargs -- \ + sed -i'' 's~includegraphics{~includegraphics\[keepaspectratio,max size={\\textwidth}{\\textheight}\]{~g' + +latex: doc-requirements + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + $(MAKE) patch-latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: doc-requirements + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + $(MAKE) patch-latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: doc-requirements + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: doc-requirements + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: doc-requirements + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: doc-requirements + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: doc-requirements + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: doc-requirements + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: doc-requirements + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: doc-requirements + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: doc-requirements + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +xml: doc-requirements + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +pseudoxml: doc-requirements + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/docs/_static/.gitignore b/docs/_static/.gitignore new file mode 100644 index 0000000..3c96363 --- /dev/null +++ b/docs/_static/.gitignore @@ -0,0 +1 @@ +# Empty directory diff --git a/docs/authors.rst b/docs/authors.rst new file mode 100644 index 0000000..cd8e091 --- /dev/null +++ b/docs/authors.rst @@ -0,0 +1,2 @@ +.. _authors: +.. include:: ../AUTHORS.rst diff --git a/docs/changelog.rst b/docs/changelog.rst new file mode 100644 index 0000000..871950d --- /dev/null +++ b/docs/changelog.rst @@ -0,0 +1,2 @@ +.. _changes: +.. include:: ../CHANGELOG.rst diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..76922a5 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,272 @@ +# -*- coding: utf-8 -*- +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import os +import sys +import inspect +import shutil + +__location__ = os.path.join(os.getcwd(), os.path.dirname( + inspect.getfile(inspect.currentframe()))) + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.insert(0, os.path.join(__location__, '../src')) + +# -- Run sphinx-apidoc ------------------------------------------------------ +# This hack is necessary since RTD does not issue `sphinx-apidoc` before running +# `sphinx-build -b html . _build/html`. See Issue: +# https://github.com/rtfd/readthedocs.org/issues/1139 +# DON'T FORGET: Check the box "Install your project inside a virtualenv using +# setup.py install" in the RTD Advanced Settings. +# Additionally it helps us to avoid running apidoc manually + +try: # for Sphinx >= 1.7 + from sphinx.ext import apidoc +except ImportError: + from sphinx import apidoc + +output_dir = os.path.join(__location__, "api") +module_dir = os.path.join(__location__, "../src/myhelpers") +try: + shutil.rmtree(output_dir) +except FileNotFoundError: + pass + +try: + import sphinx + from pkg_resources import parse_version + + cmd_line_template = "sphinx-apidoc -f -o {outputdir} {moduledir}" + cmd_line = cmd_line_template.format(outputdir=output_dir, moduledir=module_dir) + + args = cmd_line.split(" ") + if parse_version(sphinx.__version__) >= parse_version('1.7'): + args = args[1:] + + apidoc.main(args) +except Exception as e: + print("Running `sphinx-apidoc` failed!\n{}".format(e)) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', + 'sphinx.ext.autosummary', 'sphinx.ext.viewcode', 'sphinx.ext.coverage', + 'sphinx.ext.doctest', 'sphinx.ext.ifconfig', 'sphinx.ext.mathjax', + 'sphinx.ext.napoleon'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'myhelpers' +copyright = u'2020, Mohannad Elhamod' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '' # Is set by calling `setup.py docs` +# The full version, including alpha/beta/rc tags. +release = '' # Is set by calling `setup.py docs` + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# today = '' +# Else, today_fmt is used as the format for a strftime call. +# today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +# add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +# modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +# keep_warnings = False + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'alabaster' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +html_theme_options = { + 'sidebar_width': '300px', + 'page_width': '1200px' +} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +try: + from myhelpers import __version__ as version +except ImportError: + pass +else: + release = version + +# A shorter title for the navigation bar. Default is the same as html_title. +# html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +# html_logo = "" + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +# html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# html_additional_pages = {} + +# If false, no module index is generated. +# html_domain_indices = True + +# If false, no index is generated. +# html_use_index = True + +# If true, the index is split into individual pages for each letter. +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'myhelpers-doc' + + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +# 'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +# 'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +# 'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'user_guide.tex', u'myhelpers Documentation', + u'Mohannad Elhamod', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# latex_logo = "" + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# latex_use_parts = False + +# If true, show page references after internal links. +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# latex_appendices = [] + +# If false, no module index is generated. +# latex_domain_indices = True + +# -- External mapping ------------------------------------------------------------ +python_version = '.'.join(map(str, sys.version_info[0:2])) +intersphinx_mapping = { + 'sphinx': ('http://www.sphinx-doc.org/en/stable', None), + 'python': ('https://docs.python.org/' + python_version, None), + 'matplotlib': ('https://matplotlib.org', None), + 'numpy': ('https://docs.scipy.org/doc/numpy', None), + 'sklearn': ('http://scikit-learn.org/stable', None), + 'pandas': ('http://pandas.pydata.org/pandas-docs/stable', None), + 'scipy': ('https://docs.scipy.org/doc/scipy/reference', None), +} diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..9a852f4 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,59 @@ +========= +myhelpers +========= + +This is the documentation of **myhelpers**. + +.. note:: + + This is the main page of your project's `Sphinx`_ documentation. + It is formatted in `reStructuredText`_. Add additional pages + by creating rst-files in ``docs`` and adding them to the `toctree`_ below. + Use then `references`_ in order to link them from this page, e.g. + :ref:`authors` and :ref:`changes`. + + It is also possible to refer to the documentation of other Python packages + with the `Python domain syntax`_. By default you can reference the + documentation of `Sphinx`_, `Python`_, `NumPy`_, `SciPy`_, `matplotlib`_, + `Pandas`_, `Scikit-Learn`_. You can add more by extending the + ``intersphinx_mapping`` in your Sphinx's ``conf.py``. + + The pretty useful extension `autodoc`_ is activated by default and lets + you include documentation from docstrings. Docstrings can be written in + `Google style`_ (recommended!), `NumPy style`_ and `classical style`_. + + +Contents +======== + +.. toctree:: + :maxdepth: 2 + + License + Authors + Changelog + Module Reference + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + +.. _toctree: http://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html +.. _reStructuredText: http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html +.. _references: http://www.sphinx-doc.org/en/stable/markup/inline.html +.. _Python domain syntax: http://sphinx-doc.org/domains.html#the-python-domain +.. _Sphinx: http://www.sphinx-doc.org/ +.. _Python: http://docs.python.org/ +.. _Numpy: http://docs.scipy.org/doc/numpy +.. _SciPy: http://docs.scipy.org/doc/scipy/reference/ +.. _matplotlib: https://matplotlib.org/contents.html# +.. _Pandas: http://pandas.pydata.org/pandas-docs/stable +.. _Scikit-Learn: http://scikit-learn.org/stable +.. _autodoc: http://www.sphinx-doc.org/en/stable/ext/autodoc.html +.. _Google style: https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings +.. _NumPy style: https://numpydoc.readthedocs.io/en/latest/format.html +.. _classical style: http://www.sphinx-doc.org/en/stable/domains.html#info-field-lists diff --git a/docs/license.rst b/docs/license.rst new file mode 100644 index 0000000..3989c51 --- /dev/null +++ b/docs/license.rst @@ -0,0 +1,7 @@ +.. _license: + +======= +License +======= + +.. include:: ../LICENSE.txt diff --git a/myhelpers.egg-info/PKG-INFO b/myhelpers.egg-info/PKG-INFO deleted file mode 100644 index c728460..0000000 --- a/myhelpers.egg-info/PKG-INFO +++ /dev/null @@ -1,10 +0,0 @@ -Metadata-Version: 1.0 -Name: myhelpers -Version: 1.0 -Summary: UNKNOWN -Home-page: UNKNOWN -Author: UNKNOWN -Author-email: UNKNOWN -License: UNKNOWN -Description: UNKNOWN -Platform: UNKNOWN diff --git a/myhelpers.egg-info/SOURCES.txt b/myhelpers.egg-info/SOURCES.txt deleted file mode 100644 index 8da986e..0000000 --- a/myhelpers.egg-info/SOURCES.txt +++ /dev/null @@ -1,5 +0,0 @@ -setup.py -myhelpers.egg-info/PKG-INFO -myhelpers.egg-info/SOURCES.txt -myhelpers.egg-info/dependency_links.txt -myhelpers.egg-info/top_level.txt \ No newline at end of file diff --git a/myhelpers.egg-info/dependency_links.txt b/myhelpers.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/myhelpers.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/myhelpers.egg-info/top_level.txt b/myhelpers.egg-info/top_level.txt deleted file mode 100644 index 8b13789..0000000 --- a/myhelpers.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/myhelpers/__pycache__/TrialStatistics.cpython-36.pyc b/myhelpers/__pycache__/TrialStatistics.cpython-36.pyc deleted file mode 100644 index 552a96d..0000000 Binary files a/myhelpers/__pycache__/TrialStatistics.cpython-36.pyc and /dev/null differ diff --git a/myhelpers/__pycache__/TrialStatistics.cpython-37.pyc b/myhelpers/__pycache__/TrialStatistics.cpython-37.pyc deleted file mode 100644 index a5b4985..0000000 Binary files a/myhelpers/__pycache__/TrialStatistics.cpython-37.pyc and /dev/null differ diff --git a/myhelpers/__pycache__/__init__.cpython-36.pyc b/myhelpers/__pycache__/__init__.cpython-36.pyc deleted file mode 100644 index ec5b92f..0000000 Binary files a/myhelpers/__pycache__/__init__.cpython-36.pyc and /dev/null differ diff --git a/myhelpers/__pycache__/__init__.cpython-37.pyc b/myhelpers/__pycache__/__init__.cpython-37.pyc deleted file mode 100644 index 3a62b02..0000000 Binary files a/myhelpers/__pycache__/__init__.cpython-37.pyc and /dev/null differ diff --git a/myhelpers/__pycache__/color_PCA.cpython-37.pyc b/myhelpers/__pycache__/color_PCA.cpython-37.pyc deleted file mode 100644 index 860537e..0000000 Binary files a/myhelpers/__pycache__/color_PCA.cpython-37.pyc and /dev/null differ diff --git a/myhelpers/__pycache__/config_plots.cpython-36.pyc b/myhelpers/__pycache__/config_plots.cpython-36.pyc deleted file mode 100644 index 828710a..0000000 Binary files a/myhelpers/__pycache__/config_plots.cpython-36.pyc and /dev/null differ diff --git a/myhelpers/__pycache__/config_plots.cpython-37.pyc b/myhelpers/__pycache__/config_plots.cpython-37.pyc deleted file mode 100644 index 28c7991..0000000 Binary files a/myhelpers/__pycache__/config_plots.cpython-37.pyc and /dev/null differ diff --git a/myhelpers/__pycache__/confusion_matrix_plotter.cpython-36.pyc b/myhelpers/__pycache__/confusion_matrix_plotter.cpython-36.pyc deleted file mode 100644 index a041aec..0000000 Binary files a/myhelpers/__pycache__/confusion_matrix_plotter.cpython-36.pyc and /dev/null differ diff --git a/myhelpers/__pycache__/confusion_matrix_plotter.cpython-37.pyc b/myhelpers/__pycache__/confusion_matrix_plotter.cpython-37.pyc deleted file mode 100644 index 097f318..0000000 Binary files a/myhelpers/__pycache__/confusion_matrix_plotter.cpython-37.pyc and /dev/null differ diff --git a/myhelpers/__pycache__/earlystopping.cpython-36.pyc b/myhelpers/__pycache__/earlystopping.cpython-36.pyc deleted file mode 100644 index 0044eef..0000000 Binary files a/myhelpers/__pycache__/earlystopping.cpython-36.pyc and /dev/null differ diff --git a/myhelpers/__pycache__/earlystopping.cpython-37.pyc b/myhelpers/__pycache__/earlystopping.cpython-37.pyc deleted file mode 100644 index dc91fc4..0000000 Binary files a/myhelpers/__pycache__/earlystopping.cpython-37.pyc and /dev/null differ diff --git a/myhelpers/tests/.ipynb_checkpoints/test-TrialStatistics-checkpoint.ipynb b/myhelpers/tests/.ipynb_checkpoints/test-TrialStatistics-checkpoint.ipynb deleted file mode 100644 index 787dc08..0000000 --- a/myhelpers/tests/.ipynb_checkpoints/test-TrialStatistics-checkpoint.ipynb +++ /dev/null @@ -1,738 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
image_pathsuffixtraining_countvalidation_countbatchSizen_epochslearning_ratenumOfTrialspatiencefc_widthfc_layersmodelTypelambdaunsupervisedOnTesttl_model
0/data/BGNN_data/INHS_cropped50_110.640.163250000.0131002001blackbox0FalseResNet18
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "script_root_dir = '../../'\n", - "import sys\n", - "import os\n", - "if script_root_dir not in sys.path:\n", - " sys.path.append(script_root_dir)\n", - "\n", - "import pandas as pd\n", - "from IPython.display import display, HTML\n", - "\n", - "# getModelName(trial_params)\n", - "experimentName = \"experiment\"\n", - "if not os.path.exists(experimentName):\n", - " os.makedirs(experimentName)\n", - " \n", - "experiments = [{'image_path': '/data/BGNN_data/INHS_cropped', 'suffix': '50_11', 'training_count': 0.64, 'validation_count': 0.16, 'batchSize': 32, 'n_epochs': 5000, 'learning_rate': 0.01, 'numOfTrials': 3, 'patience': 100, 'fc_width': 200, 'fc_layers': 1, 'modelType': 'blackbox', 'lambda': 0, 'unsupervisedOnTest': False, 'tl_model': 'ResNet18'},\n", - " {'image_path': '/data/BGNN_data/INHS_cropped', 'suffix': '50_11', 'training_count': 0.64, 'validation_count': 0.16, 'batchSize': 64, 'n_epochs': 5000, 'learning_rate': 0.01, 'numOfTrials': 3, 'patience': 100, 'fc_width': 200, 'fc_layers': 1, 'modelType': 'blackbox', 'lambda': 0, 'unsupervisedOnTest': False, 'tl_model': 'ResNet18'},\n", - " {'image_path': '/data/BGNN_data/INHS_cropped', 'suffix': '50_11', 'training_count': 0.64, 'validation_count': 0.16, 'batchSize': 128, 'n_epochs': 5000, 'learning_rate': 0.01, 'numOfTrials': 3, 'patience': 100, 'fc_width': 200, 'fc_layers': 1, 'modelType': 'blackbox', 'lambda': 0, 'unsupervisedOnTest': False, 'tl_model': 'ResNet18'}]\n", - " \n", - "\n", - "a = pd.DataFrame()\n", - "a = a.append(pd.DataFrame(experiments[0], index=[0]))\n", - "\n", - "display(HTML(a.to_html()))" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "raw statistics\n" - ] - }, - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
image_pathsuffixtraining_countvalidation_countbatchSizen_epochslearning_ratenumOfTrialspatiencefc_widthfc_layersmodelTypelambdaunsupervisedOnTesttl_modellosstimehashtrial
0/data/BGNN_data/INHS_cropped50_110.640.163250000.0131002001blackbox0FalseResNet180.0824615.95323975234365664891468480
1/data/BGNN_data/INHS_cropped50_110.640.163250000.0131002001blackbox0FalseResNet180.0210580.70363575234365664891468481
2/data/BGNN_data/INHS_cropped50_110.640.163250000.0131002001blackbox0FalseResNet180.0686610.90815575234365664891468482
3/data/BGNN_data/INHS_cropped50_110.640.163250000.0131002001blackbox0FalseResNet180.0120286.26807975234365664891468483
4/data/BGNN_data/INHS_cropped50_110.640.163250000.0131002001blackbox0FalseResNet180.0809173.65442575234365664891468484
5/data/BGNN_data/INHS_cropped50_110.640.166450000.0131002001blackbox0FalseResNet180.0775615.6600958487524002750432400
6/data/BGNN_data/INHS_cropped50_110.640.166450000.0131002001blackbox0FalseResNet180.0255548.0699918487524002750432401
7/data/BGNN_data/INHS_cropped50_110.640.166450000.0131002001blackbox0FalseResNet180.0810396.0931148487524002750432402
8/data/BGNN_data/INHS_cropped50_110.640.166450000.0131002001blackbox0FalseResNet180.0908070.3061348487524002750432403
9/data/BGNN_data/INHS_cropped50_110.640.166450000.0131002001blackbox0FalseResNet180.0429316.7219608487524002750432404
10/data/BGNN_data/INHS_cropped50_110.640.1612850000.0131002001blackbox0FalseResNet180.0261919.326968-36459346163738592480
11/data/BGNN_data/INHS_cropped50_110.640.1612850000.0131002001blackbox0FalseResNet180.0812511.653247-36459346163738592481
12/data/BGNN_data/INHS_cropped50_110.640.1612850000.0131002001blackbox0FalseResNet180.0836099.012880-36459346163738592482
13/data/BGNN_data/INHS_cropped50_110.640.1612850000.0131002001blackbox0FalseResNet180.0867400.659764-36459346163738592483
14/data/BGNN_data/INHS_cropped50_110.640.1612850000.0131002001blackbox0FalseResNet180.0443558.343113-36459346163738592484
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "import helpers.TrialStatistics as TS\n", - "import random\n", - "\n", - "ts = TS.TrialStatistics(experimentName)\n", - "\n", - "for ex in experiments:\n", - " for j in range(5):\n", - " ts.addTrial(ex, {'loss': random.random()*0.1,\n", - " 'time': random.random()*10\n", - " }, j)\n", - " \n", - "ts.showStatistics(False, saveHTML=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "aggregated statistics\n" - ] - }, - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
image_pathsuffixtraining_countvalidation_countbatchSizen_epochslearning_ratenumOfTrialspatiencefc_widthfc_layersmodelTypelambdaunsupervisedOnTesttl_modelhashlosstime
meanstdmeanstd
0/data/BGNN_data/INHS_cropped50_110.640.163250000.0131002001blackbox0FalseResNet1875234365664891468480.0530.0343.4982.657
1/data/BGNN_data/INHS_cropped50_110.640.166450000.0131002001blackbox0FalseResNet188487524002750432400.0640.0285.3702.974
2/data/BGNN_data/INHS_cropped50_110.640.1612850000.0131002001blackbox0FalseResNet18-36459346163738592480.0640.0275.7994.268
" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "ts.showStatistics(saveHTML=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2.657\n" - ] - } - ], - "source": [ - "import torch\n", - "\n", - "a = ts.getStatistic(experiments[0],'time', 'std')\n", - "print(a)\n", - " " - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAdoAAAFNCAYAAACnh65UAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAVcklEQVR4nO3df3BlZX3H8c+XbCR3gTHLkk7NjTVLrVHKuoQJdluEUrBmqx3JLExFh2J1pjutbUWroZvqjLQzdalxWkvbaWelKG2t2GLMOEVM+SHFOvwwS5CwQArCyuYuanZtVhbuSjZ8+8e9WbJLkr03ud97Ts59v2bu5ObcH883zyT5nPPc5zzH3F0AACDGSUkXAABAlhG0AAAEImgBAAhE0AIAEIigBQAgEEELAECgNUkXMN8ZZ5zhnZ2dSZcBAEBVdu3atd/d2xZ6LFVB29nZqdHR0aTLAACgKmb2/cUeY+gYAIBABC0AAIEIWgA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q4BwMIIWgAAAhG0QIZYyaCZPVK+Bum7y9tfY2b3mNlD5ccuMLMmM/vCvOd+JOn6gSziogJAtmyVdI6kTZLOkPQdM7tHpTVvR9z9L8ysSaVrk54jKe/uZ0tSeZlOADXGES2QLW+V9CV3n3X3H0r6b5WWkvuOpPeb2bWSNrr7cypdsPpMM/tbM9sirlMKhCBogQbg7vdIulClq4x8wcyu8tJFqzdJulvS70m6IbkKgewiaIFs+Zakd5c/f21TKVwfMLPXSfqhu39OpUA918zOkHSSu39FpYtONPrl6IAQfEYLZMtXJf2ypO9KcknXuPsPzOx9kvrNbEbSIUlXScpL+ryZze1wDyRRMJB1XL0HAIBADB0DABCIoAUAIBBBCwBAIIIWAIBABC0AAIEIWgAAAhG0AAAEImgBAAj0//VLUZrUblb6AAAAAElFTkSuQmCC\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "ts.trialScatter('loss', 'time', save_plot=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAdkAAAFNCAYAAABMsBVXAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAa1klEQVR4nO3df3TV9Z3n8dfbEE0AS6YKJ5KIyLSCFQOkFHUd3WkdfljqlDoM1WW2Vj3ruq1j6kzpyu4cTD2n41kZdaLbs6cOVj1W7SJlONp0wBany2zRKgRMUJtz3EBLQjIGZsJovJFLfO8f9wZJDJqbez/3e+/3Ph/ncK73fb/e7zvfc8mLz/f7uZ+vubsAAEDunRZ1AwAAxBUhCwBAIIQsAACBELIAAARCyAIAEAghCwBAIBOibuBkZ599ts+cOTPqNgAAyMju3bsPu/vUkfWCCtmZM2dq165dU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/MTIcPH46wQwAoPCxQw+niMWloaNCyZcu0adMmHTt2TO+++64k6eDBg3r++ec1Y8aMiDsEgMLDAjVxHMm2bpQemCs1VqUeWzdm9XZHjx7Vjh07dPPNN0uSTj/9dFVVVUmS7rjjDt17770ys6zbBoC4aahvUEVZxbBaqS1QE6+RbOtG6bnbpWT6hgBHD6aeS1LdqnG95f79+zV16lTdeOONevXVV/XZz35WTU1N+sUvfqGamhrNmzcvR80DQLywQE3cQnb73R8E7JBkIlUfZ8geP35cLS0teuihh3TJJZeooaFBjY2N2rFjh55//vkcNA0A8VXqC9TE63Tx0c7M6mNQW1ur2traEzdqX7lypVpaWrR//37NmzdPM2fOVGdnp+rr69XTUzoX8wEAHy9eITulNrP6GFRXV+vcc89Ve3vqxu/bt29XfX293nrrLR04cEAHDhxQbW2tWlpaVF1dOhfzAQAfL16ni69aN/yarCSVV6bqWXjooYe0evVqHTt2TLNmzdKjjz6aZaMAgFIQr5Aduu66/e7UKeIptamAHef12CHz58/Xrl27Tvn6gQMHsnp/AEA8xStkpVSgZhmqAADkQryuyQIAUEAIWQAAAiFkAQAIhJAFACAQQhYAgEAI2TG46aabNG3aNM2dO/dEbc2aNZozZ47q6ur0la98RX19fZKkZDKpG264QRdffLEuvPBC3XPPPVG1DQCIGCE7Bl//+te1devWYbXFixdr3759am1t1QUXXHAiTJ955hm99957amtr0+7du/WDH/yA79ECQImKXcg2dzRryaYlqnu8Tks2LVFzR3PW73nllVfqk5/85LDakiVLNGFC6mvGl156qTo7U+sjm5n6+/t1/PhxJRIJnX766frEJz6RdQ8oPSE+ywDyK1Yh29zRrMadjeru75bL1d3frcadjcF/Of3whz/U1VdfLSl1A4FJkybpnHPO0YwZM/Ttb3/7QwENfJyoPssAcitWIdvU0qSBwYFhtYHBATW1NAXb5/e+9z1NmDBBq1evliS9/PLLKisr06FDh7R//37dd9996ujoCLZ/xFMUn2UAuRerkO3pH/1Wc6eqZ+uxxx7TT3/6Uz355JMyM0nSU089pWXLlqm8vFz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jO7QdIaM0tKekfS1yTVSHrUzIb+sb02ioaBOOMuPAAABMLpYgAAAiFkAQAIhJAFACAQQhYAgEAIWQAAAiFkAQAIhJAFACAQQhYAgED+P3j5MzI0+6xrAAAAAElFTkSuQmCC\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "ts.trialScatter('loss', 'time', 'batchSize', save_plot=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [], - "source": [ - "ts.saveStatistics()\n", - "ts.saveStatistics(False)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/myhelpers/tests/__init__.py b/myhelpers/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..4d5db1e --- /dev/null +++ b/setup.cfg @@ -0,0 +1,121 @@ +# This file is used to configure your project. +# Read more about the various options under: +# http://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files + +[metadata] +name = myhelpers +description = utilities for ML stuff related to BGNN +author = Mohannad Elhamod +author-email = elhamod@vt.edu +license = mit +long-description = file: README.rst +long-description-content-type = text/x-rst; charset=UTF-8 +url = https://github.com/pyscaffold/pyscaffold/ +project-urls = + Documentation = https://pyscaffold.org/ +# Change if running only on Windows, Mac or Linux (comma-separated) +platforms = any +# Add here all kinds of additional classifiers as defined under +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +classifiers = + Development Status :: 4 - Beta + Programming Language :: Python + +[options] +zip_safe = False +packages = find: +include_package_data = True +package_dir = + =src +# DON'T CHANGE THE FOLLOWING LINE! IT WILL BE UPDATED BY PYSCAFFOLD! +setup_requires = pyscaffold>=3.2a0,<3.3a0 +# Add here dependencies of your project (semicolon/line-separated), e.g. +# install_requires = numpy; scipy +# The usage of test_requires is discouraged, see `Dependency Management` docs +# tests_require = pytest; pytest-cov +# Require a specific Python version, e.g. Python 2.7 or >= 3.4 +# python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.* +install_requires = + pandas==1.0.5 + ipython==7.16.1 + scikit-learn==0.23.1 + matplotlib==3.2.2 + pivottablejs==0.9.0 + torch==1.5.1 + torchvision==0.6.1 + +[options.packages.find] +where = src +exclude = + tests + +[options.extras_require] +# Add here additional requirements for extra features, to install with: +# `pip install myhelpers[PDF]` like: +# PDF = ReportLab; RXP +# Add here test requirements (semicolon/line-separated) +testing = + pytest + pytest-cov + +[options.entry_points] +# Add here console scripts like: +# console_scripts = +# script_name = myhelpers.module:function +# For example: +# console_scripts = +# fibonacci = myhelpers.skeleton:run +# And any other entry points, for example: +# pyscaffold.cli = +# awesome = pyscaffoldext.awesome.extension:AwesomeExtension + +[test] +# py.test options when running `python setup.py test` +# addopts = --verbose +extras = True + +[tool:pytest] +# Options for py.test: +# Specify command line options as you would do when invoking py.test directly. +# e.g. --cov-report html (or xml) for html/xml output or --junitxml junit.xml +# in order to write a coverage file that can be read by Jenkins. +addopts = + --cov myhelpers --cov-report term-missing + --verbose +norecursedirs = + dist + build + .tox +testpaths = tests + +[aliases] +dists = bdist_wheel + +[bdist_wheel] +# Use this option if your package is pure-python +universal = 1 + +[build_sphinx] +source_dir = docs +build_dir = build/sphinx + +[devpi:upload] +# Options for the devpi: PyPI server and packaging tool +# VCS export must be deactivated since we are using setuptools-scm +no-vcs = 1 +formats = bdist_wheel + +[flake8] +# Some sane defaults for the code style checker flake8 +exclude = + .tox + build + dist + .eggs + docs/conf.py + +[pyscaffold] +# PyScaffold's parameters when the project was created. +# This will be used when updating. Do not change! +version = 3.2.3 +package = myhelpers diff --git a/setup.py b/setup.py index df4a032..2d44c9d 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,23 @@ -from setuptools import setup, find_packages - -setup(name='myhelpers', version='1.0', packages=find_packages(where="helpers", exclude=["tests"])) # , include=["color.PCA.py","config_plots.py", "ZCA.py", "TrialStatistics.py", "confusion_matrix_plotter.py", "earlystopping.py", "dataset_normalization.py" ] +# -*- coding: utf-8 -*- +""" + Setup file for myhelpers. + Use setup.cfg to configure your project. + + This file was generated with PyScaffold 3.2.3. + PyScaffold helps you to put up the scaffold of your new Python project. + Learn more under: https://pyscaffold.org/ +""" +import sys + +from pkg_resources import VersionConflict, require +from setuptools import setup + +try: + require('setuptools>=38.3') +except VersionConflict: + print("Error: version of setuptools is too old (<38.3)!") + sys.exit(1) + + +if __name__ == "__main__": + setup(use_pyscaffold=True) diff --git a/myhelpers/TrialStatistics.py b/src/myhelpers/TrialStatistics.py similarity index 97% rename from myhelpers/TrialStatistics.py rename to src/myhelpers/TrialStatistics.py index f3f76f8..d17bf9e 100644 --- a/myhelpers/TrialStatistics.py +++ b/src/myhelpers/TrialStatistics.py @@ -20,7 +20,7 @@ # Given a confusion matrix, gets metris of fine with respect to coarse -class fine_Coarse_Statistics: +class fine_statistics: def __init__(self, cm, dataset): self.dataset = dataset self.cm = cm @@ -87,7 +87,7 @@ def get_F1Scores(self, fine_index): } # Given a confusion matrix, get statistics of coarse labels -class Coarse_Statistics: +class coarse_statistics: def __init__(self, cm, dataset): self.dataset = dataset self.cm = cm @@ -292,14 +292,14 @@ def printF1table(self, trial_params, dataset): df = pd.DataFrame(columns=columns) if self.prefix == "coarse": - stats = Coarse_Statistics(cm, dataset) + stats = coarse_statistics(cm, dataset) for coarse_name in dataset.getCoarseList(): coarse_index = dataset.getCoarseList().index(coarse_name) coarse_stats = stats.get_F1Scores(coarse_index) df.loc[coarse_index] = [" ".join([str(coarse_index), coarse_name]), coarse_stats["f1_macro"]] else: - stats = fine_Coarse_Statistics(cm, dataset) + stats = fine_statistics(cm, dataset) for fine in range(len(dataset.getfineList())): fine_stats = stats.get_F1Scores(fine) fine_name = dataset.getfineOfIndex(fine) @@ -324,7 +324,7 @@ def printF1table(self, trial_params, dataset): def trialScatter(self, x, y, aggregatedBy=None, save_plot=False): df = self.df - file_name = 'plot ' + y + " to " + x + ((' by ' + aggregatedBy) if aggregatedBy is not None else '') + file_name = 'plot' + ((' by ' + aggregatedBy) if aggregatedBy is not None else '') # get unique values for aggregate by @@ -333,7 +333,6 @@ def trialScatter(self, x, y, aggregatedBy=None, save_plot=False): uniqueValues=df[aggregatedBy].unique() # prepare axis - plt.tight_layout(rect=[0, 0.03, 1, 0.95]) fig=plt.figure() ax=fig.add_axes([0,0,1,1]) ax.set_xlabel(x) diff --git a/myhelpers/ZCA.py b/src/myhelpers/ZCA.py similarity index 100% rename from myhelpers/ZCA.py rename to src/myhelpers/ZCA.py diff --git a/myhelpers/__init__.py b/src/myhelpers/__init__.py similarity index 100% rename from myhelpers/__init__.py rename to src/myhelpers/__init__.py diff --git a/myhelpers/color_PCA.py b/src/myhelpers/color_PCA.py similarity index 100% rename from myhelpers/color_PCA.py rename to src/myhelpers/color_PCA.py diff --git a/myhelpers/config_plots.py b/src/myhelpers/config_plots.py similarity index 100% rename from myhelpers/config_plots.py rename to src/myhelpers/config_plots.py diff --git a/myhelpers/confusion_matrix_plotter.py b/src/myhelpers/confusion_matrix_plotter.py similarity index 100% rename from myhelpers/confusion_matrix_plotter.py rename to src/myhelpers/confusion_matrix_plotter.py diff --git a/myhelpers/dataset_normalization.py b/src/myhelpers/dataset_normalization.py similarity index 100% rename from myhelpers/dataset_normalization.py rename to src/myhelpers/dataset_normalization.py diff --git a/myhelpers/earlystopping.py b/src/myhelpers/earlystopping.py similarity index 100% rename from myhelpers/earlystopping.py rename to src/myhelpers/earlystopping.py diff --git a/src/myhelpers/skeleton.py b/src/myhelpers/skeleton.py new file mode 100644 index 0000000..732283f --- /dev/null +++ b/src/myhelpers/skeleton.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +""" +This is a skeleton file that can serve as a starting point for a Python +console script. To run this script uncomment the following lines in the +[options.entry_points] section in setup.cfg: + + console_scripts = + fibonacci = myhelpers.skeleton:run + +Then run `python setup.py install` which will install the command `fibonacci` +inside your current environment. +Besides console scripts, the header (i.e. until _logger...) of this file can +also be used as template for Python modules. + +Note: This skeleton file can be safely removed if not needed! +""" + +import argparse +import sys +import logging + +from myhelpers import __version__ + +__author__ = "Mohannad Elhamod" +__copyright__ = "Mohannad Elhamod" +__license__ = "mit" + +_logger = logging.getLogger(__name__) + + +def fib(n): + """Fibonacci example function + + Args: + n (int): integer + + Returns: + int: n-th Fibonacci number + """ + assert n > 0 + a, b = 1, 1 + for i in range(n-1): + a, b = b, a+b + return a + + +def parse_args(args): + """Parse command line parameters + + Args: + args ([str]): command line parameters as list of strings + + Returns: + :obj:`argparse.Namespace`: command line parameters namespace + """ + parser = argparse.ArgumentParser( + description="Just a Fibonacci demonstration") + parser.add_argument( + "--version", + action="version", + version="myhelpers {ver}".format(ver=__version__)) + parser.add_argument( + dest="n", + help="n-th Fibonacci number", + type=int, + metavar="INT") + parser.add_argument( + "-v", + "--verbose", + dest="loglevel", + help="set loglevel to INFO", + action="store_const", + const=logging.INFO) + parser.add_argument( + "-vv", + "--very-verbose", + dest="loglevel", + help="set loglevel to DEBUG", + action="store_const", + const=logging.DEBUG) + return parser.parse_args(args) + + +def setup_logging(loglevel): + """Setup basic logging + + Args: + loglevel (int): minimum loglevel for emitting messages + """ + logformat = "[%(asctime)s] %(levelname)s:%(name)s:%(message)s" + logging.basicConfig(level=loglevel, stream=sys.stdout, + format=logformat, datefmt="%Y-%m-%d %H:%M:%S") + + +def main(args): + """Main entry point allowing external calls + + Args: + args ([str]): command line parameter list + """ + args = parse_args(args) + setup_logging(args.loglevel) + _logger.debug("Starting crazy calculations...") + print("The {}-th Fibonacci number is {}".format(args.n, fib(args.n))) + _logger.info("Script ends here") + + +def run(): + """Entry point for console_scripts + """ + main(sys.argv[1:]) + + +if __name__ == "__main__": + run() diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..1e9a35f --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +""" + Dummy conftest.py for myhelpers. + + If you don't know what this is for, just leave it empty. + Read more about conftest.py under: + https://pytest.org/latest/plugins.html +""" + +# import pytest diff --git a/myhelpers/tests/experiment/agg_experiments.csv b/tests/experiment/agg_experiments.csv similarity index 100% rename from myhelpers/tests/experiment/agg_experiments.csv rename to tests/experiment/agg_experiments.csv diff --git a/myhelpers/tests/experiment/aggregated statistics.html b/tests/experiment/aggregated statistics.html similarity index 100% rename from myhelpers/tests/experiment/aggregated statistics.html rename to tests/experiment/aggregated statistics.html diff --git a/myhelpers/tests/experiment/plot by batchSize.pdf b/tests/experiment/plot by batchSize.pdf similarity index 100% rename from myhelpers/tests/experiment/plot by batchSize.pdf rename to tests/experiment/plot by batchSize.pdf diff --git a/myhelpers/tests/experiment/plot.pdf b/tests/experiment/plot.pdf similarity index 100% rename from myhelpers/tests/experiment/plot.pdf rename to tests/experiment/plot.pdf diff --git a/myhelpers/tests/experiment/raw statistics.html b/tests/experiment/raw statistics.html similarity index 100% rename from myhelpers/tests/experiment/raw statistics.html rename to tests/experiment/raw statistics.html diff --git a/myhelpers/tests/experiment/raw_experiments.csv b/tests/experiment/raw_experiments.csv similarity index 100% rename from myhelpers/tests/experiment/raw_experiments.csv rename to tests/experiment/raw_experiments.csv diff --git a/myhelpers/tests/test-TrialStatistics.ipynb b/tests/test-TrialStatistics.ipynb similarity index 100% rename from myhelpers/tests/test-TrialStatistics.ipynb rename to tests/test-TrialStatistics.ipynb diff --git a/tests/test_skeleton.py b/tests/test_skeleton.py new file mode 100644 index 0000000..ce99668 --- /dev/null +++ b/tests/test_skeleton.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +import pytest +from myhelpers.skeleton import fib + +__author__ = "Mohannad Elhamod" +__copyright__ = "Mohannad Elhamod" +__license__ = "mit" + + +def test_fib(): + assert fib(1) == 1 + assert fib(2) == 1 + assert fib(7) == 13 + with pytest.raises(AssertionError): + fib(-10)