Skip to content

Commit d093ce5

Browse files
Jovonni PharrJovonni Pharr
authored andcommitted
fixed ProfileModel bug when using through the CLI, and updates-v
1 parent 52b94de commit d093ce5

File tree

6 files changed

+15
-9
lines changed

6 files changed

+15
-9
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@ core/.mypy_cache/*
1515
interface/dist/
1616
/interface/dist/
1717
*.DS_Store
18-
18+
/**/.DS_Store
19+
/**/__pycache__
20+
/**/.mypy_cache
21+
/**/.pyc
22+
/**/*.mypy_cache

core/.mypy_cache/3.7/model.data.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

core/.mypy_cache/3.7/model.meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"data_mtime": 1589324546, "dep_lines": [16, 17, 18, 19, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 1, 1, 1, 1, 1, 1, 1, 273], "dep_prios": [10, 10, 10, 10, 20, 10, 10, 10, 10, 10, 10, 10, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 30, 30, 30, 30, 30, 30, 20], "dependencies": ["logging", "threading", "time", "urllib.request", "urllib", "sys", "os", "os.path", "shutil", "io", "json", "model_modules", "database", "dataset", "user", "encode", "hash", "utility", "typing", "api", "enum", "builtins", "_importlib_modulespec", "abc", "json.decoder", "model_modules.local_pandas", "model_modules.local_pandas.local_pandas", "types"], "hash": "d4849e0b168af209336fae718aa24be3", "id": "model", "ignore_all": false, "interface_hash": "7b12e2779bec9c72bc7d21f18fb5ce81", "mtime": 1589325241, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "normal", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "implicit_reexport": true, "local_partial_types": false, "mypyc": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_equality": false, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unreachable": false, "warn_unused_ignores": false}, "path": "model.py", "plugin_data": null, "size": 19147, "suppressed": ["MODEL"], "version_id": "0.761"}
1+
{"data_mtime": 1589401156, "dep_lines": [16, 17, 18, 19, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 1, 1, 1, 1, 1, 1, 1, 273], "dep_prios": [10, 10, 10, 10, 20, 10, 10, 10, 10, 10, 10, 10, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 30, 30, 30, 30, 30, 30, 20], "dependencies": ["logging", "threading", "time", "urllib.request", "urllib", "sys", "os", "os.path", "shutil", "io", "json", "model_modules", "database", "dataset", "user", "encode", "hash", "utility", "typing", "api", "enum", "builtins", "_importlib_modulespec", "abc", "json.decoder", "model_modules.local_pandas", "model_modules.local_pandas.local_pandas", "types"], "hash": "338dd25de6c9cc0e71bd12725a0024dd", "id": "model", "ignore_all": false, "interface_hash": "83f561c7d405c360ed6d80546bb11cd6", "mtime": 1589401599, "options": {"allow_redefinition": false, "allow_untyped_globals": false, "always_false": [], "always_true": [], "bazel": false, "check_untyped_defs": false, "disallow_any_decorated": false, "disallow_any_explicit": false, "disallow_any_expr": false, "disallow_any_generics": false, "disallow_any_unimported": false, "disallow_incomplete_defs": false, "disallow_subclassing_any": false, "disallow_untyped_calls": false, "disallow_untyped_decorators": false, "disallow_untyped_defs": false, "follow_imports": "normal", "follow_imports_for_stubs": false, "ignore_errors": false, "ignore_missing_imports": true, "implicit_reexport": true, "local_partial_types": false, "mypyc": false, "no_implicit_optional": false, "platform": "darwin", "plugins": [], "show_none_errors": true, "strict_equality": false, "strict_optional": true, "strict_optional_whitelist": null, "warn_no_return": true, "warn_return_any": false, "warn_unreachable": false, "warn_unused_ignores": false}, "path": "model.py", "plugin_data": null, "size": 19298, "suppressed": ["MODEL"], "version_id": "0.761"}

core/__pycache__/model.cpython-37.pyc

-30 Bytes
Binary file not shown.

core/model.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ class ModelReturnType(Enum):
6969
@description internal representation of a Model
7070
'''
7171
class Model():
72-
def __init__(self, metadata: dict, dataframe: CoreDataFrame):
72+
def __init__(self, metadata: dict, dataframe: CoreDataFrame = None):
7373
self.data: dict = metadata
7474
self.dataframe = dataframe
7575
pass
7676

7777
def run(self):
78-
store_model
78+
#
7979
pass
8080

8181

@@ -134,7 +134,7 @@ def execute(self):
134134
elif model_group_dataloader == ModelDataLoader.LOCAL_PANDAS_PARQUET.value:
135135
# TODO: parquet logic
136136
pass
137-
137+
138138
else:
139139

140140
unsupported_dataloader_error_message: str = "encountered unsupported data loader: "+str(model_group_key)
@@ -442,9 +442,11 @@ def verify_model_encodings(self):
442442
model_filename: str = str(component["filename"])
443443

444444
# cryptographically profile model
445-
model_description: dict = ModelDescription(self.model, component).data()
445+
#model_description: dict = ProfileModel(self.model, component).data()
446+
#model_profile: dict = ProfileModel(model_data["model_name"]).profile()
447+
model_profile: dict = ModelProfile(self.model, component).data()
446448

447-
if model_description["data_hash"].result == component["data_hash"]:
449+
if model_profile["data_hash"].result == component["data_hash"]:
448450
logging.info("verify_model_encodings, Model is VALID: " + str( model_data["model_name"] ) )
449451
logging.info("Valid Component: " + str(component["filename"]) )
450452

core/storage/model_sessions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
}
2626
]
2727
},
28-
"timestamp": "2020-05-12 23:47:49"
28+
"timestamp": "2020-05-13 16:31:01"
2929
}

0 commit comments

Comments
 (0)