Skip to content
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.

Commit

Permalink
high level: Split single file into multiple
Browse files Browse the repository at this point in the history
high_level.py becomes high_level/{ml,dataflow,source}.py

Fixes: #1170
Related: #662
  • Loading branch information
programmer290399 committed Jul 24, 2021
1 parent 9cdc1cf commit dcc6412
Show file tree
Hide file tree
Showing 22 changed files with 626 additions and 597 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Build docs using `dffml service dev docs`
- `cached_download/unpack_archive()` are now functions
- Model `directory` property to `location`
- `high_level` split into `ml`, `dataflow` & `source` submodules
### Fixed
- Record object key properties are now always strings

Expand Down
12 changes: 6 additions & 6 deletions dffml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ class DuplicateName(Exception):

# If a duplicate name is found, we specify which one to prefer here
DUPLICATE_PREFER = {
"train": "high_level",
"predict": "high_level",
"accuracy": "high_level",
"load": "high_level",
"save": "high_level",
"run": "high_level",
"train": "high_level.ml",
"predict": "high_level.ml",
"accuracy": "high_level.ml",
"load": "high_level.source",
"save": "high_level.source",
"run": "high_level.dataflow",
"list_action": "base",
}
# List of modules not to expose
Expand Down
2 changes: 1 addition & 1 deletion dffml/cli/dataflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from ..util.cli.parser import ParseInputsAction
from ..util.crypto import insecure_hash
from ..base import config, field
from ..high_level import run as run_dataflow
from ..high_level.dataflow import run as run_dataflow


@config
Expand Down
2 changes: 1 addition & 1 deletion dffml/cli/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from ..model.model import Model
from ..source.source import Sources, SubsetSources
from ..util.cli.cmd import CMD, CMDOutputOverride
from ..high_level import train, predict, accuracy
from ..high_level.ml import train, predict, accuracy
from ..util.config.fields import FIELD_SOURCES
from ..util.cli.cmds import (
SourcesCMD,
Expand Down
Loading

0 comments on commit dcc6412

Please sign in to comment.