Skip to content

Commit

Permalink
Remove builder until template variation better understood (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
diehlbw authored Oct 1, 2024
1 parent 8b4bad0 commit fc7bf54
Show file tree
Hide file tree
Showing 58 changed files with 71 additions and 6,195 deletions.
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
include LICENSE.txt
include README.md
include notebooks/*.ipynb
include src/seismometer/builder/resources/*.ipynb
include src/seismometer/builder/resources/*.y*ml
include src/seismometer/report/*.y*ml
include src/seismometer/plot/mpl/ux.mplstyle
include src/seismometer/html/resources/*
Expand Down
1 change: 1 addition & 0 deletions changelog/90.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Temporarily remove CLI - variation in templates is not stable enough to ensure robustness.
10 changes: 0 additions & 10 deletions docs/cli/index.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"sphinxarg.ext",
]

templates_path = ["_templates"]
exclude_patterns = []
napoleon_google_docstring = False
napoleon_numpy_docstring = True
Expand Down
12 changes: 5 additions & 7 deletions docs/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ performance (including inputs and outputs).
What is in Seismometer
======================

Jupyter Notebook templates
Jupyter Notebook examples
--------------------------

Open-source Python libraries and Jupyter Notebooks allow data scientists
to quickly generate a notebook to evaluate model performance.
to quickly create a notebook to evaluate model performance.

We expect these templates to continually evolve as new validation and
We expect these examples to continually expand and evolve as new validation and
analysis techniques and approaches are created.

Data Schemas
Expand All @@ -34,8 +34,7 @@ Standardized data schemas to incorporate data from single or multiple source sys
Notebook configuration definitions
----------------------------------

A config file provides instructions for how to build the notebook using
the provided data and template. Within the file, you can control details
Within the configuration file, you can control details
such as the cohorts to include and the outcomes relevant to the model.
You can also provide supplemental model documentation to give data
scientists and other report consumers working with the notebook
Expand Down Expand Up @@ -142,8 +141,7 @@ The following is an example of an events table.
Provide Configuration Files
===========================

The configuration file provides the instructions to the template for how
to build the Notebook with the provided data. It allows you to define
The configuration file allows you to define
relevant cohorts including things like demographics, sensitive groups,
and other criteria for evaluating model performance. You can define
outcome and intervention events that relate to actions taken based on
Expand Down
12 changes: 5 additions & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Seismometer Documentation
:class-card: intro-card
:shadow: md

New to ``seismometer``? The Getting Started guide provides an introduction
New to ``seismometer``? The Getting Started guide provides an introduction
to ``seismometer``’s main concepts and details on gathering data for analysis.

+++
Expand All @@ -28,7 +28,7 @@ Seismometer Documentation
:class-card: intro-card
:shadow: md

The User Guide provides details on the available templates
The User Guide provides details on the available templates
with explanations of the key concepts.

+++
Expand All @@ -45,7 +45,7 @@ Seismometer Documentation
:class-card: intro-card
:shadow: md

The API Reference guide details the available ``seismometer`` APIs,
The API Reference guide details the available ``seismometer`` APIs,
including how the methods work and available parameters.

+++
Expand All @@ -62,8 +62,8 @@ Seismometer Documentation
:class-card: intro-card
:shadow: md

Did you develop new guidelines or processes for AI model validation?
Saw a typo in the documentation? Learn more about the process for
Did you develop new guidelines or processes for AI model validation?
Saw a typo in the documentation? Learn more about the process for
improving ``seismometer``.

+++
Expand All @@ -85,10 +85,8 @@ Seismometer Documentation
user_guide/index
example_notebooks/index
reference/index
cli/index
development/index
release_notes/index
roadmap/index
integration_guide/index
faq/index

31 changes: 0 additions & 31 deletions docs/reference/internals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,6 @@
Internals
=========

Command Line
------------

Extract
~~~~~~~
.. currentmodule:: seismometer.builder.extract
.. autosummary::
:toctree: api/

extract_supplement
generate_data_dict_from_parquet

Build
~~~~~
.. currentmodule:: seismometer.builder.compile
.. autosummary::
:toctree: api/

compile_notebook

Other
~~~~~
.. currentmodule:: seismometer.builder
.. autosummary::
:toctree: api/

jupyter.contrib_cells
jupyter.get_id
jupyter.get_text


.. currentmodule:: seismometer.plot.mpl

Plotting
Expand Down
46 changes: 7 additions & 39 deletions docs/user_guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,48 +38,17 @@ you might not be familiar with:

- *Feature*. A column of data used as an input to the model.

Generating a Notebook
Creating a Notebook
=====================

Generating a Notebook requires three pieces of information:
Creating a Seismogram (notebook) requires a couple distinct pieces of information:

- Template Notebook: A template Notebook that is suitable for your model.
- Example Notebook: Starting from example notebook, while not required, is expected to be the most straight-forward. Once serveral types of models are supported, it is expected that a CLI will further automate combining new content into the example structure.
- Configuration files: A ``config.yml`` file to specify location of required data and/or other configuration files (refer to the :ref:`config-files`).
- Supplemental info: Explanatory markdown files and model-specific supplements to guide the analysis (refer to the :ref:`config-files`).
- Supplemental info: Explanatory model-specific supplements to guide the analysis.

Each template Notebook is associated with a collection of markdown files. Your markdown files are used to fill the corresponding
markdown file in the template Notebook to generate a Notebook. To extract the expected markdown files
from the template Notebook, you can run the following:
Update or replace the example notebook with content relevant to your model.

.. code-block:: bash
seismometer extract --template binary
If the command is not run from the same directory as your ``config.yml`` file, use

.. code-block:: bash
seismometer extract --template binary --config_yaml {path_to_base_config_file}
In the above example, we are using the ``binary`` template. Run

.. code-block:: bash
seismometer extract --help
for more details on available templates and arguments.

Update the markdown files with content relevant to your model or replace them with model-specific markdown files
provided by the model developer.

After updating the markdown files with content for the model, generate a Notebook by running

.. code-block:: bash
seismometer build [--config_yaml] {path_to_base_config_file}
.. seealso::
:ref:`cli` for more details on the CLI and :ref:`api.internals` for more information on build and extract commands.

Using the Binary Classifier Notebook
====================================
Expand Down Expand Up @@ -343,7 +312,7 @@ Notebook.
Create Configuration Files
--------------------------

Configuration files provide the instructions and details needed to build
Configuration files provide the instructions and details needed to create
the Notebook for your dataset. It can be provided in one or several YAML
files. The configuration includes several sections:

Expand Down Expand Up @@ -477,8 +446,7 @@ defined in a single YAML file.
usage_config: "usage_config.yml"
# Name of the template to use during generation
template: "binary"
# Directory to the location of markdown
# Use seismometer extract to prepopulate these files
# Directory to write info during the notebook run
info_dir: "outputs"
# These two definitions define all the columns available
event_definition: "dictionary.yml"
Expand Down
3 changes: 1 addition & 2 deletions example-notebooks/binary-classifier/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ other_info:
usage_config: "usage_config.yml"
# Name of the template to use during generation
template: "binary"
# Directory to the location of markdown
# Use seismometer extract to prepopulate these files
# Directory to write info from and for the notebook run
info_dir: "outputs"
# These two definitions define all the columns available
event_definition: "data_dictionary.yml"
Expand Down
4 changes: 0 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ install_requires =
[options.packages.find]
where = src

[options.entry_points]
console_scripts =
seismometer = seismometer.builder:main_cli

[options.extras_require]
all =
%(dev)s
Expand Down
91 changes: 0 additions & 91 deletions src/seismometer/builder/__init__.py

This file was deleted.

Loading

0 comments on commit fc7bf54

Please sign in to comment.