-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor ModelBuilderBase.calculate_cache_key(). securityContext for …
…Workflow (#1245) * securityContext for Workflow * Black reformating * Fix RuntimeError in pydantic * Fix test_workflow_generator.py tests * test_security_context * Black reformating * _parse_version() -> parse_version() * ModelBuilder.gordo_version * gordo/serializer/utils.py * gordo/serializer/utils.py * Black reformating * test_validate_locate * black reformating * Additional test in test_import_locate * --model-builder-class * Fix tests/gordo/test_version.py * Black reformating * Fix tests * Refactor MlFlowReporter * Black reformating * add gordo/builder/utils.py * --model-builder-class gordo workflow * Fix test_build_exit_code() * Fix test_build_exit_code() second attempt * Container securityContext * Fixing test_security_context * Black reformating * --pod-security-context * Black reformating
- Loading branch information
Showing
14 changed files
with
389 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from typing import Optional, Type | ||
|
||
from gordo.serializer.utils import validate_locate, import_locate | ||
|
||
from .build_model import ModelBuilder | ||
|
||
|
||
def create_model_builder(model_builder_class: Optional[str]) -> Type[ModelBuilder]: | ||
if model_builder_class is None: | ||
return ModelBuilder | ||
validate_locate(model_builder_class) | ||
cls = import_locate(model_builder_class) | ||
if issubclass(cls, ModelBuilder): | ||
raise ValueError('"%s" class should be subclass of "%s"') | ||
return cls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.