virgo-modules 0.4.2__tar.gz → 0.4.3__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.
Potentially problematic release.
This version of virgo-modules might be problematic. Click here for more details.
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/PKG-INFO +1 -1
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/setup.py +1 -1
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/re_utils.py +20 -7
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules.egg-info/PKG-INFO +1 -1
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/LICENSE +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/README.md +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/setup.cfg +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/__init__.py +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/__init__.py +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/aws_utils.py +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/backtester.py +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/edge_utils/__init__.py +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/edge_utils/conformal_utils.py +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/edge_utils/edge_utils.py +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/edge_utils/shap_utils.py +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/hmm_utils.py +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/pull_artifacts.py +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/ticketer_source.py +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/transformer_utils.py +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules.egg-info/SOURCES.txt +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules.egg-info/dependency_links.txt +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules.egg-info/requires.txt +0 -0
- {virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules.egg-info/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@ with open("virgo_app/README.md", "r") as f:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="virgo_modules",
|
|
8
|
-
version="0.4.
|
|
8
|
+
version="0.4.3",
|
|
9
9
|
description="data processing and statistical modeling using stock market data",
|
|
10
10
|
package_dir={"": "virgo_app"},
|
|
11
11
|
packages=find_packages(where="virgo_app"),
|
|
@@ -792,7 +792,7 @@ def apply_KF(self, trends):
|
|
|
792
792
|
|
|
793
793
|
stock_eda_panel.apply_KF = apply_KF
|
|
794
794
|
|
|
795
|
-
def call_ml_objects(stock_code, client, call_models = False):
|
|
795
|
+
def call_ml_objects(stock_code, client, call_models = False, clean_name=False):
|
|
796
796
|
'''
|
|
797
797
|
call artifcats from mlflow
|
|
798
798
|
|
|
@@ -805,7 +805,11 @@ def call_ml_objects(stock_code, client, call_models = False):
|
|
|
805
805
|
'''
|
|
806
806
|
objects = dict()
|
|
807
807
|
|
|
808
|
-
|
|
808
|
+
if clean_name:
|
|
809
|
+
renamed_stock_code = stock_code.replace("^","__",).replace(".","__").replace("=","__").replace("-","__")
|
|
810
|
+
registered_model_name = f'{renamed_stock_code}_models'
|
|
811
|
+
else:
|
|
812
|
+
registered_model_name = f'{stock_code}_models'
|
|
809
813
|
latest_version_info = client.get_latest_versions(registered_model_name, stages=["Production"])
|
|
810
814
|
latest_production_version = latest_version_info[0].version
|
|
811
815
|
run_id_prod_model = latest_version_info[0].run_id
|
|
@@ -816,18 +820,27 @@ def call_ml_objects(stock_code, client, call_models = False):
|
|
|
816
820
|
)
|
|
817
821
|
|
|
818
822
|
## calling models
|
|
819
|
-
|
|
823
|
+
if clean_name:
|
|
824
|
+
path_hmm = f"runs:/{run_id_prod_model}/{renamed_stock_code}-hmm-model"
|
|
825
|
+
else:
|
|
826
|
+
path_hmm = f"runs:/{run_id_prod_model}/{stock_code}-hmm-model"
|
|
827
|
+
|
|
820
828
|
hmm_model = mlflow.pyfunc.load_model(
|
|
821
|
-
|
|
822
|
-
|
|
829
|
+
path_hmm,
|
|
830
|
+
suppress_warnings = True
|
|
823
831
|
)
|
|
824
832
|
objects['called_hmm_models'] = hmm_model
|
|
825
833
|
|
|
826
834
|
if call_models:
|
|
827
835
|
|
|
836
|
+
if clean_name:
|
|
837
|
+
path_model = f"runs:/{run_id_prod_model}/{renamed_stock_code}-forecasting-model"
|
|
838
|
+
else:
|
|
839
|
+
path_model = f"runs:/{run_id_prod_model}/{stock_code}-forecasting-model"
|
|
840
|
+
|
|
828
841
|
forecasting_model = mlflow.pyfunc.load_model(
|
|
829
|
-
|
|
830
|
-
|
|
842
|
+
path_model,
|
|
843
|
+
suppress_warnings = True
|
|
831
844
|
)
|
|
832
845
|
objects['called_forecasting_model'] = forecasting_model
|
|
833
846
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/edge_utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/edge_utils/edge_utils.py
RENAMED
|
File without changes
|
{virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/edge_utils/shap_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules/src/transformer_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{virgo_modules-0.4.2 → virgo_modules-0.4.3}/virgo_app/virgo_modules.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|