diff --git a/openssa/deprecated/inferencer/abstract_inferencer.py b/openssa/deprecated/inferencer/abstract_inferencer.py deleted file mode 100644 index 59649cf2d..000000000 --- a/openssa/deprecated/inferencer/abstract_inferencer.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -AbstractInferencer is the base class for all inferencers. -""" -from abc import ABC, abstractmethod -from dataclasses import dataclass - - -@dataclass(frozen=True) # needed to be added to a set -class AbstractInferencer(ABC): - """ - The AbstractInferencer serves as the base for all concrete Inferencer - classes. The most common inferencer is simply an ML model, but it - could also be a rule-based system, a fuzzy logic system, or any other - system that can infer a response from a given input. - """ - - @abstractmethod - def predict(self, input_data: dict) -> dict: - """ - Returns a prediction based on the given input. - """ - - @abstractmethod - def load(self, path: str): - """ - Loads the inferencer or its parameters from the given path. - """ diff --git a/openssa/deprecated/inferencer/base_inferencer.py b/openssa/deprecated/inferencer/base_inferencer.py deleted file mode 100644 index d29b028ce..000000000 --- a/openssa/deprecated/inferencer/base_inferencer.py +++ /dev/null @@ -1,16 +0,0 @@ -from openssa.deprecated.inferencer.abstract_inferencer import AbstractInferencer - - -class BaseInferencer(AbstractInferencer): - def predict(self, input_data: dict) -> dict: - """ - The BaseInferencer always returns a prediction of True. - """ - assert input_data is not None - return {"prediction": True} - - def load(self, path: str): - """ - The BaseInferencer does not need to load anything. - """ - pass diff --git a/openssa/deprecated/utils/cli/__init__.py b/openssa/deprecated/utils/cli/__init__.py deleted file mode 100644 index a7645ce97..000000000 --- a/openssa/deprecated/utils/cli/__init__.py +++ /dev/null @@ -1,42 +0,0 @@ -"""OpenSSA CLI.""" - - -import click - -from .contrib.ssa_prob_solver import openssa_contrib_ssa_prob_solver_cli - - -@click.group(name='launch', - cls=click.Group, - commands={'solver': openssa_contrib_ssa_prob_solver_cli}, - invoke_without_command=False, - no_args_is_help=True, - subcommand_metavar='OPENSSA_SUB_COMMAND', - chain=False, - help='OpenSSA Contrib CLI >>>', - epilog='^^^ OpenSSA Contrib CLI', - short_help='OpenSSA Contrib CLI', - options_metavar='[OPTIONS]', - add_help_option=True, - hidden=False, - deprecated=False) -def openssa_launch_cli(): - """Trigger OpenSSA Contrib Utilities from CLI.""" - - -@click.group(name='openssa', - cls=click.Group, - commands={'launch': openssa_launch_cli}, - invoke_without_command=False, - no_args_is_help=True, - subcommand_metavar='OPENSSA_SUB_COMMAND', - chain=False, - help='OpenSSA CLI >>>', - epilog='^^^ OpenSSA CLI', - short_help='OpenSSA CLI', - options_metavar='[OPTIONS]', - add_help_option=True, - hidden=False, - deprecated=False) -def openssa_cli(): - """Trigger OpenSSA Utilities from CLI.""" diff --git a/openssa/deprecated/utils/cli/contrib/ssa_prob_solver.py b/openssa/deprecated/utils/cli/contrib/ssa_prob_solver.py deleted file mode 100644 index 45a328ae4..000000000 --- a/openssa/deprecated/utils/cli/contrib/ssa_prob_solver.py +++ /dev/null @@ -1,24 +0,0 @@ -"""OpenSSA Contrib SSA Problem Solver CLI.""" - - -import os -from pathlib import Path - -import click - - -@click.command(name='solver', - cls=click.Command, - context_settings=None, - help=('OpenSSA Contrib SSA Problem Solver CLI >>>'), - epilog=('^^^ OpenSSA Contrib SSA Problem Solver CLI'), - short_help='OpenSSA Contrib SSA Problem Solver CLI', - options_metavar='', - add_help_option=True, - hidden=False, - deprecated=False) -def openssa_contrib_ssa_prob_solver_cli(): - """Launch StreamlitSSAProbSolver.""" - from openssa.contrib.streamlit_ssa_prob_solver import __path__ # pylint: disable=import-outside-toplevel - os.chdir(Path(__path__[0])) - os.system('streamlit run main.py --server.allowRunOnSave=true --server.runOnSave=true')