code stringlengths 66 870k | docstring stringlengths 19 26.7k | func_name stringlengths 1 138 | language stringclasses 1
value | repo stringlengths 7 68 | path stringlengths 5 324 | url stringlengths 46 389 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
def make_instance(self, include_optional):
"""Test V1alpha1TrainedModel
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1alpha1_trained_model.V1alpha1TrainedModel() # ... | Test V1alpha1TrainedModel
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1alpha1_trained_model.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1alpha1_trained_model.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1alpha1TrainedModelList
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1alpha1_trained_model_list.V1alpha1TrainedMo... | Test V1alpha1TrainedModelList
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1alpha1_trained_model_list.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1alpha1_trained_model_list.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1alpha1TrainedModelSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1alpha1_trained_model_spec.V1alpha1TrainedMo... | Test V1alpha1TrainedModelSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1alpha1_trained_model_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1alpha1_trained_model_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ARTExplainerSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_art_explainer_spec.V1beta1ARTExplainer... | Test V1beta1ARTExplainerSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_art_explainer_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_art_explainer_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1AutoScalingSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_auto_scaling_spec.V1beta1AutoScalingSpe... | Test V1beta1AutoScalingSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_auto_scaling_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_auto_scaling_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1Batcher
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_batcher.V1beta1Batcher() # noqa: E501
... | Test V1beta1Batcher
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_batcher.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_batcher.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ComponentExtensionSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_component_extension_spec.V1beta1... | Test V1beta1ComponentExtensionSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_component_extension_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_component_extension_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ComponentStatusSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_component_status_spec.V1beta1Compon... | Test V1beta1ComponentStatusSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_component_status_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_component_status_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1CustomExplainer
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_custom_explainer.V1beta1CustomExplainer... | Test V1beta1CustomExplainer
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_custom_explainer.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_custom_explainer.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1CustomPredictor
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_custom_predictor.V1beta1CustomPredictor... | Test V1beta1CustomPredictor
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_custom_predictor.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_custom_predictor.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1CustomTransformer
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_custom_transformer.V1beta1CustomTrans... | Test V1beta1CustomTransformer
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_custom_transformer.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_custom_transformer.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1DeployConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_deploy_config.V1beta1DeployConfig() # noq... | Test V1beta1DeployConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_deploy_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_deploy_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ExplainersConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_explainers_config.V1beta1ExplainersCon... | Test V1beta1ExplainersConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_explainers_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_explainers_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ExplainerConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_explainer_config.V1beta1ExplainerConfig... | Test V1beta1ExplainerConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_explainer_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_explainer_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ExplainerExtensionSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_explainer_extension_spec.V1beta1... | Test V1beta1ExplainerExtensionSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_explainer_extension_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_explainer_extension_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ExplainerSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_explainer_spec.V1beta1ExplainerSpec() # ... | Test V1beta1ExplainerSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_explainer_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_explainer_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ExternalMetrics
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_external_metrics.V1beta1ExternalMetrics... | Test V1beta1ExternalMetrics
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_external_metrics.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_external_metrics.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ExternalMetricSource
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_external_metric_source.V1beta1Exte... | Test V1beta1ExternalMetricSource
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_external_metric_source.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_external_metric_source.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1FailureInfo
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_failure_info.V1beta1FailureInfo() # noqa: ... | Test V1beta1FailureInfo
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_failure_info.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_failure_info.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1HuggingFaceRuntimeSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_hugging_face_runtime_spec.V1beta... | Test V1beta1HuggingFaceRuntimeSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_hugging_face_runtime_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_hugging_face_runtime_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1InferenceService
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_inference_service.V1beta1InferenceServ... | Test V1beta1InferenceService
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_inference_service.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_inference_service.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1InferenceServicesConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_inference_services_config.V1bet... | Test V1beta1InferenceServicesConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_inference_services_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_inference_services_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1InferenceServiceList
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_inference_service_list.V1beta1Infe... | Test V1beta1InferenceServiceList
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_inference_service_list.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_inference_service_list.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1InferenceServiceSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_inference_service_spec.V1beta1Infe... | Test V1beta1InferenceServiceSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_inference_service_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_inference_service_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1InferenceServiceStatus
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_inference_service_status.V1beta1... | Test V1beta1InferenceServiceStatus
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_inference_service_status.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_inference_service_status.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1IngressConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_ingress_config.V1beta1IngressConfig() # ... | Test V1beta1IngressConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_ingress_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_ingress_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1KedaScaler
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_keda_scaler.V1beta1KedaScaler() # noqa: E50... | Test V1beta1KedaScaler
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_keda_scaler.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_keda_scaler.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1LightGBMSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_light_gbm_spec.V1beta1LightGBMSpec() # no... | Test V1beta1LightGBMSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_light_gbm_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_light_gbm_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1LocalModelConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_local_model_config.V1beta1LocalModelCo... | Test V1beta1LocalModelConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_local_model_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_local_model_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1LoggerSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_logger_spec.V1beta1LoggerSpec() # noqa: E50... | Test V1beta1LoggerSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_logger_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_logger_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1MetricsConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_metrics_config.V1beta1MetricsConfig() # ... | Test V1beta1MetricsConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_metrics_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_metrics_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1MetricsSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_metrics_spec.V1beta1MetricsSpec() # noqa: ... | Test V1beta1MetricsSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_metrics_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_metrics_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1MetricSource
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_metric_source.V1beta1MetricSource() # noq... | Test V1beta1MetricSource
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_metric_source.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_metric_source.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1MetricTarget
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_metric_target.V1beta1MetricTarget() # noq... | Test V1beta1MetricTarget
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_metric_target.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_metric_target.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ModelCopies
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_model_copies.V1beta1ModelCopies() # noqa: ... | Test V1beta1ModelCopies
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_model_copies.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_model_copies.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ModelFormat
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_model_format.V1beta1ModelFormat() # noqa: ... | Test V1beta1ModelFormat
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_model_format.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_model_format.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ModelRevisionStates
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_model_revision_states.V1beta1ModelR... | Test V1beta1ModelRevisionStates
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_model_revision_states.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_model_revision_states.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ModelSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_model_spec.V1beta1ModelSpec() # noqa: E501
... | Test V1beta1ModelSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_model_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_model_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ModelStatus
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_model_status.V1beta1ModelStatus() # noqa: ... | Test V1beta1ModelStatus
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_model_status.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_model_status.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1MultiNodeConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_multi_node_config.V1beta1MultiNodeConfi... | Test V1beta1MultiNodeConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_multi_node_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_multi_node_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ONNXRuntimeSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_onnx_runtime_spec.V1beta1ONNXRuntimeSpe... | Test V1beta1ONNXRuntimeSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_onnx_runtime_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_onnx_runtime_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1OtelCollectorConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_otel_collector_config.V1beta1OtelCo... | Test V1beta1OtelCollectorConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_otel_collector_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_otel_collector_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1PaddleServerSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_paddle_server_spec.V1beta1PaddleServer... | Test V1beta1PaddleServerSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_paddle_server_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_paddle_server_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1PMMLSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_pmml_spec.V1beta1PMMLSpec() # noqa: E501
... | Test V1beta1PMMLSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_pmml_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_pmml_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1PodMetrics
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_pod_metrics.V1beta1PodMetrics() # noqa: E50... | Test V1beta1PodMetrics
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_pod_metrics.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_pod_metrics.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1PodMetricSource
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_pod_metric_source.V1beta1PodMetricSourc... | Test V1beta1PodMetricSource
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_pod_metric_source.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_pod_metric_source.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1PodSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_pod_spec.V1beta1PodSpec() # noqa: E501
... | Test V1beta1PodSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_pod_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_pod_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1PredictorsConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_predictors_config.V1beta1PredictorsCon... | Test V1beta1PredictorsConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_predictors_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_predictors_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1PredictorConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_predictor_config.V1beta1PredictorConfig... | Test V1beta1PredictorConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_predictor_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_predictor_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1PredictorExtensionSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_predictor_extension_spec.V1beta1... | Test V1beta1PredictorExtensionSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_predictor_extension_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_predictor_extension_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1PredictorProtocols
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_predictor_protocols.V1beta1Predictor... | Test V1beta1PredictorProtocols
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_predictor_protocols.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_predictor_protocols.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1PredictorSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_predictor_spec.V1beta1PredictorSpec() # ... | Test V1beta1PredictorSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_predictor_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_predictor_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ResourceConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_resource_config.V1beta1ResourceConfig() ... | Test V1beta1ResourceConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_resource_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_resource_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ResourceMetricSource
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_resource_metric_source.V1beta1Reso... | Test V1beta1ResourceMetricSource
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_resource_metric_source.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_resource_metric_source.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ScalerSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_scaler_spec.V1beta1ScalerSpec() # noqa: E50... | Test V1beta1ScalerSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_scaler_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_scaler_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1SecurityConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_security_config.V1beta1SecurityConfig() ... | Test V1beta1SecurityConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_security_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_security_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1ServiceConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_service_config.V1beta1ServiceConfig() # ... | Test V1beta1ServiceConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_service_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_service_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1SKLearnSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_sk_learn_spec.V1beta1SKLearnSpec() # noqa:... | Test V1beta1SKLearnSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_sk_learn_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_sk_learn_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1StorageSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_storage_spec.V1beta1StorageSpec() # noqa: ... | Test V1beta1StorageSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_storage_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_storage_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1TFServingSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_tf_serving_spec.V1beta1TFServingSpec() #... | Test V1beta1TFServingSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_tf_serving_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_tf_serving_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1TorchServeSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_torch_serve_spec.V1beta1TorchServeSpec()... | Test V1beta1TorchServeSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_torch_serve_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_torch_serve_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1TransformersConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_transformers_config.V1beta1Transform... | Test V1beta1TransformersConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_transformers_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_transformers_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1TransformerConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_transformer_config.V1beta1Transformer... | Test V1beta1TransformerConfig
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_transformer_config.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_transformer_config.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1TransformerSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_transformer_spec.V1beta1TransformerSpec... | Test V1beta1TransformerSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_transformer_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_transformer_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1TritonSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_triton_spec.V1beta1TritonSpec() # noqa: E50... | Test V1beta1TritonSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_triton_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_triton_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1WorkerSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_worker_spec.V1beta1WorkerSpec() # noqa: E50... | Test V1beta1WorkerSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_worker_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_worker_spec.py | Apache-2.0 |
def make_instance(self, include_optional):
"""Test V1beta1XGBoostSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included"""
# model = kserve.models.v1beta1_xg_boost_spec.V1beta1XGBoostSpec() # noqa:... | Test V1beta1XGBoostSpec
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included | make_instance | python | kserve/kserve | python/kserve/test/test_v1beta1_xg_boost_spec.py | https://github.com/kserve/kserve/blob/master/python/kserve/test/test_v1beta1_xg_boost_spec.py | Apache-2.0 |
def configure_logging(log_config: Optional[Union[Dict, str]] = None):
"""
Configures Storage Initializer
This function should be called before loading the model / starting the model
server for consistent logging format.
:param log_config: (Optional) File path or dict containing log config. If not p... |
Configures Storage Initializer
This function should be called before loading the model / starting the model
server for consistent logging format.
:param log_config: (Optional) File path or dict containing log config. If not provided default configuration
will be used. If explici... | configure_logging | python | kserve/kserve | python/storage/kserve_storage/logging.py | https://github.com/kserve/kserve/blob/master/python/storage/kserve_storage/logging.py | Apache-2.0 |
def Ping(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!') | Missing associated documentation comment in .proto file. | Ping | python | kserve/kserve | test/e2e/common/inference_pb2_grpc.py | https://github.com/kserve/kserve/blob/master/test/e2e/common/inference_pb2_grpc.py | Apache-2.0 |
def Predictions(self, request, context):
"""Predictions entry point to get inference using default model version.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!') | Predictions entry point to get inference using default model version.
| Predictions | python | kserve/kserve | test/e2e/common/inference_pb2_grpc.py | https://github.com/kserve/kserve/blob/master/test/e2e/common/inference_pb2_grpc.py | Apache-2.0 |
def _get_openai_endpoint_and_host(
service_name, url_suffix, version=constants.KSERVE_V1BETA1_VERSION
):
"""
Get the OpenAI endpoint for the given service name.
Args:
service_name: The name of the inference service
url_suffix: The suffix for the OpenAI endpoint (e.g., "v1/chat/completion... |
Get the OpenAI endpoint for the given service name.
Args:
service_name: The name of the inference service
url_suffix: The suffix for the OpenAI endpoint (e.g., "v1/chat/completions")
version: The version of the inference service. Defaults to v1beta1
Returns:
A tuple containi... | _get_openai_endpoint_and_host | python | kserve/kserve | test/e2e/common/utils.py | https://github.com/kserve/kserve/blob/master/test/e2e/common/utils.py | Apache-2.0 |
def chat_completion_stream(
service_name,
input_json,
version=constants.KSERVE_V1BETA1_VERSION,
):
"""
Make a chat completion streaming request to the inference service and collect all chunks.
Returns a tuple containing full response text and all chunks received.
"""
res = _openai_reques... |
Make a chat completion streaming request to the inference service and collect all chunks.
Returns a tuple containing full response text and all chunks received.
| chat_completion_stream | python | kserve/kserve | test/e2e/common/utils.py | https://github.com/kserve/kserve/blob/master/test/e2e/common/utils.py | Apache-2.0 |
def completion_stream(
service_name,
input_json,
version=constants.KSERVE_V1BETA1_VERSION,
):
"""
Make a streaming request to the text completion inference service and collect all chunks.
Returns a tuple containing full response text and all chunks received.
"""
res = _openai_request(
... |
Make a streaming request to the text completion inference service and collect all chunks.
Returns a tuple containing full response text and all chunks received.
| completion_stream | python | kserve/kserve | test/e2e/common/utils.py | https://github.com/kserve/kserve/blob/master/test/e2e/common/utils.py | Apache-2.0 |
def check_sa_exists(service_account):
"""Check if the specified service account existing."""
sa_list = client.CoreV1Api().list_namespaced_service_account(
namespace=KSERVE_TEST_NAMESPACE
)
sa_name_list = []
for item in range(0, len(sa_list.items) - 1):
sa_name_list.append(sa_list.ite... | Check if the specified service account existing. | check_sa_exists | python | kserve/kserve | test/e2e/credentials/test_set_creds.py | https://github.com/kserve/kserve/blob/master/test/e2e/credentials/test_set_creds.py | Apache-2.0 |
async def test_ig_scenario1(rest_v1_client):
"""
Scenario: Sequence graph with 2 steps that are both soft dependencies.
success_isvc(soft) -> error_isvc (soft)
We are not marking steps as soft or hard explicitly so this will test that default behavior of steps being soft
is as expected.
Expect... |
Scenario: Sequence graph with 2 steps that are both soft dependencies.
success_isvc(soft) -> error_isvc (soft)
We are not marking steps as soft or hard explicitly so this will test that default behavior of steps being soft
is as expected.
Expectation: IG will return response of error_isvc and pre... | test_ig_scenario1 | python | kserve/kserve | test/e2e/graph/test_inference_graph.py | https://github.com/kserve/kserve/blob/master/test/e2e/graph/test_inference_graph.py | Apache-2.0 |
async def test_ig_scenario2(rest_v1_client):
"""
Scenario: Sequence graph with 2 steps that are both soft dependencies.
error_isvc (soft) -> success_isvc(soft)
Expectation: IG will return response of success_isvc and predict_ig will not raise any exception
:return:
"""
logger.info("Star... |
Scenario: Sequence graph with 2 steps that are both soft dependencies.
error_isvc (soft) -> success_isvc(soft)
Expectation: IG will return response of success_isvc and predict_ig will not raise any exception
:return:
| test_ig_scenario2 | python | kserve/kserve | test/e2e/graph/test_inference_graph.py | https://github.com/kserve/kserve/blob/master/test/e2e/graph/test_inference_graph.py | Apache-2.0 |
async def test_ig_scenario3(rest_v1_client):
"""
Scenario: Sequence graph with 2 steps - first is hard (and returns non-200) and second is soft dependency.
error_isvc(hard) -> success_isvc (soft)
Expectation: IG will return response of error_isvc and predict_ig will raise exception
"""
logger... |
Scenario: Sequence graph with 2 steps - first is hard (and returns non-200) and second is soft dependency.
error_isvc(hard) -> success_isvc (soft)
Expectation: IG will return response of error_isvc and predict_ig will raise exception
| test_ig_scenario3 | python | kserve/kserve | test/e2e/graph/test_inference_graph.py | https://github.com/kserve/kserve/blob/master/test/e2e/graph/test_inference_graph.py | Apache-2.0 |
async def test_ig_scenario4(rest_v1_client):
"""
Scenario: Switch graph with 1 step as hard dependency and other one as soft dependency.
Will be testing 3 cases in this test case:
Expectation:
Case 1. IG will return response of error_isvc when condition for that step matches
Case 2. IG will retu... |
Scenario: Switch graph with 1 step as hard dependency and other one as soft dependency.
Will be testing 3 cases in this test case:
Expectation:
Case 1. IG will return response of error_isvc when condition for that step matches
Case 2. IG will return response of success_isvc when condition for that ... | test_ig_scenario4 | python | kserve/kserve | test/e2e/graph/test_inference_graph.py | https://github.com/kserve/kserve/blob/master/test/e2e/graph/test_inference_graph.py | Apache-2.0 |
async def test_ig_scenario5(rest_v1_client):
"""
Scenario: Switch graph where a match would happen for error node and then error would return but IG will continue
execution and call the next step in the flow as error step will be a soft dependency.
Expectation: IG will return response of success_isvc.
... |
Scenario: Switch graph where a match would happen for error node and then error would return but IG will continue
execution and call the next step in the flow as error step will be a soft dependency.
Expectation: IG will return response of success_isvc.
| test_ig_scenario5 | python | kserve/kserve | test/e2e/graph/test_inference_graph.py | https://github.com/kserve/kserve/blob/master/test/e2e/graph/test_inference_graph.py | Apache-2.0 |
async def test_ig_scenario6(rest_v1_client):
"""
Scenario: Switch graph where a match would happen for error node and then error would return and IG will NOT
continue execution and call the next step in the flow as error step will be a HARD dependency.
Expectation: IG will return response of success_isv... |
Scenario: Switch graph where a match would happen for error node and then error would return and IG will NOT
continue execution and call the next step in the flow as error step will be a HARD dependency.
Expectation: IG will return response of success_isvc.
| test_ig_scenario6 | python | kserve/kserve | test/e2e/graph/test_inference_graph.py | https://github.com/kserve/kserve/blob/master/test/e2e/graph/test_inference_graph.py | Apache-2.0 |
async def test_ig_scenario7(rest_v1_client):
"""
Scenario: Ensemble graph with 2 steps, where both the steps are soft deps.
Expectation: IG will return combined response of both the steps.
"""
logger.info("Starting test test_ig_scenario7")
suffix = str(uuid.uuid4())[1:6]
success_isvc_name, ... |
Scenario: Ensemble graph with 2 steps, where both the steps are soft deps.
Expectation: IG will return combined response of both the steps.
| test_ig_scenario7 | python | kserve/kserve | test/e2e/graph/test_inference_graph.py | https://github.com/kserve/kserve/blob/master/test/e2e/graph/test_inference_graph.py | Apache-2.0 |
async def test_ig_scenario8(rest_v1_client):
"""
Scenario: Ensemble graph with 3 steps, where 2 steps are soft and 1 step is hard and returns non-200
Expectation: Since HARD step will return non-200, so IG will return that step's output as IG's output
"""
logger.info("Starting test test_ig_scenario... |
Scenario: Ensemble graph with 3 steps, where 2 steps are soft and 1 step is hard and returns non-200
Expectation: Since HARD step will return non-200, so IG will return that step's output as IG's output
| test_ig_scenario8 | python | kserve/kserve | test/e2e/graph/test_inference_graph.py | https://github.com/kserve/kserve/blob/master/test/e2e/graph/test_inference_graph.py | Apache-2.0 |
async def test_ig_scenario9(rest_v1_client):
"""
Scenario: Splitter graph where a match would happen for error node and then error would return but IG will continue
execution and call the next step in the flow as error step will be a soft dependency.
Expectation: IG will return response of success_isvc.... |
Scenario: Splitter graph where a match would happen for error node and then error would return but IG will continue
execution and call the next step in the flow as error step will be a soft dependency.
Expectation: IG will return response of success_isvc.
| test_ig_scenario9 | python | kserve/kserve | test/e2e/graph/test_inference_graph.py | https://github.com/kserve/kserve/blob/master/test/e2e/graph/test_inference_graph.py | Apache-2.0 |
async def test_ig_scenario10(rest_v1_client):
"""
Scenario: Splitter graph where a match would happen for error node and then error would return and IG will NOT
continue execution and call the next step in the flow as error step will be a HARD dependency.
Expectation: IG will return response of success_... |
Scenario: Splitter graph where a match would happen for error node and then error would return and IG will NOT
continue execution and call the next step in the flow as error step will be a HARD dependency.
Expectation: IG will return response of success_isvc.
| test_ig_scenario10 | python | kserve/kserve | test/e2e/graph/test_inference_graph.py | https://github.com/kserve/kserve/blob/master/test/e2e/graph/test_inference_graph.py | Apache-2.0 |
async def test_sklearn_keda_scale_resource_memory(rest_v1_client, network_layer):
"""
Test KEDA autoscaling with new InferenceService (auto_scaling) spec
"""
service_name = "isvc-sklearn-keda-scale-new-spec"
predictor = V1beta1PredictorSpec(
min_replicas=1,
max_replicas=5,
au... |
Test KEDA autoscaling with new InferenceService (auto_scaling) spec
| test_sklearn_keda_scale_resource_memory | python | kserve/kserve | test/e2e/predictor/test_autoscaling.py | https://github.com/kserve/kserve/blob/master/test/e2e/predictor/test_autoscaling.py | Apache-2.0 |
async def test_sklearn_keda_scale_new_spec_external(rest_v1_client, network_layer):
"""
Test KEDA autoscaling with new InferenceService (auto_scaling) spec
"""
service_name = "isvc-sklearn-keda-scale-new-spec-2"
predictor = V1beta1PredictorSpec(
min_replicas=1,
max_replicas=5,
... |
Test KEDA autoscaling with new InferenceService (auto_scaling) spec
| test_sklearn_keda_scale_new_spec_external | python | kserve/kserve | test/e2e/predictor/test_autoscaling.py | https://github.com/kserve/kserve/blob/master/test/e2e/predictor/test_autoscaling.py | Apache-2.0 |
async def test_scaling_sklearn_with_keda_otel_add_on(rest_v1_client, network_layer):
"""
Test KEDA-Otel-Add-On autoscaling with InferenceService (auto_scaling) spec
"""
service_name = "isvc-sklearn-keda-otel-add-on"
predictor = V1beta1PredictorSpec(
min_replicas=1,
max_replicas=5,
... |
Test KEDA-Otel-Add-On autoscaling with InferenceService (auto_scaling) spec
| test_scaling_sklearn_with_keda_otel_add_on | python | kserve/kserve | test/e2e/predictor/test_autoscaling.py | https://github.com/kserve/kserve/blob/master/test/e2e/predictor/test_autoscaling.py | Apache-2.0 |
def get_test_packages():
"""Returns list of packages needed when testing."""
test_packages = [
'mock >= 2.0.0',
'opencv-python >= 3.4.1.15',
'pybullet',
'scipy >= 1.1.0',
]
return test_packages | Returns list of packages needed when testing. | get_test_packages | python | tensorflow/agents | setup.py | https://github.com/tensorflow/agents/blob/master/setup.py | Apache-2.0 |
def get_reverb_packages():
"""Returns list of required packages if using reverb."""
reverb_packages = []
if FLAGS.release:
tf_version = TENSORFLOW_VERSION
reverb_version = REVERB_VERSION
rlds_version = RLDS_VERSION
else:
tf_version = TENSORFLOW_NIGHTLY
reverb_version = REVERB_NIGHTLY
rld... | Returns list of required packages if using reverb. | get_reverb_packages | python | tensorflow/agents | setup.py | https://github.com/tensorflow/agents/blob/master/setup.py | Apache-2.0 |
def get_version():
"""Returns the version and project name to associate with the build."""
__dev_version__ = tf_agents_version.__dev_version__ # pylint: disable=invalid-name
__rel_version__ = tf_agents_version.__rel_version__ # pylint: disable=invalid-name
if FLAGS.release:
version = __rel_version__
... | Returns the version and project name to associate with the build. | get_version | python | tensorflow/agents | setup.py | https://github.com/tensorflow/agents/blob/master/setup.py | Apache-2.0 |
def run_setup():
"""Triggers build, install, and other features of `setuptools.setup`."""
# Builds the long description from the README.
root_path = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(root_path, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
versi... | Triggers build, install, and other features of `setuptools.setup`. | run_setup | python | tensorflow/agents | setup.py | https://github.com/tensorflow/agents/blob/master/setup.py | Apache-2.0 |
def SetDisplayFromWebTest():
"""Set up display from web test.
Colab test sets up display using xvfb for front end web test suite. We just
ensure that DISPLAY environment variable is properly set for colab kernel
(backend) which can be used for open gym environment rendering.
"""
res = WaitForFilePath("/tm... | Set up display from web test.
Colab test sets up display using xvfb for front end web test suite. We just
ensure that DISPLAY environment variable is properly set for colab kernel
(backend) which can be used for open gym environment rendering.
| SetDisplayFromWebTest | python | tensorflow/agents | docs/tutorials/colab_kernel_init.py | https://github.com/tensorflow/agents/blob/master/docs/tutorials/colab_kernel_init.py | Apache-2.0 |
def _ensure_tf_install(): # pylint: disable=g-statement-before-imports
"""Attempt to import tensorflow, and ensure its version is sufficient.
Raises:
ImportError: if either tensorflow is not importable or its version is
inadequate.
"""
try:
import tensorflow as tf
except (ImportError, ModuleNotF... | Attempt to import tensorflow, and ensure its version is sufficient.
Raises:
ImportError: if either tensorflow is not importable or its version is
inadequate.
| _ensure_tf_install | python | tensorflow/agents | tf_agents/__init__.py | https://github.com/tensorflow/agents/blob/master/tf_agents/__init__.py | Apache-2.0 |
def _is_transition_like(value):
"""Helper to identify values that are transition like."""
if isinstance(value, trajectory.Transition):
return True
fields = getattr(value, '_fields', None)
if fields and trajectory.Transition._fields == fields:
return True
return False | Helper to identify values that are transition like. | _is_transition_like | python | tensorflow/agents | tf_agents/agents/data_converter.py | https://github.com/tensorflow/agents/blob/master/tf_agents/agents/data_converter.py | Apache-2.0 |
def _is_trajectory_like(value):
"""Helper to identify values that are trajectory like."""
if isinstance(value, trajectory.Trajectory):
return True
fields = getattr(value, '_fields', None)
if fields and trajectory.Trajectory._fields == fields:
return True
return False | Helper to identify values that are trajectory like. | _is_trajectory_like | python | tensorflow/agents | tf_agents/agents/data_converter.py | https://github.com/tensorflow/agents/blob/master/tf_agents/agents/data_converter.py | Apache-2.0 |
def _as_tfa_transition(value: typing.Tuple[typing.Any, typing.Any, typing.Any]):
"""Makes sure the transition and its values are TFA types."""
time_step, action_step, next_time_step = value
time_step = ts.TimeStep(*time_step)
action_step = policy_step.PolicyStep(*action_step)
next_time_step = ts.TimeStep(*nex... | Makes sure the transition and its values are TFA types. | _as_tfa_transition | python | tensorflow/agents | tf_agents/agents/data_converter.py | https://github.com/tensorflow/agents/blob/master/tf_agents/agents/data_converter.py | Apache-2.0 |
def _validate_trajectory(
value: trajectory.Trajectory,
trajectory_spec: trajectory.Trajectory,
sequence_length: typing.Optional[int],
num_outer_dims: te.Literal[1, 2] = 2, # pylint: disable=bad-whitespace
):
"""Validate a Trajectory given its spec and a sequence length."""
if not nest_utils.is_bat... | Validate a Trajectory given its spec and a sequence length. | _validate_trajectory | python | tensorflow/agents | tf_agents/agents/data_converter.py | https://github.com/tensorflow/agents/blob/master/tf_agents/agents/data_converter.py | Apache-2.0 |
def _validate_transition(
value: trajectory.Transition,
transition_spec: trajectory.Transition,
num_outer_dims: int,
):
"""Checks the given Transition for batch and time outer dimensions."""
if value.action_step.state:
# When state is not (), it does not have time dimension, therefore it needs
... | Checks the given Transition for batch and time outer dimensions. | _validate_transition | python | tensorflow/agents | tf_agents/agents/data_converter.py | https://github.com/tensorflow/agents/blob/master/tf_agents/agents/data_converter.py | Apache-2.0 |
def __init__(
self,
data_context: DataContext,
sequence_length: typing.Optional[int] = None,
num_outer_dims: te.Literal[1, 2] = 2, # pylint: disable=bad-whitespace
):
"""Create the AsTrajectory converter.
Args:
data_context: An instance of `DataContext`, typically accessed from... | Create the AsTrajectory converter.
Args:
data_context: An instance of `DataContext`, typically accessed from the
`TFAgent.data_context` property.
sequence_length: The required time dimension value (if any), typically
determined by the subclass of `TFAgent`.
num_outer_dims: Expecte... | __init__ | python | tensorflow/agents | tf_agents/agents/data_converter.py | https://github.com/tensorflow/agents/blob/master/tf_agents/agents/data_converter.py | Apache-2.0 |
def __call__(self, value: typing.Any) -> trajectory.Trajectory:
"""Convers `value` to a Trajectory. Performs data validation and pruning.
- If `value` is already a `Trajectory`, only validation is performed.
- If `value` is a `Transition` with tensors containing two (`[B, T]`)
outer dims, then it is ... | Convers `value` to a Trajectory. Performs data validation and pruning.
- If `value` is already a `Trajectory`, only validation is performed.
- If `value` is a `Transition` with tensors containing two (`[B, T]`)
outer dims, then it is simply repackaged to a `Trajectory` and then
validated.
- If ... | __call__ | python | tensorflow/agents | tf_agents/agents/data_converter.py | https://github.com/tensorflow/agents/blob/master/tf_agents/agents/data_converter.py | Apache-2.0 |
Subsets and Splits
Django Code with Docstrings
Filters Python code examples from Django repository that contain Django-related code, helping identify relevant code snippets for understanding Django framework usage patterns.
SQL Console for Shuu12121/python-treesitter-filtered-datasetsV2
Retrieves specific code examples from the Flask repository but doesn't provide meaningful analysis or patterns beyond basic data retrieval.
HTTPX Repo Code and Docstrings
Retrieves specific code examples from the httpx repository, which is useful for understanding how particular libraries are used but doesn't provide broader analytical insights about the dataset.
Requests Repo Docstrings & Code
Retrieves code examples with their docstrings and file paths from the requests repository, providing basic filtering but limited analytical value beyond finding specific code samples.
Quart Repo Docstrings & Code
Retrieves code examples with their docstrings from the Quart repository, providing basic code samples but offering limited analytical value for understanding broader patterns or relationships in the dataset.