PipeGraphPy 0.0.25a1__tar.gz → 0.0.26a1__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.
- {PipeGraphPy-0.0.25a1/src/PipeGraphPy.egg-info → PipeGraphPy-0.0.26a1}/PKG-INFO +1 -1
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/README.md +64 -146
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/__init__.py +1 -1
- PipeGraphPy-0.0.26a1/src/PipeGraphPy/core/module.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/storage/__init__.py +2 -2
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/storage/file_backend.py +3 -4
- PipeGraphPy-0.0.26a1/src/PipeGraphPy/storage/redis_backend.py +183 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/celery_control.py +2 -2
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/file_operate.py +0 -1
- PipeGraphPy-0.0.26a1/src/PipeGraphPy/utils/redis_operate.py +195 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1/src/PipeGraphPy.egg-info}/PKG-INFO +1 -1
- PipeGraphPy-0.0.25a1/src/PipeGraphPy/core/module.cpython-38-aarch64-linux-gnu.so +0 -0
- PipeGraphPy-0.0.25a1/src/PipeGraphPy/storage/redis_backend.py +0 -183
- PipeGraphPy-0.0.25a1/src/PipeGraphPy/utils/redis_operate.py +0 -195
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/MANIFEST.in +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/requirements.txt +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/setup.cfg +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/setup.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/common.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/config/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/config/config_light.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/config/custom.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/config/default_settings.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/constants.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/anchor.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/edge.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/graph.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/graph_base.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/base.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/branchselect.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/classifier.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/cluster.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/datacharts.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/deeplearning.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/endscript.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/ensemble.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/evaluate.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/exportdata.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/handlescript.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/importdata.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/merge.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/mergescript.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/metrics.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/postprocessor.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/preprocessor.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/pythonscript.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/regressor.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/selector.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/selectscript.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/special.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/split.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/splitscript.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/startscript.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modcls/transformer.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/branchselect/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/branchselect/sqlbranchselect.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/classifier/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/cluster/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/custom/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/custom/classifier/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/datacharts/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/datacharts/dataview.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/deeplearning/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/ensemble/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/ensemble/predictcombine.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/evaluate/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/evaluate/rmseeval.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/exportdata/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/exportdata/rundownloadcsv.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/exportdata/todb.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/algodata.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/ensemblegridweather.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/fromdb.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/fromsql.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/gridweather.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/import_graph.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/midlong.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/nwpdata.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/qiaogdfsimport.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/shan1xiareaimport.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/strategyalgodata.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/test.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/theorydata.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/thirdpower.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/totalpower.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/importdata/totalpower_utils.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/model_selector/MLP_test_Selector.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/model_selector/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/postprocessor/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/postprocessor/postdownloadcsv.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/postprocessor/test.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/postprocessor/testss.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/postprocessor/zerotocap.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/preprocessor/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/preprocessor/filtercolumns.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/preprocessor/filterlib.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/preprocessor/predownloadcsv.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/preprocessor/sqlfilter.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/pythonscript/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/pythonscript/copycompetitionpredictresulttest.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/pythonscript/reportmengDongenergytest.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/regressor/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/selector/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/selector/explore_selector.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/selector/nwp_selector.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/special/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/special/emptydata.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/special/graphmod.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/transformer/MLP_test_Transformer.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/transformer/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/modules/transformer/rnn_transformer.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/node.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/core/pipegraph.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/db/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/db/models.cpython-38-aarch64-linux-gnu.so +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/db/utils.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/decorators.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/exceptions.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/logger.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/plot/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/plot/draw.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/storage/base.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/storage/dict_backend.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/tools.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/__init__.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/check.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/core.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/examine.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/feature_select.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/format.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/formula.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/functional.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/handle_graph.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/lock.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/mq.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/read_nwp_tar.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/str_handle.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy/utils/version.py +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy.egg-info/SOURCES.txt +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy.egg-info/dependency_links.txt +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy.egg-info/requires.txt +0 -0
- {PipeGraphPy-0.0.25a1 → PipeGraphPy-0.0.26a1}/src/PipeGraphPy.egg-info/top_level.txt +0 -0
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
# Python 三方库 PipeGraphPy 使用手册
|
|
2
|
-
## 1.
|
|
3
|
-
本文档为您介绍一款实用的 Python 三方库 PipeGraphPy,旨在帮助您快速上手并熟练使用该库。库名称:**PipeGraphPy**。本文档将分为以下几个部分进行介绍:
|
|
4
|
-
- 软件介绍
|
|
5
|
-
- 安装
|
|
6
|
-
- 基本使用
|
|
7
|
-
- 高级功能
|
|
8
|
-
- 示例代码
|
|
9
|
-
- 常见问题与解决方案
|
|
10
|
-
- 参考文献
|
|
11
|
-
## 软件介绍
|
|
2
|
+
## 1. 软件介绍
|
|
12
3
|
|
|
13
4
|
### 软件简介
|
|
14
5
|
|
|
@@ -19,26 +10,6 @@ PipeGraphPy是一个Python三方库,主要功能是构建一种可用于训练
|
|
|
19
10
|
- 图模型:一种有向无环图模型,可执行训练、预测、保存、载入等一般模型的操作。
|
|
20
11
|
- 模型节点:组装图模型的节点,可以看做是模型组件的实例化对象,模型节点和模型节点之间可以执行连接操作。
|
|
21
12
|
- 模型组件:图模型节点的种类,本软件把软件的种类分为一下几种:
|
|
22
|
-
- 数据导入(ImportData)
|
|
23
|
-
- 前处理(Preprocessor)
|
|
24
|
-
- 特征选择(Selector)
|
|
25
|
-
- 特征转换(Transformer)
|
|
26
|
-
- 回归算法(Regressor)
|
|
27
|
-
- 分类算法(Classifier)
|
|
28
|
-
- 深度学习(Deeplearning)
|
|
29
|
-
- 集成学习()
|
|
30
|
-
- 后处理(Postprocessor)
|
|
31
|
-
1、数据导入(ImportData):导入模型训练预测评估使用的数据。
|
|
32
|
-
2、前处理(Preprocessor):数据清洗:缺失值处理,异常值处理,降噪、过滤等方法。
|
|
33
|
-
3、特征选择(Selector):从原始特征中选择出对目标变量有重要影响的特征。例如:SKlearn中的feature_selection或XGB中的feature_importances_
|
|
34
|
-
4、特征转换(Transformer):训练特征发生了转变。例如:主成分分析(PCA)或线性判别分析(LDA)
|
|
35
|
-
5、回归算法(Regressor):sklearn, xgboost, 在组件内部可以使用交叉验证,网格搜索, 常用的有:MLP,SVM(SVR),随机森林,GridSearch。
|
|
36
|
-
6、分类算法(Classifier):
|
|
37
|
-
6、深度学习(Deeplearning):pytouch,tensorflow,keras, 常用的GRU,LSTM,ConLSTM,CNN。
|
|
38
|
-
7、集成学习():多模型数据替换,数据平均法、加权平均法,甚至可以实现stacking功能。
|
|
39
|
-
8、后处理(Postprocessor):预测数据的后处理,例如:装机容量的限制,数据入库,数据发送。
|
|
40
|
-
9、数据拆分(Split): 一个数据拆分成多个数据。
|
|
41
|
-
10、数据合并(Merge):多个数据合并为一个数据。
|
|
42
13
|
- 模型连线: 模型节点和模型节点之间的连线,代表着模型中数据的流向,模型数据是pandas库提供的DataFrame格式
|
|
43
14
|
|
|
44
15
|
### 图模型框架
|
|
@@ -49,16 +20,40 @@ PipeGraphPy是一个Python三方库,主要功能是构建一种可用于训练
|
|
|
49
20
|
|
|
50
21
|
#### 简单结构
|
|
51
22
|
|
|
23
|
+
简单的模型结构只包含,数据导入、前处理(可省略)、算法、后处理(可省略)节点,如下图所示:
|
|
24
|
+
|
|
25
|
+

|
|
26
|
+
|
|
52
27
|
#### 复杂结构
|
|
53
28
|
|
|
29
|
+
复杂的模型可有多个数据导入、前处理、算法和后处理节点,复杂模型还需要包含一个集成学习节点,集成学习节点下还可以连接后处理或集成学习节点,结构如下图所示:
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
|
|
54
33
|
|
|
55
34
|
## 2. 安装
|
|
56
35
|
### 2.1 安装
|
|
57
36
|
安装 PipeGraphPy 需要有Python的环境,以及Python的pip包管理工具
|
|
58
37
|
使用以下命令安装 PipeGraphPy:
|
|
38
|
+
|
|
39
|
+
(1) 使用程序源码安装
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
python setup.py install
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
(2) 使用程序安装包安装
|
|
46
|
+
|
|
59
47
|
```bash
|
|
60
|
-
pip install PipeGraphPy
|
|
48
|
+
pip install PipeGraphPy-0.0.25.tar.gz
|
|
61
49
|
```
|
|
50
|
+
|
|
51
|
+
(3) 使用pypi官方库联网安装
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install PipeGraphPy -i https://pypi.org/simple
|
|
55
|
+
```
|
|
56
|
+
|
|
62
57
|
## 3. 基本使用
|
|
63
58
|
### 3.1 库导入
|
|
64
59
|
在使用PipeGraphPy库时,主要使用其三个子类,导入方式如下:
|
|
@@ -73,6 +68,8 @@ from PipeGraphPy import Graph, Node, Module
|
|
|
73
68
|
- test_data.py
|
|
74
69
|
|
|
75
70
|
```
|
|
71
|
+
import pandas ad pd
|
|
72
|
+
|
|
76
73
|
class ImportExample():
|
|
77
74
|
__version__ = "v1"
|
|
78
75
|
TEMPLATE = [
|
|
@@ -221,7 +218,7 @@ model.print()
|
|
|
221
218
|
# 训练模型
|
|
222
219
|
model.run()
|
|
223
220
|
# 保存模型
|
|
224
|
-
clone_model.save("svm_model.pkl")
|
|
221
|
+
clone_model.save("/home/name/svm_model.pkl")
|
|
225
222
|
|
|
226
223
|
```
|
|
227
224
|
|
|
@@ -232,7 +229,7 @@ clone_model.save("svm_model.pkl")
|
|
|
232
229
|
|
|
233
230
|
```
|
|
234
231
|
# 载入模型
|
|
235
|
-
model = Graph.load("svm_model.pkl")
|
|
232
|
+
model = Graph.load("/home/name/svm_model.pkl")
|
|
236
233
|
# 模型预测
|
|
237
234
|
predict_res = model.predict()
|
|
238
235
|
# 查看预测结果
|
|
@@ -245,13 +242,12 @@ print(predict_res)
|
|
|
245
242
|
|
|
246
243
|
- 1、创建自定义模型
|
|
247
244
|
```python
|
|
248
|
-
|
|
249
|
-
custom_model = Graph.create(instance_id="电场id", name="模型名称")
|
|
245
|
+
custom_model = Graph.create(name="模型名称")
|
|
250
246
|
```
|
|
251
247
|
|
|
252
248
|
- 2、克隆已有模型
|
|
253
249
|
```
|
|
254
|
-
clone_model =
|
|
250
|
+
clone_model = custom_model.clone()
|
|
255
251
|
clone_model.print()
|
|
256
252
|
```
|
|
257
253
|
|
|
@@ -282,7 +278,7 @@ pred_res = reload_model.predict()
|
|
|
282
278
|
#### 3.3.2 Module 模块
|
|
283
279
|
|
|
284
280
|
- 1、新建组件
|
|
285
|
-
`
|
|
281
|
+
`module = Module.create(mtype="ImportData", mcls=ImportExample)`
|
|
286
282
|
|
|
287
283
|
图模型节点的种类,本软件把软件的种类分为一下几种:
|
|
288
284
|
1、数据导入(ImportData):导入模型训练预测评估使用的数据。
|
|
@@ -319,27 +315,26 @@ class ImportDataExample():
|
|
|
319
315
|
__version__ = "v1.1"
|
|
320
316
|
def __init__(self,**kw):
|
|
321
317
|
self.params = kw
|
|
322
|
-
self.farm_info = kw.get('biz info')
|
|
323
318
|
def run(self):
|
|
324
319
|
train_df = pd.DataFrame({
|
|
325
|
-
"
|
|
326
|
-
"
|
|
327
|
-
"
|
|
320
|
+
"time":["2022-08-25 08:19:00","2022-08-25 08:19:15"],
|
|
321
|
+
"ws":[12,8],
|
|
322
|
+
"power":[2300,1200],
|
|
328
323
|
})
|
|
329
324
|
train_df = train_df.set_index("dtime")
|
|
330
325
|
return train_df
|
|
331
326
|
def evaluate(self):
|
|
332
327
|
evaluate_df = pd.DataFrame({
|
|
333
|
-
"
|
|
334
|
-
"
|
|
335
|
-
"
|
|
328
|
+
"time": ["2022-08-26 08:19:00","2022-08-26 08:19:15"],
|
|
329
|
+
"ws":[24,12],
|
|
330
|
+
"power":[200,800],
|
|
336
331
|
})
|
|
337
332
|
evaluate_df = evaluate_df.set_index("dtime")
|
|
338
333
|
return evaluate_df
|
|
339
334
|
def predict(self):
|
|
340
335
|
predict_df = pd.DataFrame({
|
|
341
|
-
"
|
|
342
|
-
"
|
|
336
|
+
"time": ["2022-09-09 08:19:00","2022-09-09 08:19:15"],
|
|
337
|
+
"ws":[11,18],
|
|
343
338
|
})
|
|
344
339
|
predict_df = predict_df.set_index("dtime")
|
|
345
340
|
return predict_df
|
|
@@ -368,52 +363,33 @@ class ImportDataExample():
|
|
|
368
363
|
代码示例:
|
|
369
364
|
|
|
370
365
|
```python
|
|
366
|
+
|
|
371
367
|
import pandas as pd
|
|
372
|
-
|
|
373
|
-
import algo_data
|
|
374
|
-
from scipy import interpolate
|
|
368
|
+
from pandasql import sqldf
|
|
375
369
|
|
|
376
|
-
class
|
|
370
|
+
class SqlFilter():
|
|
371
|
+
__version__ = '0.0.2'
|
|
377
372
|
def __init__(self, **kw):
|
|
378
373
|
self.params = kw
|
|
379
|
-
self.farm_info = kw.get('
|
|
374
|
+
self.farm_info = kw.get('biz_info')
|
|
380
375
|
|
|
381
|
-
def
|
|
376
|
+
def _sqlfilter(self, sql, X, y=None):
|
|
377
|
+
X, y = X, pd.DataFrame() if y is None else y
|
|
378
|
+
if sql:
|
|
379
|
+
filter_X = sqldf(sql, locals())
|
|
380
|
+
self.print(X.index.name)
|
|
381
|
+
filter_X = filter_X.set_index(X.index.name)
|
|
382
|
+
filter_X.index = filter_X.index.astype(X.index.dtype)
|
|
383
|
+
X = filter_X
|
|
382
384
|
return X
|
|
383
385
|
|
|
386
|
+
def transform(self, X):
|
|
387
|
+
sql = self.params.get('predict_sql') or self.params.get('sql')
|
|
388
|
+
return self._sqlfilter(sql, X)
|
|
389
|
+
|
|
384
390
|
def fit_transform(self, X, y=None):
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
if not fl.empty:
|
|
388
|
-
df = data.copy()
|
|
389
|
-
df.loc[df['r_wspd'].values < 0, 'r_wspd']=0
|
|
390
|
-
df.loc[df['r_apower'].values < 0, 'r_apower']=0
|
|
391
|
-
indexs = list(df[np.isnan(df['r_wspd'])].index)
|
|
392
|
-
df = df.drop(indexs)
|
|
393
|
-
indexs = list(df[np.isnan(df['r_apower'])].index)
|
|
394
|
-
df = df.drop(indexs)
|
|
395
|
-
wspd=df['r_wspd'].values
|
|
396
|
-
wspd_max=np.max(wspd)
|
|
397
|
-
if wspd_max>25:
|
|
398
|
-
u_add=np.linspace(25+10**-10,wspd_max,20)
|
|
399
|
-
add_values = pd.DataFrame(columns = ["Num", "speed_u","power_u","speed_d","power_d"])
|
|
400
|
-
add_values['speed_u'],add_values['speed_d']=u_add,u_add
|
|
401
|
-
add_values['power_u'],add_values['power_d']=fl['power_u'][999],fl['power_d'][999]
|
|
402
|
-
add_values['Num']=np.linspace(1001,1020,20)
|
|
403
|
-
fl = fl.append(add_values,ignore_index=True)
|
|
404
|
-
|
|
405
|
-
f_up = interpolate.interp1d(fl['speed_u'].values,fl['power_u'].values,kind='quadratic')
|
|
406
|
-
f_down = interpolate.interp1d(fl['speed_d'].values,fl['power_d'].values,kind='quadratic')
|
|
407
|
-
df['up_power']=f_up(df['r_wspd'])
|
|
408
|
-
df['down_power']=f_down(df['r_wspd'])
|
|
409
|
-
df.loc[df['r_apower'].values > df['up_power'].values, 'flag']=1
|
|
410
|
-
df.loc[df['r_apower'].values < df['down_power'].values, 'flag']=1
|
|
411
|
-
df.loc[df['r_apower'].values > df['up_power'].values, 'r_apower']=(df['up_power']+df['down_power'])/2
|
|
412
|
-
df.loc[df['r_apower'].values < df['down_power'].values, 'r_apower']=(df['up_power']+df['down_power'])/2
|
|
413
|
-
del df['up_power'],df['down_power']
|
|
414
|
-
return df
|
|
415
|
-
else:
|
|
416
|
-
return data
|
|
391
|
+
sql = self.params.get('fit_sql') or self.params.get('sql')
|
|
392
|
+
return self._sqlfilter(sql, X, y)
|
|
417
393
|
|
|
418
394
|
```
|
|
419
395
|
#### 3、回归算法(Regressor)、分类算法(Classifier)、深度学习(Deeplearning)代码规范:
|
|
@@ -435,7 +411,6 @@ class SVM():
|
|
|
435
411
|
def __init__(self, **kw):
|
|
436
412
|
self.params = kw
|
|
437
413
|
self.algo_param = kw.get('algo_param', dict())
|
|
438
|
-
self.__author__ = 'Song Dian'
|
|
439
414
|
self.model = SVR(**self.algo_param)
|
|
440
415
|
self.scaler_x = StandardScaler()
|
|
441
416
|
self.scaler_y = StandardScaler()
|
|
@@ -468,15 +443,11 @@ class zeroToCap():
|
|
|
468
443
|
__version__ = "v1.1"
|
|
469
444
|
def __init__(self, **kw):
|
|
470
445
|
self.params = kw
|
|
471
|
-
self.farm_info = kw.get('biz_info')
|
|
472
446
|
|
|
473
447
|
def transform(self, df):
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
# 对预测值处理
|
|
478
|
-
if 'r_apower_predict' in df.columns:
|
|
479
|
-
df.loc[:, 'r_apower_predict'] = df['r_apower_predict'].apply(
|
|
448
|
+
powercap = 50
|
|
449
|
+
if 'power_predict' in df.columns:
|
|
450
|
+
df.loc[:, 'power_predict'] = df['power_predict'].apply(
|
|
480
451
|
lambda x: 0 if x < 0 else int(
|
|
481
452
|
powercap) if x > int(powercap) else x
|
|
482
453
|
)
|
|
@@ -525,7 +496,6 @@ params_rules = {
|
|
|
525
496
|
#### 3.3.3 Node 模块
|
|
526
497
|
- 1、创建新的节点
|
|
527
498
|
```python
|
|
528
|
-
help(Node.create)
|
|
529
499
|
# 线上组件节点
|
|
530
500
|
import_node = Node.create(online_module, graph=custom_graph, name="线上模型节点") # name可省略
|
|
531
501
|
# 自定义组件节点
|
|
@@ -546,7 +516,7 @@ reg_node.run(train_data) # 传递上一节点数据
|
|
|
546
516
|
- 3、节点参数设置
|
|
547
517
|
```python
|
|
548
518
|
# 默认参数
|
|
549
|
-
import_node.default_params
|
|
519
|
+
default_params = import_node.default_params
|
|
550
520
|
# 修改默认参数
|
|
551
521
|
import_node.params = {
|
|
552
522
|
'data_length': 4,
|
|
@@ -556,55 +526,3 @@ import_node.params = {
|
|
|
556
526
|
import_node.run()
|
|
557
527
|
```
|
|
558
528
|
|
|
559
|
-
|
|
560
|
-
以下为您介绍库中的常用功能:
|
|
561
|
-
- 功能 1:
|
|
562
|
-
```python
|
|
563
|
-
xxx 库。功能 1()
|
|
564
|
-
```
|
|
565
|
-
- 功能 2:
|
|
566
|
-
```python
|
|
567
|
-
xxx 库。功能 2(参数 1, 参数 2)
|
|
568
|
-
```
|
|
569
|
-
## 4. 组件开发规范
|
|
570
|
-
以下为您介绍库的高级功能:
|
|
571
|
-
- 高级功能 1:
|
|
572
|
-
```python
|
|
573
|
-
xxx 库。高级功能 1(参数 1, 参数 2)
|
|
574
|
-
```
|
|
575
|
-
- 高级功能 2:
|
|
576
|
-
```python
|
|
577
|
-
xxx 库。高级功能 2(参数 1, 参数 2)
|
|
578
|
-
```
|
|
579
|
-
## 5. 示例代码
|
|
580
|
-
以下是一个完整的示例代码:
|
|
581
|
-
```python
|
|
582
|
-
# 导入库
|
|
583
|
-
import xxx 库
|
|
584
|
-
# 功能 1 示例
|
|
585
|
-
xxx 库。功能 1()
|
|
586
|
-
# 功能 2 示例
|
|
587
|
-
xxx 库。功能 2(参数 1, 参数 2)
|
|
588
|
-
# 高级功能 1 示例
|
|
589
|
-
xxx 库。高级功能 1(参数 1, 参数 2)
|
|
590
|
-
# 高级功能 2 示例
|
|
591
|
-
xxx 库。高级功能 2(参数 1, 参数 2)
|
|
592
|
-
```
|
|
593
|
-
## 6. 常见问题与解决方案
|
|
594
|
-
### 6.1 问题 1
|
|
595
|
-
描述:在使用过程中,可能会遇到问题 1。
|
|
596
|
-
解决方案:
|
|
597
|
-
1. 检查库版本,确保与您的 Python 版本兼容。
|
|
598
|
-
2. 检查导入语句,确保正确导入库。
|
|
599
|
-
3. 检查参数传递,确保符合函数参数要求。
|
|
600
|
-
### 6.2 问题 2
|
|
601
|
-
描述:在使用过程中,可能会遇到问题 2。
|
|
602
|
-
解决方案:
|
|
603
|
-
1. 更新库版本,确保使用最新功能。
|
|
604
|
-
2. 查阅文档,了解详细使用方法。
|
|
605
|
-
3. 在官方论坛或社区寻求帮助。
|
|
606
|
-
## 7. 参考文献
|
|
607
|
-
- [Python 官方文档](https://docs.python.org/3/index.html)
|
|
608
|
-
- [库官方文档](https://www.example.com/doc/xxx 库)
|
|
609
|
-
- [Python 教程](https://www.runoob.com/python/python-tutorial.html)
|
|
610
|
-
本文档仅供参考,具体使用过程中遇到的问题,请随时查阅相关文献或与开发者联系。感谢您的使用和支持!
|
|
@@ -14,7 +14,6 @@ from PipeGraphPy.constants import (
|
|
|
14
14
|
NODE_OUTPUT_KEY, MOD_RETURN_RESULT,
|
|
15
15
|
ALGO_MOD_TYPE, MODULES, SCENETYPE)
|
|
16
16
|
from PipeGraphPy.logger import rlog
|
|
17
|
-
from PipeGraphPy.db.models import AlgoModTypeTB
|
|
18
17
|
|
|
19
18
|
ttl = 7
|
|
20
19
|
|
|
@@ -320,8 +319,8 @@ def trans_deeplearning_algo_model(graph, folder_path=None, is_load=False):
|
|
|
320
319
|
for k, v in graph.a.nodes_dict.items():
|
|
321
320
|
if v.module.parent.info["cls_name"] == MODULES.DEEPLEARNING:
|
|
322
321
|
if v.module.info.get("algo_type_id"):
|
|
323
|
-
|
|
324
|
-
if
|
|
322
|
+
algo_mod_type_name = v.module.info.get('algo_mod_type_name')
|
|
323
|
+
if algo_mod_type_name and hasattr(v.algo_instance, "model"):
|
|
325
324
|
func = None
|
|
326
325
|
if is_load:
|
|
327
326
|
if isinstance(v.algo_instance.model, str):
|
|
@@ -333,7 +332,7 @@ def trans_deeplearning_algo_model(graph, folder_path=None, is_load=False):
|
|
|
333
332
|
v.algo_instance.model = func(
|
|
334
333
|
graph.id,
|
|
335
334
|
v.info['id'],
|
|
336
|
-
|
|
335
|
+
algo_mod_type_name,
|
|
337
336
|
v.algo_instance.model,
|
|
338
337
|
folder_path,
|
|
339
338
|
)
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
# import redis
|
|
5
|
+
# import pickle
|
|
6
|
+
# import traceback
|
|
7
|
+
# from PipeGraphPy.storage.base import ParamsPoolBase
|
|
8
|
+
# from PipeGraphPy.utils.format import binary_to_utf8
|
|
9
|
+
# from collections import defaultdict
|
|
10
|
+
# from PipeGraphPy.config import settings
|
|
11
|
+
# from PipeGraphPy.utils.redis_operate import pickle_dumps, pickle_loads
|
|
12
|
+
# from PipeGraphPy.constants import (NODE_STATUS_KEY, NODE_OUTPUT_KEY,
|
|
13
|
+
# GRAPH_STATUS_KEY, GRAPH_KEY, MOD_RETURN_RESULT)
|
|
14
|
+
#
|
|
15
|
+
# from PipeGraphPy.logger import rlog
|
|
16
|
+
# redis_conf = dict(
|
|
17
|
+
# host=settings.REDIS_HOST,
|
|
18
|
+
# port=settings.REDIS_PORT,
|
|
19
|
+
# db=settings.REDIS_DB,
|
|
20
|
+
# )
|
|
21
|
+
# redis_key_ttl = settings.REDIS_KEY_TTL
|
|
22
|
+
#
|
|
23
|
+
#
|
|
24
|
+
# redis_conn = redis.Redis(
|
|
25
|
+
# host=redis_conf['host'], port=redis_conf['port'], db=redis_conf['db'])
|
|
26
|
+
#
|
|
27
|
+
#
|
|
28
|
+
# class ParamsPool(ParamsPoolBase):
|
|
29
|
+
# '''传参池'''
|
|
30
|
+
#
|
|
31
|
+
# def __init__(self, graph_id, is_predict=False):
|
|
32
|
+
# self.graph_id = graph_id
|
|
33
|
+
# self.is_predict = is_predict
|
|
34
|
+
#
|
|
35
|
+
# def add_params(self, node, idx, data):
|
|
36
|
+
# '''添加传参值'''
|
|
37
|
+
# save_params(self.graph_id, node.id, idx, data, self.is_predict)
|
|
38
|
+
#
|
|
39
|
+
# def get_params(self, node, idx):
|
|
40
|
+
# '''获取传参值'''
|
|
41
|
+
# res = get_params(self.graph_id, node.id, idx,
|
|
42
|
+
# is_pd=True, is_predict=self.is_predict)
|
|
43
|
+
# return res
|
|
44
|
+
#
|
|
45
|
+
# def add_params_by_list(self, node, data_list):
|
|
46
|
+
# '''通过数据列表添加传参'''
|
|
47
|
+
# for idx, data in enumerate(data_list):
|
|
48
|
+
# self.add_params(node, idx, data)
|
|
49
|
+
#
|
|
50
|
+
# def is_end(self, node):
|
|
51
|
+
# '''判断节点是否已运行完'''
|
|
52
|
+
# return True if self.get_params(node, 0) is not None else False
|
|
53
|
+
#
|
|
54
|
+
# def check_pass_params(self, node):
|
|
55
|
+
# '''循环父节点判断父节点是否已结束'''
|
|
56
|
+
# return all([self.is_end(i) for i in node.fathers])
|
|
57
|
+
#
|
|
58
|
+
# def gen_pass_params(self, edges_dict, node):
|
|
59
|
+
# '''生成节点要传入的参数'''
|
|
60
|
+
# input_output_dict = defaultdict(list)
|
|
61
|
+
# input_output_list = list()
|
|
62
|
+
# # 循环所有父节点, 组合node和idx值
|
|
63
|
+
# for n in node.fathers:
|
|
64
|
+
# pass_idx = edges_dict[(n.id, node.id)]
|
|
65
|
+
# out_idx_str, input_idx_str = pass_idx.split('-')
|
|
66
|
+
# input_output_list.extend(zip(input_idx_str.split(
|
|
67
|
+
# ','), [(n, int(i)) for i in out_idx_str.split(',')]))
|
|
68
|
+
#
|
|
69
|
+
# for i, o in input_output_list:
|
|
70
|
+
# input_output_dict[int(i)].append(o)
|
|
71
|
+
#
|
|
72
|
+
# # 根据node和idx获取节点,识别列表,把接口是列表类型的数据放入一个列表中
|
|
73
|
+
# input_params_list = list()
|
|
74
|
+
# for k, v in input_output_dict.items():
|
|
75
|
+
# if len(v) > 1:
|
|
76
|
+
# input_params_list.append((k, [self.get_params(*i) for i in v]))
|
|
77
|
+
# elif len(v) == 1:
|
|
78
|
+
# input_params_list.append((k, self.get_params(*v[0])))
|
|
79
|
+
# else:
|
|
80
|
+
# raise Exception('传参错误')
|
|
81
|
+
# # 参数排序
|
|
82
|
+
# input_params_list.sort(key=lambda x: x[0])
|
|
83
|
+
# arg = [i[1] for i in input_params_list]
|
|
84
|
+
# # 当list输入为1个元素时要转成list
|
|
85
|
+
# for i, item in enumerate(node.input_data_type):
|
|
86
|
+
# if item.startswith('list') and not isinstance(arg[i], list):
|
|
87
|
+
# arg[i] = [arg[i]]
|
|
88
|
+
# return arg
|
|
89
|
+
#
|
|
90
|
+
#
|
|
91
|
+
# def save_node_status(node, is_predict=False):
|
|
92
|
+
# '''保存节点到redis'''
|
|
93
|
+
# key = NODE_STATUS_KEY.format(graph_id=node.info['graph_id'],
|
|
94
|
+
# node_id=node.id)
|
|
95
|
+
# redis_conn.hmset(key, node.to_dict())
|
|
96
|
+
#
|
|
97
|
+
#
|
|
98
|
+
# def get_node_status(graph_id, node_id, is_predict=False):
|
|
99
|
+
# '''获取节点状态到从redis'''
|
|
100
|
+
# fields = ['val', 'is_pass', 'status', 'run_log']
|
|
101
|
+
# key = NODE_STATUS_KEY.format(graph_id=graph_id, node_id=node_id)
|
|
102
|
+
# res = redis_conn.hmget(key, fields)
|
|
103
|
+
# return dict(zip(fields, binary_to_utf8(res)))
|
|
104
|
+
#
|
|
105
|
+
#
|
|
106
|
+
# def save_graph_status(graph_id, is_predict=False):
|
|
107
|
+
# '''保存图的状态到redis'''
|
|
108
|
+
# key = GRAPH_STATUS_KEY.format(graph_id=graph_id)
|
|
109
|
+
# redis_conn.hmset(key, graph_id)
|
|
110
|
+
#
|
|
111
|
+
#
|
|
112
|
+
# def get_graph_status(graph_id, is_predict=False):
|
|
113
|
+
# '''获取图状态到从redis'''
|
|
114
|
+
# fields = ['pid', 'status', 'run_log']
|
|
115
|
+
# key = GRAPH_STATUS_KEY.format(graph_id=graph_id)
|
|
116
|
+
# res = redis_conn.hmget(key, fields)
|
|
117
|
+
# return dict(zip(fields, binary_to_utf8(res)))
|
|
118
|
+
#
|
|
119
|
+
#
|
|
120
|
+
# def save_params(graph_id, node_id, idx, data, is_predict=False):
|
|
121
|
+
# '''保存图模块输出结果到redis'''
|
|
122
|
+
# key = NODE_OUTPUT_KEY.format(graph_id=graph_id,
|
|
123
|
+
# node_id=node_id,
|
|
124
|
+
# idx=idx)
|
|
125
|
+
# pickle_dumps(redis_conn, key, data)
|
|
126
|
+
#
|
|
127
|
+
#
|
|
128
|
+
# def get_params(graph_id, node_id, idx, is_pd=False, is_predict=False):
|
|
129
|
+
# '''获取图模块输出结果从redis'''
|
|
130
|
+
# key = NODE_OUTPUT_KEY.format(graph_id=graph_id,
|
|
131
|
+
# node_id=node_id,
|
|
132
|
+
# idx=idx)
|
|
133
|
+
# return pickle_loads(redis_conn, key)
|
|
134
|
+
#
|
|
135
|
+
#
|
|
136
|
+
# def delete_params(graph_id, is_predict=False):
|
|
137
|
+
# '''删除所有模块输出结果从redis'''
|
|
138
|
+
# try:
|
|
139
|
+
# pattern_key = 'graph_output_%s_*' % graph_id
|
|
140
|
+
# key_list = redis_conn.keys(pattern=pattern_key)
|
|
141
|
+
# if key_list:
|
|
142
|
+
# res = redis_conn.delete(*key_list)
|
|
143
|
+
# return res
|
|
144
|
+
# return 1
|
|
145
|
+
# except Exception:
|
|
146
|
+
# rlog.error(
|
|
147
|
+
# traceback.format_exc(),
|
|
148
|
+
# graph_id=graph_id)
|
|
149
|
+
#
|
|
150
|
+
#
|
|
151
|
+
# def save_graph(graph_id, data, is_predict=False):
|
|
152
|
+
# '''保存图到redis'''
|
|
153
|
+
# key = GRAPH_KEY.format(graph_id=graph_id)
|
|
154
|
+
# pickle_dumps(redis_conn, key, data)
|
|
155
|
+
#
|
|
156
|
+
#
|
|
157
|
+
# def get_graph(graph_id, is_predict=False):
|
|
158
|
+
# '''获取图从redis'''
|
|
159
|
+
# key = GRAPH_KEY.format(graph_id=graph_id)
|
|
160
|
+
# return pickle_loads(redis_conn, key)
|
|
161
|
+
#
|
|
162
|
+
#
|
|
163
|
+
# def push_result(graph_id, data, is_predict=False):
|
|
164
|
+
# '''增加模块进行结果到redis'''
|
|
165
|
+
# key = MOD_RETURN_RESULT.format(graph_id=graph_id)
|
|
166
|
+
# pd_bytes = pickle.dumps(data)
|
|
167
|
+
# res = redis_conn.lpush(key, pd_bytes)
|
|
168
|
+
# if not res:
|
|
169
|
+
# raise Exception('保存数据到redis发生错误')
|
|
170
|
+
# return res
|
|
171
|
+
#
|
|
172
|
+
#
|
|
173
|
+
# def pop_result(graph_id, is_predict=False):
|
|
174
|
+
# '''从redis获取模块运行结果'''
|
|
175
|
+
# try:
|
|
176
|
+
# key = MOD_RETURN_RESULT.format(graph_id=graph_id)
|
|
177
|
+
# res = redis_conn.rpop(name=key)
|
|
178
|
+
# if not res:
|
|
179
|
+
# return None
|
|
180
|
+
# res = pickle.loads(res)
|
|
181
|
+
# return res
|
|
182
|
+
# except Exception:
|
|
183
|
+
# rlog.error(traceback.format_exc(), graph_id=graph_id)
|