kosh 3.3.0__tar.gz → 3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kosh-3.3.0/kosh.egg-info → kosh-3.4}/PKG-INFO +7 -17
- {kosh-3.3.0 → kosh-3.4}/README.md +3 -1
- kosh-3.4/docs/gen_api_docs.py +63 -0
- kosh-3.4/docs/source/conf.py +452 -0
- kosh-3.4/examples/cluster.py +70 -0
- kosh-3.4/examples/some_user_io_functions.py +68 -0
- kosh-3.4/kosh/_version.py +13 -0
- kosh-3.4/kosh/cli.py +11 -0
- kosh-3.4/kosh/current_version.py +1 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/dataset.py +21 -7
- {kosh-3.3.0 → kosh-3.4}/kosh/lock_strategies.py +5 -4
- {kosh-3.3.0 → kosh-3.4}/kosh/operators/koshClustering.py +9 -0
- kosh-3.4/kosh/parameter_store.py +167 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/sampling_methods/cluster_sampling/Clustering.py +8 -5
- kosh-3.4/kosh/skills/kosh/SKILL.md +97 -0
- kosh-3.4/kosh/skills/kosh/agents/openai.yaml +8 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/store.py +31 -2
- {kosh-3.3.0 → kosh-3.4}/kosh/utils.py +46 -10
- kosh-3.4/kosh/workflow.py +428 -0
- {kosh-3.3.0 → kosh-3.4/kosh.egg-info}/PKG-INFO +7 -17
- {kosh-3.3.0 → kosh-3.4}/kosh.egg-info/SOURCES.txt +30 -3
- kosh-3.4/kosh.egg-info/entry_points.txt +3 -0
- {kosh-3.3.0 → kosh-3.4}/kosh.egg-info/requires.txt +2 -2
- kosh-3.4/kosh.egg-info/top_level.txt +12 -0
- kosh-3.4/pyproject.toml +48 -0
- kosh-3.4/scripts/render_logos.py +59 -0
- kosh-3.4/setup.py +5 -0
- kosh-3.4/tests/baselines/npy/gen.py +14 -0
- kosh-3.4/tests/baselines/scripts/dummy.py +18 -0
- kosh-3.4/tests/conftest.py +56 -0
- kosh-3.4/tests/kosh_scaling.py +440 -0
- kosh-3.4/tests/koshbase.py +36 -0
- kosh-3.4/tests/non_parallel/test_kosh_cp.py +548 -0
- kosh-3.4/tests/parallel/kosh_scaling.py +440 -0
- kosh-3.4/tests/parallel/kosh_scaling_pgen.py +32 -0
- kosh-3.4/tests/parallel/test_kosh_clustering.py +797 -0
- kosh-3.4/tests/parallel/test_kosh_clustering_raw.py +368 -0
- kosh-3.4/tests/parallel/test_kosh_mariadb_mpi.py +98 -0
- kosh-3.4/tests/parallel/test_kosh_scaling_parallel.py +111 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_datasets.py +13 -12
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_ensembles.py +79 -66
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_import_export_datasets.py +15 -5
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_list_features.py +13 -22
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_lot_big_curves.py +18 -10
- kosh-3.4/tests/test_kosh_parameter_store.py +118 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_reassociate.py +2 -2
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_scaling.py +8 -4
- kosh-3.4/tests/test_kosh_skill.py +40 -0
- kosh-3.4/tests/test_kosh_skill_codex_smoke.py +224 -0
- kosh-3.4/tests/test_kosh_special_sina_types.py +30 -0
- kosh-3.4/tests/test_kosh_workflow_cli.py +374 -0
- kosh-3.3.0/kosh/current_version.py +0 -1
- kosh-3.3.0/kosh.egg-info/not-zip-safe +0 -1
- kosh-3.3.0/kosh.egg-info/top_level.txt +0 -1
- kosh-3.3.0/scripts/kosh +0 -1252
- kosh-3.3.0/setup.py +0 -79
- kosh-3.3.0/tests/test_kosh_special_sina_types.py +0 -48
- {kosh-3.3.0 → kosh-3.4}/LICENSE +0 -0
- {kosh-3.3.0 → kosh-3.4}/NOTICE +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/__init__.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/core_sina.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/ensemble.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/exec_graphs/__init__.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/exec_graphs/core.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/kosh_command.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/loaders/UltraLoader.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/loaders/__init__.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/loaders/core.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/loaders/hdf5.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/loaders/jsons.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/loaders/npy.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/loaders/pandas_loader.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/loaders/pgm.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/loaders/pil.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/loaders/sidre.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/operators/__init__.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/operators/core.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/operators/koshMaths.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/sampling_methods/__init__.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/sampling_methods/cluster_sampling/__init__.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/schema.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/threadsafe.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/threadsafe_decorators.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/transformers/__init__.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/transformers/core.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/transformers/npy.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/transformers/sidre.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/transformers/skl.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/transformers/utils.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh/wrapper.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/kosh.egg-info/dependency_links.txt +0 -0
- {kosh-3.3.0 → kosh-3.4}/scripts/sbang +0 -0
- {kosh-3.3.0 → kosh-3.4}/setup.cfg +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_aliases.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_broken_loader.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_command_line.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_context_manager.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_curves.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_describe_feature.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_ensembles_cp.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_fast_load.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_fix_fastsha.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_flake8.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_getitem_back_propagate.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_load_sina.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_loaders.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_loaders_multiple_features_name.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_mv.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_operators.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_operators_chain_preprocess.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_operators_decorators.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_protected_attributes.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_rm.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_schema.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_script_wrapper.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_search.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_search_speed.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_sina_curves_as_associated.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_sina_files_section_as_associated.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_sina_section_for_kosh.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_store.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_store_custom_loaders.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_store_mv_cp_tar.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_sync.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_transformers.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_transformers_decorators.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_transformers_parent.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_users_and_groups.py +0 -0
- {kosh-3.3.0 → kosh-3.4}/tests/test_kosh_verbose_list_features.py +0 -0
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kosh
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.4
|
|
4
4
|
Summary: Manages Data Store with External Bulk Data
|
|
5
|
-
Home-page: https://github.com/LLNL/Kosh
|
|
6
5
|
Author: Charles Doutriaux, Renee Olson
|
|
7
|
-
Author-email: doutriaux1@llnl.gov
|
|
8
6
|
License: MIT
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Classifier: Operating System :: OS Independent
|
|
7
|
+
Project-URL: Homepage, https://github.com/LLNL/Kosh
|
|
8
|
+
Requires-Python: >=3.8
|
|
12
9
|
Description-Content-Type: text/markdown
|
|
13
10
|
License-File: LICENSE
|
|
14
11
|
License-File: NOTICE
|
|
15
|
-
Requires-Dist: llnl-sina>=1.
|
|
12
|
+
Requires-Dist: llnl-sina>=1.16.0
|
|
16
13
|
Requires-Dist: networkx>=2.6
|
|
17
14
|
Requires-Dist: numpy>=1.20
|
|
15
|
+
Requires-Dist: filelock
|
|
18
16
|
Requires-Dist: scipy
|
|
19
17
|
Requires-Dist: h5py>=3
|
|
20
18
|
Requires-Dist: scikit-learn>=1.0.2
|
|
@@ -22,17 +20,7 @@ Requires-Dist: pandas
|
|
|
22
20
|
Requires-Dist: hdbscan
|
|
23
21
|
Requires-Dist: matplotlib
|
|
24
22
|
Requires-Dist: tqdm
|
|
25
|
-
Requires-Dist: filelock
|
|
26
|
-
Dynamic: author
|
|
27
|
-
Dynamic: author-email
|
|
28
|
-
Dynamic: classifier
|
|
29
|
-
Dynamic: description
|
|
30
|
-
Dynamic: description-content-type
|
|
31
|
-
Dynamic: home-page
|
|
32
|
-
Dynamic: license
|
|
33
23
|
Dynamic: license-file
|
|
34
|
-
Dynamic: requires-dist
|
|
35
|
-
Dynamic: summary
|
|
36
24
|
|
|
37
25
|

|
|
38
26
|
# Overview
|
|
@@ -69,6 +57,8 @@ sys.path.append(path_to_kosh_repo)
|
|
|
69
57
|
|
|
70
58
|
For more details look into the [installation doc](INSTALL.md)
|
|
71
59
|
|
|
60
|
+
If you want to use Kosh through Codex, see [the Codex skill install guide](docs/codex_skill.md).
|
|
61
|
+
|
|
72
62
|
# First steps
|
|
73
63
|
|
|
74
64
|
See [this file](docs/source/users/index.md)
|
|
@@ -33,6 +33,8 @@ sys.path.append(path_to_kosh_repo)
|
|
|
33
33
|
|
|
34
34
|
For more details look into the [installation doc](INSTALL.md)
|
|
35
35
|
|
|
36
|
+
If you want to use Kosh through Codex, see [the Codex skill install guide](docs/codex_skill.md).
|
|
37
|
+
|
|
36
38
|
# First steps
|
|
37
39
|
|
|
38
40
|
See [this file](docs/source/users/index.md)
|
|
@@ -54,4 +56,4 @@ Kosh is distributed under the terms of the MIT license; new contributions must b
|
|
|
54
56
|
|
|
55
57
|
SPDX-License-Identifier: MIT
|
|
56
58
|
|
|
57
|
-
``LLNL-CODE-814755``
|
|
59
|
+
``LLNL-CODE-814755``
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Helper to auto generate reference pages for the api docs.
|
|
3
|
+
|
|
4
|
+
Recipe from mkdocstrings docs.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
import sys
|
|
9
|
+
import mkdocs_gen_files
|
|
10
|
+
|
|
11
|
+
nav = mkdocs_gen_files.Nav()
|
|
12
|
+
|
|
13
|
+
src_path = Path(".")
|
|
14
|
+
|
|
15
|
+
# Resolve whether in docs dir or project root (local vs readthedocs config)
|
|
16
|
+
proj_toml = Path('.') / 'pyproject.toml'
|
|
17
|
+
mkdocs_yml = Path('.') / 'mkdocs.yml'
|
|
18
|
+
|
|
19
|
+
print(f"{proj_toml} exists: {proj_toml.exists()}")
|
|
20
|
+
print(f"{mkdocs_yml} exists: {mkdocs_yml.exists()}")
|
|
21
|
+
if proj_toml.exists():
|
|
22
|
+
src_path = Path('.') / 'kosh'
|
|
23
|
+
elif mkdocs_yml.exists():
|
|
24
|
+
src_path = Path('.') / 'kosh'
|
|
25
|
+
else:
|
|
26
|
+
mkdocs_gen_files.log.warning('Skipping API docs because "kosh" directory is missing.')
|
|
27
|
+
sys.exit()
|
|
28
|
+
|
|
29
|
+
for path in sorted(src_path.rglob("*.py")):
|
|
30
|
+
|
|
31
|
+
module_path = path.relative_to(src_path).with_suffix("")
|
|
32
|
+
doc_path = path.relative_to(src_path).with_suffix(".md")
|
|
33
|
+
full_doc_path = Path("source/reference_guide/api_reference", doc_path)
|
|
34
|
+
|
|
35
|
+
parts = list(module_path.parts)
|
|
36
|
+
|
|
37
|
+
# Ensure __init__.py's get added/parsed properly and write contents to
|
|
38
|
+
# the current module's index.md
|
|
39
|
+
parts = ['kosh'] + parts # add package prefix back on
|
|
40
|
+
if parts[-1] == "__init__": # special handling for top level module files
|
|
41
|
+
parts = parts[:-1]
|
|
42
|
+
doc_path = doc_path.with_name("index.md")
|
|
43
|
+
full_doc_path = full_doc_path.with_name("index.md")
|
|
44
|
+
if not parts:
|
|
45
|
+
continue
|
|
46
|
+
elif parts[-1] == "__main__":
|
|
47
|
+
continue
|
|
48
|
+
|
|
49
|
+
with mkdocs_gen_files.open(full_doc_path, "w") as fd: #
|
|
50
|
+
identifier = ".".join(parts)
|
|
51
|
+
# Set custom title for index pages to match nav entries
|
|
52
|
+
if doc_path.name == "index.md":
|
|
53
|
+
print(f"# {parts[-1].capitalize()}", file=fd)
|
|
54
|
+
print("---", file=fd)
|
|
55
|
+
|
|
56
|
+
# add the mkdoc strings hook
|
|
57
|
+
print("::: " + identifier, file=fd)
|
|
58
|
+
|
|
59
|
+
mkdocs_gen_files.set_edit_path(full_doc_path, path) #
|
|
60
|
+
|
|
61
|
+
# NOTE: SUMMARY.md has to be the name of the nav file
|
|
62
|
+
with mkdocs_gen_files.open("sources/reference_guide/SUMMARY.md", "w") as nav_file:
|
|
63
|
+
nav_file.writelines(nav.build_literate_nav())
|
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
#
|
|
4
|
+
# Kosh documentation build configuration file, created by
|
|
5
|
+
# sphinx-quickstart on Fri Oct 11 11:45:47 2019.
|
|
6
|
+
#
|
|
7
|
+
# This file is execfile()d with the current directory set to its
|
|
8
|
+
# containing dir.
|
|
9
|
+
#
|
|
10
|
+
# Note that not all possible configuration values are present in this
|
|
11
|
+
# autogenerated file.
|
|
12
|
+
#
|
|
13
|
+
# All configuration values have a default; values that are commented out
|
|
14
|
+
# serve to show the default.
|
|
15
|
+
|
|
16
|
+
# If extensions (or modules to document with autodoc) are in another directory,
|
|
17
|
+
# add these directories to sys.path here. If the directory is relative to the
|
|
18
|
+
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
19
|
+
#
|
|
20
|
+
# Following changes to include AutoStructify to add tables to markdown + sphinx = recommonmark
|
|
21
|
+
# https://github.com/readthedocs/recommonmark/blob/master/docs/conf.py
|
|
22
|
+
import os
|
|
23
|
+
from recommonmark.transform import AutoStructify
|
|
24
|
+
# import sys
|
|
25
|
+
# sys.path.insert(0, os.path.abspath('.'))
|
|
26
|
+
|
|
27
|
+
# -- General configuration ------------------------------------------------
|
|
28
|
+
|
|
29
|
+
# If your documentation needs a minimal Sphinx version, state it here.
|
|
30
|
+
#
|
|
31
|
+
# needs_sphinx = '1.0'
|
|
32
|
+
|
|
33
|
+
# Add any Sphinx extension module names here, as strings. They can be
|
|
34
|
+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
35
|
+
# ones.
|
|
36
|
+
extensions = [
|
|
37
|
+
'sphinx.ext.autodoc',
|
|
38
|
+
'sphinx.ext.doctest',
|
|
39
|
+
'sphinx.ext.viewcode',
|
|
40
|
+
'autoapi.extension',
|
|
41
|
+
"recommonmark",
|
|
42
|
+
"nbsphinx"
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
# NBSPHIX OPTIONS
|
|
47
|
+
nbsphinx_allow_errors = True
|
|
48
|
+
nbsphinx_execute = 'never'
|
|
49
|
+
|
|
50
|
+
# AUTOAPI confi
|
|
51
|
+
autoapi_type = "python"
|
|
52
|
+
autoapi_dirs = ['../../kosh']
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
# Add any paths that contain templates here, relative to this directory.
|
|
56
|
+
templates_path = ['_templates']
|
|
57
|
+
|
|
58
|
+
# The suffix(es) of source filenames.
|
|
59
|
+
# You can specify multiple suffix as a list of string:
|
|
60
|
+
#
|
|
61
|
+
# source_suffix = ['.rst', '.md']
|
|
62
|
+
source_suffix = '.rst'
|
|
63
|
+
|
|
64
|
+
# The encoding of source files.
|
|
65
|
+
#
|
|
66
|
+
# source_encoding = 'utf-8-sig'
|
|
67
|
+
|
|
68
|
+
# The master toctree document.
|
|
69
|
+
master_doc = 'index'
|
|
70
|
+
|
|
71
|
+
# General information about the project.
|
|
72
|
+
project = 'Kosh'
|
|
73
|
+
copyright = '2019, Charles Doutriaux, Katie Lewis'
|
|
74
|
+
author = 'Charles Doutriaux, Katie Lewis'
|
|
75
|
+
|
|
76
|
+
# The version info for the project you're documenting, acts as replacement for
|
|
77
|
+
# |version| and |release|, also used in various other places throughout the
|
|
78
|
+
# built documents.
|
|
79
|
+
#
|
|
80
|
+
# The short X.Y version.
|
|
81
|
+
version = '0'
|
|
82
|
+
# The full version, including alpha/beta/rc tags.
|
|
83
|
+
release = '1'
|
|
84
|
+
|
|
85
|
+
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
86
|
+
# for a list of supported languages.
|
|
87
|
+
#
|
|
88
|
+
# This is also used if you do content translation via gettext catalogs.
|
|
89
|
+
# Usually you set "language" from the command line for these cases.
|
|
90
|
+
language = None
|
|
91
|
+
|
|
92
|
+
# There are two options for replacing |today|: either, you set today to some
|
|
93
|
+
# non-false value, then it is used:
|
|
94
|
+
#
|
|
95
|
+
# today = ''
|
|
96
|
+
#
|
|
97
|
+
# Else, today_fmt is used as the format for a strftime call.
|
|
98
|
+
#
|
|
99
|
+
# today_fmt = '%B %d, %Y'
|
|
100
|
+
|
|
101
|
+
# List of patterns, relative to source directory, that match files and
|
|
102
|
+
# directories to ignore when looking for source files.
|
|
103
|
+
# This patterns also effect to html_static_path and html_extra_path
|
|
104
|
+
exclude_patterns = []
|
|
105
|
+
|
|
106
|
+
# The reST default role (used for this markup: `text`) to use for all
|
|
107
|
+
# documents.
|
|
108
|
+
#
|
|
109
|
+
# default_role = None
|
|
110
|
+
|
|
111
|
+
# If true, '()' will be appended to :func: etc. cross-reference text.
|
|
112
|
+
#
|
|
113
|
+
# add_function_parentheses = True
|
|
114
|
+
|
|
115
|
+
# If true, the current module name will be prepended to all description
|
|
116
|
+
# unit titles (such as .. function::).
|
|
117
|
+
#
|
|
118
|
+
# add_module_names = True
|
|
119
|
+
|
|
120
|
+
# If true, sectionauthor and moduleauthor directives will be shown in the
|
|
121
|
+
# output. They are ignored by default.
|
|
122
|
+
#
|
|
123
|
+
# show_authors = False
|
|
124
|
+
|
|
125
|
+
# The name of the Pygments (syntax highlighting) style to use.
|
|
126
|
+
pygments_style = 'sphinx'
|
|
127
|
+
|
|
128
|
+
# A list of ignored prefixes for module index sorting.
|
|
129
|
+
# modindex_common_prefix = []
|
|
130
|
+
|
|
131
|
+
# If true, keep warnings as "system message" paragraphs in the built documents.
|
|
132
|
+
# keep_warnings = False
|
|
133
|
+
|
|
134
|
+
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
|
135
|
+
todo_include_todos = False
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
# -- Options for HTML output ----------------------------------------------
|
|
139
|
+
|
|
140
|
+
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
141
|
+
# a list of builtin themes.
|
|
142
|
+
#
|
|
143
|
+
html_theme = 'alabaster'
|
|
144
|
+
|
|
145
|
+
# Theme options are theme-specific and customize the look and feel of a theme
|
|
146
|
+
# further. For a list of options available for each theme, see the
|
|
147
|
+
# documentation.
|
|
148
|
+
#
|
|
149
|
+
# html_theme_options = {}
|
|
150
|
+
|
|
151
|
+
# Add any paths that contain custom themes here, relative to this directory.
|
|
152
|
+
# html_theme_path = []
|
|
153
|
+
|
|
154
|
+
# The name for this set of Sphinx documents.
|
|
155
|
+
# "<project> v<release> documentation" by default.
|
|
156
|
+
#
|
|
157
|
+
# html_title = 'Kosh v1'
|
|
158
|
+
|
|
159
|
+
# A shorter title for the navigation bar. Default is the same as html_title.
|
|
160
|
+
#
|
|
161
|
+
# html_short_title = None
|
|
162
|
+
|
|
163
|
+
# The name of an image file (relative to this directory) to place at the top
|
|
164
|
+
# of the sidebar.
|
|
165
|
+
#
|
|
166
|
+
html_logo = os.path.join("..", "..", "share", "icons", "svg", "Kosh_Logo_Blue.svg")
|
|
167
|
+
|
|
168
|
+
# The name of an image file (relative to this directory) to use as a favicon of
|
|
169
|
+
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
|
170
|
+
# pixels large.
|
|
171
|
+
#
|
|
172
|
+
# html_favicon = None
|
|
173
|
+
|
|
174
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
|
175
|
+
# relative to this directory. They are copied after the builtin static files,
|
|
176
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
177
|
+
html_static_path = ['_static']
|
|
178
|
+
|
|
179
|
+
# Add any extra paths that contain custom files (such as robots.txt or
|
|
180
|
+
# .htaccess) here, relative to this directory. These files are copied
|
|
181
|
+
# directly to the root of the documentation.
|
|
182
|
+
#
|
|
183
|
+
# html_extra_path = []
|
|
184
|
+
|
|
185
|
+
# If not None, a 'Last updated on:' timestamp is inserted at every page
|
|
186
|
+
# bottom, using the given strftime format.
|
|
187
|
+
# The empty string is equivalent to '%b %d, %Y'.
|
|
188
|
+
#
|
|
189
|
+
# html_last_updated_fmt = None
|
|
190
|
+
|
|
191
|
+
# If true, SmartyPants will be used to convert quotes and dashes to
|
|
192
|
+
# typographically correct entities.
|
|
193
|
+
#
|
|
194
|
+
# html_use_smartypants = True
|
|
195
|
+
|
|
196
|
+
# Custom sidebar templates, maps document names to template names.
|
|
197
|
+
#
|
|
198
|
+
# html_sidebars = {}
|
|
199
|
+
|
|
200
|
+
# Additional templates that should be rendered to pages, maps page names to
|
|
201
|
+
# template names.
|
|
202
|
+
#
|
|
203
|
+
# html_additional_pages = {}
|
|
204
|
+
|
|
205
|
+
# If false, no module index is generated.
|
|
206
|
+
#
|
|
207
|
+
# html_domain_indices = True
|
|
208
|
+
|
|
209
|
+
# If false, no index is generated.
|
|
210
|
+
#
|
|
211
|
+
# html_use_index = True
|
|
212
|
+
|
|
213
|
+
# If true, the index is split into individual pages for each letter.
|
|
214
|
+
#
|
|
215
|
+
# html_split_index = False
|
|
216
|
+
|
|
217
|
+
# If true, links to the reST sources are added to the pages.
|
|
218
|
+
#
|
|
219
|
+
# html_show_sourcelink = True
|
|
220
|
+
|
|
221
|
+
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
|
222
|
+
#
|
|
223
|
+
# html_show_sphinx = True
|
|
224
|
+
|
|
225
|
+
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
|
226
|
+
#
|
|
227
|
+
# html_show_copyright = True
|
|
228
|
+
|
|
229
|
+
# If true, an OpenSearch description file will be output, and all pages will
|
|
230
|
+
# contain a <link> tag referring to it. The value of this option must be the
|
|
231
|
+
# base URL from which the finished HTML is served.
|
|
232
|
+
#
|
|
233
|
+
# html_use_opensearch = ''
|
|
234
|
+
|
|
235
|
+
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
|
236
|
+
# html_file_suffix = None
|
|
237
|
+
|
|
238
|
+
# Language to be used for generating the HTML full-text search index.
|
|
239
|
+
# Sphinx supports the following languages:
|
|
240
|
+
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
|
|
241
|
+
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
|
|
242
|
+
#
|
|
243
|
+
# html_search_language = 'en'
|
|
244
|
+
|
|
245
|
+
# A dictionary with options for the search language support, empty by default.
|
|
246
|
+
# 'ja' uses this config value.
|
|
247
|
+
# 'zh' user can custom change `jieba` dictionary path.
|
|
248
|
+
#
|
|
249
|
+
# html_search_options = {'type': 'default'}
|
|
250
|
+
|
|
251
|
+
# The name of a javascript file (relative to the configuration directory) that
|
|
252
|
+
# implements a search results scorer. If empty, the default will be used.
|
|
253
|
+
#
|
|
254
|
+
# html_search_scorer = 'scorer.js'
|
|
255
|
+
|
|
256
|
+
# Output file base name for HTML help builder.
|
|
257
|
+
htmlhelp_basename = 'Koshdoc'
|
|
258
|
+
|
|
259
|
+
# -- Options for LaTeX output ---------------------------------------------
|
|
260
|
+
|
|
261
|
+
latex_elements = {
|
|
262
|
+
# The paper size ('letterpaper' or 'a4paper').
|
|
263
|
+
#
|
|
264
|
+
# 'papersize': 'letterpaper',
|
|
265
|
+
|
|
266
|
+
# The font size ('10pt', '11pt' or '12pt').
|
|
267
|
+
#
|
|
268
|
+
# 'pointsize': '10pt',
|
|
269
|
+
|
|
270
|
+
# Additional stuff for the LaTeX preamble.
|
|
271
|
+
#
|
|
272
|
+
# 'preamble': '',
|
|
273
|
+
|
|
274
|
+
# Latex figure (float) alignment
|
|
275
|
+
#
|
|
276
|
+
# 'figure_align': 'htbp',
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
# Grouping the document tree into LaTeX files. List of tuples
|
|
280
|
+
# (source start file, target name, title,
|
|
281
|
+
# author, documentclass [howto, manual, or own class]).
|
|
282
|
+
latex_documents = [
|
|
283
|
+
(master_doc, 'Kosh.tex', 'Kosh Documentation',
|
|
284
|
+
'Charles Doutriaux, Katie Lewis', 'manual'),
|
|
285
|
+
]
|
|
286
|
+
|
|
287
|
+
# The name of an image file (relative to this directory) to place at the top of
|
|
288
|
+
# the title page.
|
|
289
|
+
#
|
|
290
|
+
# latex_logo = None
|
|
291
|
+
|
|
292
|
+
# For "manual" documents, if this is true, then toplevel headings are parts,
|
|
293
|
+
# not chapters.
|
|
294
|
+
#
|
|
295
|
+
# latex_use_parts = False
|
|
296
|
+
|
|
297
|
+
# If true, show page references after internal links.
|
|
298
|
+
#
|
|
299
|
+
# latex_show_pagerefs = False
|
|
300
|
+
|
|
301
|
+
# If true, show URL addresses after external links.
|
|
302
|
+
#
|
|
303
|
+
# latex_show_urls = False
|
|
304
|
+
|
|
305
|
+
# Documents to append as an appendix to all manuals.
|
|
306
|
+
#
|
|
307
|
+
# latex_appendices = []
|
|
308
|
+
|
|
309
|
+
# If false, no module index is generated.
|
|
310
|
+
#
|
|
311
|
+
# latex_domain_indices = True
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
# -- Options for manual page output ---------------------------------------
|
|
315
|
+
|
|
316
|
+
# One entry per manual page. List of tuples
|
|
317
|
+
# (source start file, name, description, authors, manual section).
|
|
318
|
+
man_pages = [
|
|
319
|
+
(master_doc, 'kosh', 'Kosh Documentation',
|
|
320
|
+
[author], 1)
|
|
321
|
+
]
|
|
322
|
+
|
|
323
|
+
# If true, show URL addresses after external links.
|
|
324
|
+
#
|
|
325
|
+
# man_show_urls = False
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
# -- Options for Texinfo output -------------------------------------------
|
|
329
|
+
|
|
330
|
+
# Grouping the document tree into Texinfo files. List of tuples
|
|
331
|
+
# (source start file, target name, title, author,
|
|
332
|
+
# dir menu entry, description, category)
|
|
333
|
+
texinfo_documents = [
|
|
334
|
+
(master_doc, 'Kosh', 'Kosh Documentation',
|
|
335
|
+
author, 'Kosh', 'One line description of project.',
|
|
336
|
+
'Miscellaneous'),
|
|
337
|
+
]
|
|
338
|
+
|
|
339
|
+
# Documents to append as an appendix to all manuals.
|
|
340
|
+
#
|
|
341
|
+
# texinfo_appendices = []
|
|
342
|
+
|
|
343
|
+
# If false, no module index is generated.
|
|
344
|
+
#
|
|
345
|
+
# texinfo_domain_indices = True
|
|
346
|
+
|
|
347
|
+
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
|
348
|
+
#
|
|
349
|
+
# texinfo_show_urls = 'footnote'
|
|
350
|
+
|
|
351
|
+
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
|
352
|
+
#
|
|
353
|
+
# texinfo_no_detailmenu = False
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
# -- Options for Epub output ----------------------------------------------
|
|
357
|
+
|
|
358
|
+
# Bibliographic Dublin Core info.
|
|
359
|
+
epub_title = project
|
|
360
|
+
epub_author = author
|
|
361
|
+
epub_publisher = author
|
|
362
|
+
epub_copyright = copyright
|
|
363
|
+
|
|
364
|
+
# The basename for the epub file. It defaults to the project name.
|
|
365
|
+
# epub_basename = project
|
|
366
|
+
|
|
367
|
+
# The HTML theme for the epub output. Since the default themes are not
|
|
368
|
+
# optimized for small screen space, using the same theme for HTML and epub
|
|
369
|
+
# output is usually not wise. This defaults to 'epub', a theme designed to save
|
|
370
|
+
# visual space.
|
|
371
|
+
#
|
|
372
|
+
# epub_theme = 'epub'
|
|
373
|
+
|
|
374
|
+
# The language of the text. It defaults to the language option
|
|
375
|
+
# or 'en' if the language is not set.
|
|
376
|
+
#
|
|
377
|
+
# epub_language = ''
|
|
378
|
+
|
|
379
|
+
# The scheme of the identifier. Typical schemes are ISBN or URL.
|
|
380
|
+
# epub_scheme = ''
|
|
381
|
+
|
|
382
|
+
# The unique identifier of the text. This can be a ISBN number
|
|
383
|
+
# or the project homepage.
|
|
384
|
+
#
|
|
385
|
+
# epub_identifier = ''
|
|
386
|
+
|
|
387
|
+
# A unique identification for the text.
|
|
388
|
+
#
|
|
389
|
+
# epub_uid = ''
|
|
390
|
+
|
|
391
|
+
# A tuple containing the cover image and cover page html template filenames.
|
|
392
|
+
#
|
|
393
|
+
# epub_cover = ()
|
|
394
|
+
|
|
395
|
+
# A sequence of (type, uri, title) tuples for the guide element of content.opf.
|
|
396
|
+
#
|
|
397
|
+
# epub_guide = ()
|
|
398
|
+
|
|
399
|
+
# HTML files that should be inserted before the pages created by sphinx.
|
|
400
|
+
# The format is a list of tuples containing the path and title.
|
|
401
|
+
#
|
|
402
|
+
# epub_pre_files = []
|
|
403
|
+
|
|
404
|
+
# HTML files that should be inserted after the pages created by sphinx.
|
|
405
|
+
# The format is a list of tuples containing the path and title.
|
|
406
|
+
#
|
|
407
|
+
# epub_post_files = []
|
|
408
|
+
|
|
409
|
+
# A list of files that should not be packed into the epub file.
|
|
410
|
+
epub_exclude_files = ['search.html']
|
|
411
|
+
|
|
412
|
+
# The depth of the table of contents in toc.ncx.
|
|
413
|
+
#
|
|
414
|
+
# epub_tocdepth = 3
|
|
415
|
+
|
|
416
|
+
# Allow duplicate toc entries.
|
|
417
|
+
#
|
|
418
|
+
# epub_tocdup = True
|
|
419
|
+
|
|
420
|
+
# Choose between 'default' and 'includehidden'.
|
|
421
|
+
#
|
|
422
|
+
# epub_tocscope = 'default'
|
|
423
|
+
|
|
424
|
+
# Fix unsupported image types using the Pillow.
|
|
425
|
+
#
|
|
426
|
+
# epub_fix_images = False
|
|
427
|
+
|
|
428
|
+
# Scale large images.
|
|
429
|
+
#
|
|
430
|
+
# epub_max_image_width = 0
|
|
431
|
+
|
|
432
|
+
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
|
433
|
+
#
|
|
434
|
+
# epub_show_urls = 'inline'
|
|
435
|
+
|
|
436
|
+
# If false, no index is generated.
|
|
437
|
+
#
|
|
438
|
+
# epub_use_index = True
|
|
439
|
+
|
|
440
|
+
# app setup hook
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
def setup(app):
|
|
444
|
+
app.add_config_value('recommonmark_config', {
|
|
445
|
+
# 'url_resolver': lambda url: github_doc_root + url,
|
|
446
|
+
'auto_toc_tree_section': 'Contents',
|
|
447
|
+
'enable_math': False,
|
|
448
|
+
'enable_inline_math': False,
|
|
449
|
+
'enable_eval_rst': True,
|
|
450
|
+
'enable_auto_doc_ref': True,
|
|
451
|
+
}, True)
|
|
452
|
+
app.add_transform(AutoStructify)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Inspired by:
|
|
2
|
+
# https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_blobs.html#sklearn.datasets.make_blobs
|
|
3
|
+
import kosh
|
|
4
|
+
import matplotlib.pyplot as plt
|
|
5
|
+
from sklearn import datasets
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SKDatasetLoader(kosh.loaders.KoshLoader):
|
|
9
|
+
types = {"sk_dataset": ["numpy"]}
|
|
10
|
+
|
|
11
|
+
def extract(self):
|
|
12
|
+
args, kargs = self._user_passed_parameters
|
|
13
|
+
if self.feature == "moon":
|
|
14
|
+
return datasets.make_moons(random_state=8, **kargs)[0]
|
|
15
|
+
elif self.feature == "circle":
|
|
16
|
+
return datasets.make_circles(random_state=8, **kargs)[0]
|
|
17
|
+
elif self.feature == "blob":
|
|
18
|
+
return datasets.make_blobs(random_state=8, **kargs)[0]
|
|
19
|
+
else:
|
|
20
|
+
raise RuntimeError("not a feature")
|
|
21
|
+
|
|
22
|
+
def list_features(self):
|
|
23
|
+
return ["moon", "circle", "blob"]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
store = kosh.utils.create_new_db("crp.sql")
|
|
27
|
+
|
|
28
|
+
store.add_loader(SKDatasetLoader)
|
|
29
|
+
|
|
30
|
+
ds = store.create()
|
|
31
|
+
ds.associate("/blah", mime_type="sk_dataset")
|
|
32
|
+
print(ds._associated_data_)
|
|
33
|
+
# ============
|
|
34
|
+
# Generate datasets. We choose the size big enough to see the scalability
|
|
35
|
+
# of the algorithms, but not too big to avoid too long running times
|
|
36
|
+
# ============
|
|
37
|
+
n_samples = 1500
|
|
38
|
+
features = [
|
|
39
|
+
("circle", {"factor": 0.5, "noise": 0.05}),
|
|
40
|
+
("moon", {"noise": 0.05}),
|
|
41
|
+
("blob", {}),
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
SC = kosh.transformers.StandardScaler()
|
|
45
|
+
|
|
46
|
+
estimators = [
|
|
47
|
+
(kosh.transformers.KMeans, {"n_clusters": 3}),
|
|
48
|
+
(kosh.transformers.DBSCAN, {"eps": 0.3}),
|
|
49
|
+
]
|
|
50
|
+
colors = ["orange", "blue", "red", "green", "purple", "salmon", "pink", "grey", "brown", "beige"]
|
|
51
|
+
|
|
52
|
+
f, axarr = plt.subplots(len(estimators), len(features))
|
|
53
|
+
for i, (feature, args) in enumerate(features):
|
|
54
|
+
raw = ds.get(feature, n_samples=n_samples, transformers=[SC], **args)
|
|
55
|
+
# print(raw.shape)
|
|
56
|
+
for j, (est, kargs) in enumerate(estimators):
|
|
57
|
+
axarr[j, i].scatter(raw[:, 0], raw[:, 1], color="black", s=5)
|
|
58
|
+
E = est(**kargs)
|
|
59
|
+
estimator = ds.get(
|
|
60
|
+
feature, n_samples=n_samples, transformers=[SC, E], format="estimator", **args
|
|
61
|
+
)
|
|
62
|
+
# print(estimator)
|
|
63
|
+
E = est(n_samples=100., sampling_method="percent", **kargs)
|
|
64
|
+
labels, data = ds.get(feature, n_samples=n_samples, transformers=[SC, E], format="numpy", **args)
|
|
65
|
+
# print(len(labels))
|
|
66
|
+
for k, dat in enumerate(data):
|
|
67
|
+
print(dat.shape, k)
|
|
68
|
+
axarr[j, i].scatter(dat[:, 0], dat[:, 1], color=colors[k], s=5)
|
|
69
|
+
|
|
70
|
+
plt.show()
|