hypernotes
Advanced tools
| Metadata-Version: 2.1 | ||
| Name: hypernotes | ||
| Version: 2.0.0 | ||
| Version: 2.0.1 | ||
| Summary: A lightweight Python package for taking notes on your machine learning experiments | ||
@@ -8,3 +8,3 @@ Home-page: https://github.com/binste/hypernotes | ||
| License: MIT | ||
| Description: # hypernotes | ||
| Description: # hypernotes <!-- omit in toc --> | ||
| [](https://pypi.python.org/pypi/hypernotes/) []() | ||
@@ -14,2 +14,18 @@ | ||
| # Table of contents <!-- omit in toc --> | ||
| - [Installation](#installation) | ||
| - [Basic Usage](#basic-usage) | ||
| - [Create note and add to store](#create-note-and-add-to-store) | ||
| - [Load notes](#load-notes) | ||
| - [Update notes](#update-notes) | ||
| - [Remove notes](#remove-notes) | ||
| - [Create note from another one](#create-note-from-another-one) | ||
| - [Bonus](#bonus) | ||
| - [View content of a store in your browser](#view-content-of-a-store-in-your-browser) | ||
| - [Store additional objects](#store-additional-objects) | ||
| - [Alternatives](#alternatives) | ||
| - [Development](#development) | ||
| [Changelog for this package](CHANGELOG.md) | ||
| # Installation | ||
@@ -20,3 +36,3 @@ ```bash | ||
| Only Python 3.6+ is supported | ||
| Python 3.6+ is required | ||
@@ -60,3 +76,3 @@ # Basic Usage | ||
| ## Create a note and add to a store | ||
| ## Create note and add to store | ||
| ```python | ||
@@ -222,4 +238,4 @@ from hypernotes import Note, Store | ||
| ## View content of a store | ||
| ### Directly in your browser (no additional dependencies) | ||
| # Bonus | ||
| ## View content of a store in your browser | ||
| To get a quick glance into a store, you can use the package from the command line. It will start an http server and automatically open the relevant page in your web browser. The page contains an interactive table which shows the most relevant information of all notes in the store such as metrics and parameters. The table is similar in style to the one shown in the [Load notes](#load-notes) section. | ||
@@ -229,10 +245,7 @@ ``` | ||
| ``` | ||
| This only requires a modern web browser as well as an internet connection to load a view javascript libraries and css files. | ||
| This only requires a modern web browser as well as an internet connection to load some javascript libraries and css files. | ||
| To see all available options pass the `--help` argument. | ||
| ### pandas and QGrid | ||
| Another useful option might be to load the store as a pandas dataframe (see [Load notes](#load-notes)) and then use [Qgrid](https://github.com/quantopian/qgrid) in a Jupyter notebook. | ||
| ## Bonus: Store additional objects in separate experiment folders | ||
| ## Store additional objects | ||
| If you want to store larger artifacts of your experiment, such as a trained model, you could create a separate folder and use the identifier of a note as part of the name. | ||
@@ -245,3 +258,3 @@ | ||
| # Other tools | ||
| # Alternatives | ||
| Check out tools such as [MLflow](https://mlflow.org/), [Sacred](https://sacred.readthedocs.io/en/latest/index.html), or [DVC](https://dvc.org/) if you need better multi-user capabilities, more advanced reproducibility features, dataset versioning, ... | ||
@@ -257,3 +270,4 @@ | ||
| Code is required to be formatted with [Black](https://github.com/python/black). | ||
| Make sure that all tests run by tox pass. | ||
| Keywords: machine learning,tracking,metrics,experiments,hyperparameters,model evaluation,data science | ||
@@ -260,0 +274,0 @@ Platform: UNKNOWN |
+16
-13
@@ -12,6 +12,6 @@ import copy | ||
| from pprint import pformat | ||
| from typing import Any, Dict, List, Optional, Sequence, Union | ||
| from typing import Any, Dict, List, Optional, Sequence, Tuple, Union | ||
| from unittest.mock import patch | ||
| __version__ = "2.0.0" | ||
| __version__ = "2.0.1" | ||
| DATETIME_STRING_FORMAT = "%Y-%m-%dT%H-%M-%S" | ||
@@ -45,4 +45,4 @@ | ||
| The most commonly used dictionary keys can be accessed as attributes | ||
| for better auto-completion support and readability. | ||
| All initial dictionary keys can be accessed as attributes | ||
| for better auto-completion support and code readability. | ||
@@ -312,3 +312,3 @@ | ||
| try: | ||
| import pandas as pd | ||
| import pandas as pd # type: ignore | ||
| except ImportError: | ||
@@ -356,4 +356,4 @@ raise ImportError( | ||
| ) -> List[str]: | ||
| """start_datetime, end_datetime, text, and model are always first. | ||
| Afterwards, either all keys are added in orther metrics, parameters, | ||
| """start_datetime, end_datetime, text, model, and identifier are always first. | ||
| Afterwards, either all keys are added in order of metrics, parameters, | ||
| features, git, and others, or only the passed in categories | ||
@@ -368,2 +368,3 @@ from additional_keys_subset. additional_keys_subset can hereby just be | ||
| Note._model_key, | ||
| Note._identifier_key, | ||
| ] | ||
@@ -379,3 +380,2 @@ if additional_keys_subset is None: | ||
| + [Note._python_path_key] | ||
| + [Note._identifier_key] | ||
| ) | ||
@@ -386,3 +386,2 @@ key_order.extend(sorted([k for k in keys if k not in key_order])) | ||
| key_order += _filter_sequence_if_startswith(keys, startswith=k) | ||
| key_order.append(Note._identifier_key) | ||
| return key_order | ||
@@ -396,3 +395,3 @@ | ||
| """ | ||
| items = [] # type: List[tuple] | ||
| items = [] # type: List[Tuple[Any, Any]] | ||
| for k, v in d.items(): | ||
@@ -412,5 +411,8 @@ new_key = parent_key + sep + k if parent_key else k | ||
| class Store(BaseStore): | ||
| """Main purpose is to store Note instances in a json file. Additional methods are | ||
| provided to load all notes, as well as update or remove specified notes. | ||
| """ | ||
| def __init__(self, path: Union[str, Path]) -> None: | ||
| """Stores and loads Note instances in and from a json file | ||
| """ | ||
| Parameters | ||
@@ -481,3 +483,4 @@ ---------- | ||
| raise Exception( | ||
| f"The identifier for the note '{note.identifier}' already exists in the store." | ||
| f"The identifier for the note '{note.identifier}' " | ||
| + "already exists in the store." | ||
| + " The note was not added." | ||
@@ -484,0 +487,0 @@ ) |
@@ -23,3 +23,3 @@ import argparse | ||
| all_keys = _all_keys_from_dicts(flat_dicts) | ||
| key_order = _key_order(all_keys, additional_keys_subset=["metrics", "parameters"]) | ||
| key_order = _key_order(all_keys) | ||
@@ -110,4 +110,4 @@ data = [] # type: List[dict] | ||
| <hr> | ||
| <div class="container"> | ||
| <div class="row"> | ||
| <div class="container-fluid"> | ||
| <div class="row mx-5"> | ||
| <table id="store_table" class="table table-striped table-bordered" style="width:100%"> | ||
@@ -114,0 +114,0 @@ <thead> |
+27
-13
| Metadata-Version: 2.1 | ||
| Name: hypernotes | ||
| Version: 2.0.0 | ||
| Version: 2.0.1 | ||
| Summary: A lightweight Python package for taking notes on your machine learning experiments | ||
@@ -8,3 +8,3 @@ Home-page: https://github.com/binste/hypernotes | ||
| License: MIT | ||
| Description: # hypernotes | ||
| Description: # hypernotes <!-- omit in toc --> | ||
| [](https://pypi.python.org/pypi/hypernotes/) []() | ||
@@ -14,2 +14,18 @@ | ||
| # Table of contents <!-- omit in toc --> | ||
| - [Installation](#installation) | ||
| - [Basic Usage](#basic-usage) | ||
| - [Create note and add to store](#create-note-and-add-to-store) | ||
| - [Load notes](#load-notes) | ||
| - [Update notes](#update-notes) | ||
| - [Remove notes](#remove-notes) | ||
| - [Create note from another one](#create-note-from-another-one) | ||
| - [Bonus](#bonus) | ||
| - [View content of a store in your browser](#view-content-of-a-store-in-your-browser) | ||
| - [Store additional objects](#store-additional-objects) | ||
| - [Alternatives](#alternatives) | ||
| - [Development](#development) | ||
| [Changelog for this package](CHANGELOG.md) | ||
| # Installation | ||
@@ -20,3 +36,3 @@ ```bash | ||
| Only Python 3.6+ is supported | ||
| Python 3.6+ is required | ||
@@ -60,3 +76,3 @@ # Basic Usage | ||
| ## Create a note and add to a store | ||
| ## Create note and add to store | ||
| ```python | ||
@@ -222,4 +238,4 @@ from hypernotes import Note, Store | ||
| ## View content of a store | ||
| ### Directly in your browser (no additional dependencies) | ||
| # Bonus | ||
| ## View content of a store in your browser | ||
| To get a quick glance into a store, you can use the package from the command line. It will start an http server and automatically open the relevant page in your web browser. The page contains an interactive table which shows the most relevant information of all notes in the store such as metrics and parameters. The table is similar in style to the one shown in the [Load notes](#load-notes) section. | ||
@@ -229,10 +245,7 @@ ``` | ||
| ``` | ||
| This only requires a modern web browser as well as an internet connection to load a view javascript libraries and css files. | ||
| This only requires a modern web browser as well as an internet connection to load some javascript libraries and css files. | ||
| To see all available options pass the `--help` argument. | ||
| ### pandas and QGrid | ||
| Another useful option might be to load the store as a pandas dataframe (see [Load notes](#load-notes)) and then use [Qgrid](https://github.com/quantopian/qgrid) in a Jupyter notebook. | ||
| ## Bonus: Store additional objects in separate experiment folders | ||
| ## Store additional objects | ||
| If you want to store larger artifacts of your experiment, such as a trained model, you could create a separate folder and use the identifier of a note as part of the name. | ||
@@ -245,3 +258,3 @@ | ||
| # Other tools | ||
| # Alternatives | ||
| Check out tools such as [MLflow](https://mlflow.org/), [Sacred](https://sacred.readthedocs.io/en/latest/index.html), or [DVC](https://dvc.org/) if you need better multi-user capabilities, more advanced reproducibility features, dataset versioning, ... | ||
@@ -257,3 +270,4 @@ | ||
| Code is required to be formatted with [Black](https://github.com/python/black). | ||
| Make sure that all tests run by tox pass. | ||
| Keywords: machine learning,tracking,metrics,experiments,hyperparameters,model evaluation,data science | ||
@@ -260,0 +274,0 @@ Platform: UNKNOWN |
+25
-12
@@ -1,2 +0,2 @@ | ||
| # hypernotes | ||
| # hypernotes <!-- omit in toc --> | ||
| [](https://pypi.python.org/pypi/hypernotes/) []() | ||
@@ -6,2 +6,18 @@ | ||
| # Table of contents <!-- omit in toc --> | ||
| - [Installation](#installation) | ||
| - [Basic Usage](#basic-usage) | ||
| - [Create note and add to store](#create-note-and-add-to-store) | ||
| - [Load notes](#load-notes) | ||
| - [Update notes](#update-notes) | ||
| - [Remove notes](#remove-notes) | ||
| - [Create note from another one](#create-note-from-another-one) | ||
| - [Bonus](#bonus) | ||
| - [View content of a store in your browser](#view-content-of-a-store-in-your-browser) | ||
| - [Store additional objects](#store-additional-objects) | ||
| - [Alternatives](#alternatives) | ||
| - [Development](#development) | ||
| [Changelog for this package](CHANGELOG.md) | ||
| # Installation | ||
@@ -12,3 +28,3 @@ ```bash | ||
| Only Python 3.6+ is supported | ||
| Python 3.6+ is required | ||
@@ -52,3 +68,3 @@ # Basic Usage | ||
| ## Create a note and add to a store | ||
| ## Create note and add to store | ||
| ```python | ||
@@ -214,4 +230,4 @@ from hypernotes import Note, Store | ||
| ## View content of a store | ||
| ### Directly in your browser (no additional dependencies) | ||
| # Bonus | ||
| ## View content of a store in your browser | ||
| To get a quick glance into a store, you can use the package from the command line. It will start an http server and automatically open the relevant page in your web browser. The page contains an interactive table which shows the most relevant information of all notes in the store such as metrics and parameters. The table is similar in style to the one shown in the [Load notes](#load-notes) section. | ||
@@ -221,10 +237,7 @@ ``` | ||
| ``` | ||
| This only requires a modern web browser as well as an internet connection to load a view javascript libraries and css files. | ||
| This only requires a modern web browser as well as an internet connection to load some javascript libraries and css files. | ||
| To see all available options pass the `--help` argument. | ||
| ### pandas and QGrid | ||
| Another useful option might be to load the store as a pandas dataframe (see [Load notes](#load-notes)) and then use [Qgrid](https://github.com/quantopian/qgrid) in a Jupyter notebook. | ||
| ## Bonus: Store additional objects in separate experiment folders | ||
| ## Store additional objects | ||
| If you want to store larger artifacts of your experiment, such as a trained model, you could create a separate folder and use the identifier of a note as part of the name. | ||
@@ -237,3 +250,3 @@ | ||
| # Other tools | ||
| # Alternatives | ||
| Check out tools such as [MLflow](https://mlflow.org/), [Sacred](https://sacred.readthedocs.io/en/latest/index.html), or [DVC](https://dvc.org/) if you need better multi-user capabilities, more advanced reproducibility features, dataset versioning, ... | ||
@@ -249,2 +262,2 @@ | ||
| Code is required to be formatted with [Black](https://github.com/python/black). | ||
| Make sure that all tests run by tox pass. |
+4
-1
| """ | ||
| Publish a new version: | ||
| - Change version number in hypernotes/__init__.py | ||
| - Add entry to CHANGELOG.md | ||
| $ tox | ||
| $ git tag vX.Y.Z -m "Release X.Y.Z" | ||
@@ -25,3 +27,4 @@ $ git push --tags | ||
| description=( | ||
| "A lightweight Python package for taking notes on your machine learning experiments" | ||
| "A lightweight Python package for taking notes on your" | ||
| + " machine learning experiments" | ||
| ), | ||
@@ -28,0 +31,0 @@ long_description=README, |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
63257
2.03%729
0.83%