AI Slop Code Risk Monitor

bentoml/BentoML

SlopCodeMonitor badge for bentoml/BentoML Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).
24.0 Elevated pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for bentoml/BentoML. SynthScan examined 96,805 lines of code across 545 source files, recording 1592 pattern matches distributed across 19 syntactic categories. The legacy adjusted pattern signal is 24.0 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

24.0
Adjusted Signal
24.0
Raw Pattern Score
100%
Time Factor
—
Last Push
—
Stars
—
Language
96.8K
Lines of Code
545
Files
1.6K
Pattern Hits
2026-10-31
Scan Date
0.23
HC Hit Rate

Risk Review · Payload v1

Use each vector to guide manual verification of the underlying findings.

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 31.5/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 600 finding(s).

Hallucinated Dependency & Supply Chain Risk 30.1/100 · MEDIUM

Are imports declared and package/API names verified? 581 finding(s).

Agent Over-Engineering Ratio 48.2/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 776 finding(s).

PR Review Velocity Impact 71.7/100 · HIGH

Which changes need focused human review? 1592 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 2HIGH 126MEDIUM 101LOW 1363

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 1592 distinct pattern matches across 19 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Unused Imports554 hits · 542 pts
SeverityFileLineSnippetContext
LOWtools/generate_coverage.py2CODE
LOWtools/write_report.py3CODE
LOWtests/test_cli_regression.py1CODE
LOWtests/unit/test_utils.py1CODE
LOWtests/unit/conftest.py2CODE
LOWtests/unit/test_metrics_deferred_import.py12CODE
LOWtests/unit/test_metrics_deferred_import.py53CODE
LOWtests/unit/test_models.py18CODE
LOWtests/unit/bentoml_cli/test_env_manager.py1CODE
LOWtests/unit/_internal/test_service_api.py4CODE
LOWtests/unit/_internal/test_store.py1CODE
LOWtests/unit/_internal/test_exportable.py1CODE
LOWtests/unit/_internal/configuration/conftest.py1CODE
LOWtests/unit/_internal/configuration/test_v1_migration.py1CODE
LOWtests/unit/_internal/configuration/test_containers.py1CODE
LOWtests/unit/_internal/configuration/test_helpers.py1CODE
LOWtests/unit/_internal/runner/test_strategy.py1CODE
LOWtests/unit/_internal/runner/test_container.py1CODE
LOWtests/unit/_internal/io/test_image.py1CODE
LOWtests/unit/_internal/io/test_text.py1CODE
LOWtests/unit/_internal/io/test_file.py1CODE
LOWtests/unit/_internal/io/test_custom.py1CODE
LOWtests/unit/_internal/io/test_multipart.py1CODE
LOWtests/unit/_internal/io/test_json.py1CODE
LOWtests/unit/_internal/io/test_base.py1CODE
LOWtests/unit/_internal/io/test_numpy.py2CODE
LOWtests/unit/_internal/utils/test_metrics.py1CODE
LOWtests/unit/_internal/utils/test_pickle.py1CODE
LOWtests/unit/_internal/utils/test_analytics.py2CODE
LOW…s/unit/_internal/utils/circus/test_watchfilesplugin.py1CODE
LOWtests/unit/_internal/models/test_model.py1CODE
LOWtests/unit/_internal/models/test_model.py24CODE
LOWtests/unit/_internal/container/test_generate.py1CODE
LOWtests/unit/_internal/container/test_cuda_version.py1CODE
LOWtests/unit/_internal/cloud/test_deployment.py1CODE
LOW…sts/unit/_internal/bento/test_service_serialization.py1CODE
LOWtests/unit/_internal/bento/test_src_layout.py1CODE
LOWtests/unit/_internal/bento/test_bento.py2CODE
LOWtests/unit/grpc/conftest.py1CODE
LOWtests/unit/grpc/test_grpc_utils.py1CODE
LOWtests/unit/grpc/interceptors/test_prometheus.py1CODE
LOWtests/unit/grpc/interceptors/test_access.py2CODE
LOWtests/unit/_bentoml_sdk/test_images.py1CODE
LOWtests/unit/_bentoml_sdk/test_validators.py1CODE
LOWtests/integration/frameworks/test_diffusers_unit.py1CODE
LOWtests/integration/frameworks/test_transformers_unit.py1CODE
LOWtests/integration/frameworks/conftest.py1CODE
LOWtests/integration/frameworks/test_frameworks.py1CODE
LOWtests/integration/frameworks/test_tensorflow_unit.py1CODE
LOWtests/integration/frameworks/test_pytorch_unit.py1CODE
LOWtests/integration/frameworks/test_fastai_unit.py1CODE
LOWtests/integration/frameworks/mlflow/test_apis.py1CODE
LOWtests/integration/frameworks/models/lightgbm.py1CODE
LOWtests/integration/frameworks/models/transformers.py1CODE
LOWtests/integration/frameworks/models/transformers.py32CODE
LOWtests/integration/frameworks/models/fastai.py1CODE
LOWtests/integration/frameworks/models/keras.py1CODE
LOWtests/integration/frameworks/models/catboost.py1CODE
LOWtests/integration/frameworks/models/easyocr.py1CODE
LOWtests/integration/frameworks/models/onnx.py1CODE
494 more matches not shown…
Hyper-Verbose Identifiers299 hits · 309 pts
SeverityFileLineSnippetContext
LOWnoxfile.py59def run_framework_integration_test(session: nox.Session, framework: str):CODE
LOWtests/test_readiness_memory_leak_fix.py35 async def test_is_ready_closes_response_on_success(self):CODE
LOWtests/test_readiness_memory_leak_fix.py61 async def test_is_ready_closes_response_on_failure(self):CODE
LOWtests/test_readiness_memory_leak_fix.py87 async def test_is_ready_handles_timeout_without_response(self):CODE
LOWtests/test_readiness_memory_leak_fix.py111 def test_dependency_get_caches_resolved_value(self):CODE
LOWtests/test_readiness_memory_leak_fix.py140 def test_dependency_get_caches_across_multiple_dependencies(self):CODE
LOWtests/test_readiness_memory_leak_fix.py174 async def test_dependency_close_clears_resolved(self):CODE
LOWtests/test_readiness_memory_leak_fix.py194 async def test_dependency_close_handles_none_resolved(self):CODE
LOWtests/test_readiness_memory_leak_fix.py206 async def test_dependency_close_skips_non_async_close(self):CODE
LOWtests/test_readiness_memory_leak_fix.py224 async def test_repeated_readiness_checks_use_cache(self):CODE
LOWtests/test_readiness_memory_leak_fix.py256 async def test_cleanup_cycle_memory_pattern(self):CODE
LOWtests/unit/test_metrics_deferred_import.py20def _fresh_bentoml_metrics_module():CODE
LOWtests/unit/test_metrics_deferred_import.py40def test_bentoml_metrics_does_not_import_prometheus_client_eagerly():CODE
LOWtests/unit/test_metrics_deferred_import.py62def test_multiple_histograms_all_collected_in_multiprocess_mode():CODE
LOWtests/unit/_internal/test_service_api.py52def test_get_valid_service_name(caplog: LogCaptureFixture):CODE
LOWtests/unit/_internal/test_exportable.py98def test_from_fs_imports_safe_nested_archive(tmp_path: Path, archive_kind: str) -> None:CODE
LOWtests/unit/_internal/test_exportable.py126def test_from_fs_preserves_safe_tar_symlink(tmp_path: Path) -> None:CODE
LOWtests/unit/_internal/test_exportable.py164def test_from_fs_rejects_unsafe_member_paths(CODE
LOWtests/unit/_internal/test_exportable.py215def test_from_fs_rejects_unsafe_tar_symlink_targets(CODE
LOWtests/unit/_internal/test_exportable.py232def test_path_validator_rejects_nul_bytes() -> None:CODE
LOWtests/unit/_internal/test_exportable.py239def test_from_fs_rejects_zip_symlink_entries(tmp_path: Path) -> None:CODE
LOWtests/unit/_internal/test_exportable.py254def test_from_fs_rejects_tar_hardlinks(tmp_path: Path) -> None:CODE
LOWtests/unit/_internal/test_exportable.py269def test_from_fs_rejects_tar_special_entries(tmp_path: Path) -> None:CODE
LOWtests/unit/_internal/test_exportable.py284def test_from_fs_rejects_duplicate_file_destinations(tmp_path: Path) -> None:CODE
LOWtests/unit/_internal/test_exportable.py299def test_from_fs_rejects_duplicate_file_symlink_destinations(tmp_path: Path) -> None:CODE
LOWtests/unit/_internal/test_exportable.py314def test_from_fs_allows_repeated_directory_entries(tmp_path: Path) -> None:CODE
LOWtests/unit/_internal/test_exportable.py330def test_from_fs_cleans_up_after_validation_failure(CODE
LOWtests/unit/_internal/test_exportable.py355def test_from_fs_cleans_up_after_from_path_failure(CODE
LOWtests/unit/_internal/test_exportable.py374def test_from_fs_imports_fsspec_directory_source(tmp_path: Path) -> None:CODE
LOWtests/unit/_internal/test_exportable.py391def test_import_model_rejects_otherwise_valid_archive_with_traversal(CODE
LOWtests/unit/_internal/test_exportable.py417def test_import_bento_rejects_otherwise_valid_archive_with_traversal(CODE
LOWtests/unit/_internal/configuration/conftest.py17def fixture_container_from_file(tmp_path: Path) -> t.Callable[[str], ConfigDictType]:CODE
LOWtests/unit/_internal/configuration/conftest.py27def fixture_container_from_envvar():CODE
LOWtests/unit/_internal/configuration/test_v1_migration.py17def test_backward_configuration(CODE
LOWtests/unit/_internal/configuration/test_v1_migration.py41def test_backward_from_envvar(STRING
LOWtests/unit/_internal/configuration/test_containers.py15def test_validate_configuration(container_from_file: t.Callable[[str], ConfigDictType]):CODE
LOWtests/unit/_internal/configuration/test_containers.py38def test_containers_from_envvar(STRING
LOWtests/unit/_internal/configuration/test_containers.py49def test_bentoml_configuration_runner_override(STRING
LOWtests/unit/_internal/configuration/test_containers.py119def test_runner_gpu_configuration(STRING
LOWtests/unit/_internal/configuration/test_containers.py166def test_expand_env_vars_in_values(container_from_file, monkeypatch):STRING
LOW⚡tests/unit/_internal/configuration/test_helpers.py35def test_rename_fields_field_in_dict():CODE
LOW⚡tests/unit/_internal/configuration/test_helpers.py45def test_rename_fields_field_not_in_dict():CODE
LOW⚡tests/unit/_internal/configuration/test_helpers.py55def test_rename_fields_remove_only():CODE
LOW⚡tests/unit/_internal/configuration/test_helpers.py64def test_rename_fields_check_log(caplog: LogCaptureFixture):CODE
LOWtests/unit/_internal/configuration/test_helpers.py75def test_rename_fields_check_log_remove_only(caplog: LogCaptureFixture):CODE
LOWtests/unit/_internal/configuration/test_helpers.py83def test_rename_fields_exception():CODE
LOWtests/unit/_internal/configuration/test_helpers.py103def test_valid_load_config_file(tmp_path: Path):CODE
LOWtests/unit/_internal/configuration/test_helpers.py109def test_invalid_load_config_file():CODE
LOWtests/unit/_internal/configuration/test_helpers.py140def test_expand_env_in_values(monkeypatch: pytest.MonkeyPatch):CODE
LOW…s/unit/_internal/service_loader/test_import_service.py8def test_load_by_service_file():CODE
LOW…s/unit/_internal/service_loader/test_import_service.py38def test_load_multi_service_module():CODE
LOW…s/unit/_internal/service_loader/test_service_loader.py11def test_load_service_from_directory():CODE
LOW…s/unit/_internal/service_loader/test_service_loader.py20def test_load_service_from_bento():CODE
LOWtests/unit/_internal/runner/test_strategy.py34def test_default_gpu_strategy(monkeypatch: MonkeyPatch):CODE
LOWtests/unit/_internal/runner/test_strategy.py127def test_default_cpu_strategy(monkeypatch: MonkeyPatch):CODE
LOW⚡tests/unit/_internal/runner/test_runner.py33def test_valid_runner_tag_with_dash():CODE
LOW⚡tests/unit/_internal/runner/test_runner.py38def test_valid_runner_tag_with_underscore():CODE
LOW⚡tests/unit/_internal/runner/test_runner.py43def test_valid_runner_tag_with_dot():CODE
LOW⚡tests/unit/_internal/runner/test_runner.py48def test_valid_runner_short_tag():CODE
LOW⚡tests/unit/_internal/runner/test_runner.py53def test_valid_runner_long_tag():CODE
239 more matches not shown…
Decorative Section Separators87 hits · 261 pts
SeverityFileLineSnippetContext
MEDIUM.devcontainer/library-scripts/docker-debian.sh2#-------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM.devcontainer/library-scripts/docker-debian.sh5#-------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM.devcontainer/library-scripts/docker-debian.sh297#-------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM.devcontainer/library-scripts/docker-debian.sh300#-------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM.devcontainer/library-scripts/common-debian.sh2#-------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM.devcontainer/library-scripts/common-debian.sh5#-------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMskills/bentoml-k8s-deploy/templates/deployment.yaml1# =============================================================================COMMENT
MEDIUMskills/bentoml-k8s-deploy/templates/deployment.yaml35# =============================================================================COMMENT
MEDIUMskills/bentoml-k8s-deploy/templates/ingress.yaml1# =============================================================================COMMENT
MEDIUMskills/bentoml-k8s-deploy/templates/ingress.yaml16# =============================================================================COMMENT
MEDIUMskills/bentoml-k8s-deploy/templates/service.yaml1# =============================================================================COMMENT
MEDIUMskills/bentoml-k8s-deploy/templates/service.yaml24# =============================================================================COMMENT
MEDIUMskills/bentoml-k8s-deploy/templates/hpa.yaml1# =============================================================================COMMENT
MEDIUMskills/bentoml-k8s-deploy/templates/hpa.yaml23# =============================================================================COMMENT
MEDIUMskills/bentoml-k8s-deploy/templates/hpa.yaml47 # ---------------------------------------------------------------------------COMMENT
MEDIUMskills/bentoml-k8s-deploy/templates/hpa.yaml54 # ---------------------------------------------------------------------------COMMENT
MEDIUMskills/bentoml-k8s-deploy/templates/hpa.yaml65 # ---------------------------------------------------------------------------COMMENT
MEDIUMskills/bentoml-k8s-deploy/templates/hpa.yaml109 # ---------------------------------------------------------------------------COMMENT
MEDIUMskills/bentoml-k8s-deploy/templates/config.yml1# =============================================================================COMMENT
MEDIUMskills/bentoml-k8s-deploy/templates/config.yml21# -----------------------------------------------------------------------------COMMENT
MEDIUMskills/bentoml-k8s-deploy/templates/config.yml53# =============================================================================COMMENT
MEDIUM…ls/bentoml-deploy-scriptgen/templates/deploy/deploy.py231# --------------------------------------------------------------------------COMMENT
MEDIUM…ls/bentoml-deploy-scriptgen/templates/deploy/deploy.py233# --------------------------------------------------------------------------COMMENT
MEDIUM…ls/bentoml-deploy-scriptgen/templates/deploy/deploy.py364# --------------------------------------------------------------------------COMMENT
MEDIUM…ls/bentoml-deploy-scriptgen/templates/deploy/deploy.py366# --------------------------------------------------------------------------COMMENT
MEDIUM…ls/bentoml-deploy-scriptgen/templates/deploy/deploy.py437# --------------------------------------------------------------------------COMMENT
MEDIUM…ls/bentoml-deploy-scriptgen/templates/deploy/deploy.py439# --------------------------------------------------------------------------COMMENT
MEDIUM…s/bentoml-deploy-scriptgen/templates/deploy/config.yml1# =============================================================================COMMENT
MEDIUM…s/bentoml-deploy-scriptgen/templates/deploy/config.yml46# =============================================================================COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/config.py363# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/config.py365# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/config.py488# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/config.py490# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/config.py563# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/config.py565# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/config.py1085# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/config.py1087# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/config.py1259# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/config.py1261# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/config.py1408# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/config.py1410# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/config.py1632# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/config.py1634# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/render.py120# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/render.py123# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/render.py192# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/render.py194# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/render.py263# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/render.py265# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/render.py541# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/render.py543# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/common.py179# --------------------------------------------------------------------------COMMENT
MEDIUM…-deploy-scriptgen/templates/deploy/_internal/common.py181# --------------------------------------------------------------------------COMMENT
MEDIUM…eploy-scriptgen/templates/deploy/_internal/topology.py264# --------------------------------------------------------------------------COMMENT
MEDIUM…eploy-scriptgen/templates/deploy/_internal/topology.py266# --------------------------------------------------------------------------COMMENT
MEDIUM…eploy-scriptgen/templates/deploy/_internal/topology.py332# --------------------------------------------------------------------------COMMENT
MEDIUM…eploy-scriptgen/templates/deploy/_internal/topology.py334# --------------------------------------------------------------------------COMMENT
MEDIUM…eploy-scriptgen/templates/deploy/_internal/topology.py418# --------------------------------------------------------------------------COMMENT
MEDIUM…eploy-scriptgen/templates/deploy/_internal/topology.py420# --------------------------------------------------------------------------COMMENT
MEDIUM…eploy-scriptgen/templates/deploy/_internal/topology.py506# --------------------------------------------------------------------------COMMENT
27 more matches not shown…
Empty Error Handlers42 hits · 210 pts
SeverityFileLineSnippetContext
HIGHtests/unit/_internal/utils/circus/utils.py90except OSError:CODE
HIGHtests/unit/_internal/utils/circus/utils.py95except OSError:CODE
HIGHtests/unit/_internal/utils/circus/utils.py107except ConflictError:CODE
HIGH…sts/unit/_internal/bento/test_service_serialization.py35except NotFound:CODE
HIGH…sts/unit/_internal/bento/test_service_serialization.py39except NotFound:CODE
HIGH…oy-scriptgen/templates/deploy/_internal/targets/ec2.py818except OSError:CODE
HIGH…oy-scriptgen/templates/deploy/_internal/targets/k8s.py1339except OSError:CODE
HIGHsrc/bentoml_cli/containerize.py94except ImportError:CODE
HIGHsrc/bentoml_cli/api_token.py105except ValueError:CODE
HIGHsrc/_bentoml_impl/client/http.py456except (httpx.TimeoutException, httpx.ConnectError):CODE
HIGHsrc/_bentoml_impl/client/http.py666except (httpx.TimeoutException, httpx.ConnectError):CODE
HIGHsrc/_bentoml_impl/client/proxy2.py294except (aiohttp.ClientError, aiohttp.ServerTimeoutError):CODE
HIGHsrc/bentoml/server.py293except KeyboardInterrupt:CODE
HIGHsrc/bentoml/server.py195except KeyboardInterrupt:CODE
HIGHsrc/bentoml/__init__.py114except ModuleNotFoundError:CODE
HIGHsrc/bentoml/bentos.py425except FileNotFoundError:CODE
HIGHsrc/bentoml/_internal/resource.py261except Exception: # pylint: disable=broad-exceptCODE
HIGHsrc/bentoml/_internal/runner/utils.py94except StopIteration:CODE
HIGHsrc/bentoml/_internal/models/model.py711except NotFound:CODE
HIGHsrc/bentoml/_internal/cloud/deployment.py412except BentoMLException:CODE
HIGHsrc/bentoml/_internal/cloud/deployment.py973except ModuleNotFoundError:CODE
HIGHsrc/bentoml/_internal/cloud/client.py837except WebSocketNetworkError:CODE
HIGHsrc/bentoml/_internal/cloud/client.py812except (WebSocketNetworkError, LocalProtocolError):CODE
HIGHsrc/bentoml/_internal/cloud/bento.py466except NotFound:CODE
HIGHsrc/bentoml/_internal/cloud/bento.py407except OSError:CODE
HIGHsrc/bentoml/_internal/cloud/model.py346except OSError:CODE
HIGHsrc/bentoml/_internal/cloud/yatai.py432except NotFound:CODE
HIGHsrc/bentoml/_internal/bento/bento.py399except StopIteration:CODE
HIGHsrc/bentoml/_internal/bento/bento.py542except NotFound:CODE
HIGHsrc/bentoml/_internal/service/service.py187except NotFound:CODE
HIGHsrc/bentoml/_internal/monitoring/__init__.py20except (ImportError, MissingDependencyException):CODE
HIGHsrc/bentoml/_internal/frameworks/transformers.py714except bentoml.exceptions.NotFound:CODE
HIGHsrc/bentoml/_internal/frameworks/transformers.py772except AttributeError:CODE
HIGHsrc/bentoml/_internal/frameworks/keras.py123except RuntimeError:CODE
HIGHsrc/bentoml/_internal/frameworks/onnx.py263except PackageNotFoundError:CODE
HIGHsrc/bentoml/_internal/frameworks/tensorflow.py103except RuntimeError:CODE
HIGHsrc/bentoml/_internal/frameworks/tensorflow.py253except RuntimeError:CODE
HIGHsrc/bentoml/_internal/frameworks/diffusers.py461except bentoml.exceptions.NotFound:CODE
HIGHsrc/bentoml/_internal/frameworks/utils/tensorflow.py100except importlib.metadata.PackageNotFoundError:CODE
HIGH…entoml/_internal/frameworks/diffusers_runners/utils.py41except NotFound:CODE
HIGHsrc/_bentoml_sdk/io_models.py178except TypeError:CODE
HIGHsrc/_bentoml_sdk/io_models.py263except StopIteration:CODE
Cross-File Repetition35 hits · 175 pts
SeverityFileLineSnippetContext
HIGHsrc/_bentoml_impl/frameworks/lightgbm.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/_bentoml_impl/frameworks/mlflow.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/_bentoml_impl/frameworks/catboost.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/_bentoml_impl/frameworks/xgboost.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/_bentoml_impl/frameworks/sklearn.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/bentoml/_internal/frameworks/transformers.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/bentoml/_internal/frameworks/fastai.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/bentoml/_internal/frameworks/keras.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/bentoml/_internal/frameworks/easyocr.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/bentoml/_internal/frameworks/onnx.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/bentoml/_internal/frameworks/tensorflow.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/bentoml/_internal/frameworks/pytorch_lightning.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/bentoml/_internal/frameworks/pytorch.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/bentoml/_internal/frameworks/detectron.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/bentoml/_internal/frameworks/torchscript.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/bentoml/_internal/frameworks/flax.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/bentoml/_internal/frameworks/picklable_model.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/bentoml/_internal/frameworks/diffusers.py0private api: use :obj:`~bentoml.model.to_runnable` instead.STRING
HIGHsrc/bentoml/_internal/monitoring/otlp.py0export schema of the data. this method should be called after all data is logged.STRING
HIGHsrc/bentoml/_internal/monitoring/default.py0export schema of the data. this method should be called after all data is logged.STRING
HIGHsrc/bentoml/_internal/monitoring/base.py0export schema of the data. this method should be called after all data is logged.STRING
HIGHsrc/bentoml/_internal/monitoring/otlp.py0export data. this method should be called after all data is logged.STRING
HIGHsrc/bentoml/_internal/monitoring/default.py0export data. this method should be called after all data is logged.STRING
HIGHsrc/bentoml/_internal/monitoring/base.py0export data. this method should be called after all data is logged.STRING
HIGHsrc/bentoml/_internal/frameworks/transformers.py0get the bentoml model with the given tag. args: tag_like: the tag of the model to retrieve from the model store. returnsSTRING
HIGHsrc/bentoml/_internal/frameworks/fastai.py0get the bentoml model with the given tag. args: tag_like: the tag of the model to retrieve from the model store. returnsSTRING
HIGHsrc/bentoml/_internal/frameworks/keras.py0get the bentoml model with the given tag. args: tag_like: the tag of the model to retrieve from the model store. returnsSTRING
HIGHsrc/bentoml/_internal/frameworks/easyocr.py0get the bentoml model with the given tag. args: tag_like: the tag of the model to retrieve from the model store. returnsSTRING
HIGHsrc/bentoml/_internal/frameworks/onnx.py0get the bentoml model with the given tag. args: tag_like: the tag of the model to retrieve from the model store. returnsSTRING
HIGHsrc/bentoml/_internal/frameworks/detectron.py0get the bentoml model with the given tag. args: tag_like: the tag of the model to retrieve from the model store. returnsSTRING
HIGHsrc/bentoml/_internal/frameworks/diffusers.py0get the bentoml model with the given tag. args: tag_like: the tag of the model to retrieve from the model store. returnsSTRING
HIGHsrc/bentoml/grpc/v1/_generated_pb3/service_pb2_grpc.py0client and server classes corresponding to protobuf-defined services.STRING
HIGHsrc/bentoml/grpc/v1/_generated_pb4/service_pb2_grpc.py0client and server classes corresponding to protobuf-defined services.STRING
HIGH…ntoml/grpc/v1alpha1/_generated_pb3/service_pb2_grpc.py0client and server classes corresponding to protobuf-defined services.STRING
HIGH…ntoml/grpc/v1alpha1/_generated_pb4/service_pb2_grpc.py0client and server classes corresponding to protobuf-defined services.STRING
Modern Structural Boilerplate172 hits · 174 pts
SeverityFileLineSnippetContext
LOWsrc/bentoml_cli/env_manager.py31logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml_cli/cloud.py169def update_current_context(context_name: str) -> None: # type: ignore (not accessed)CODE
LOWsrc/bentoml_cli/serve.py16logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml_cli/utils.py487def set_build_args(ctx: Context, param: Parameter, value: str | tuple[str]) -> None:CODE
LOWsrc/bentoml_cli/utils.py504def set_build_args_from_file(ctx: Context, param: Parameter, value: str) -> None:CODE
LOWsrc/bentoml_cli/_internal/start.py12logger = logging.getLogger(__name__)CODE
LOWsrc/_bentoml_impl/tasks/__init__.py5__all__ = ["ResultStore", "ResultStatus", "Sqlite3Store"]CODE
LOWsrc/_bentoml_impl/tasks/result.py84 async def set_result(self, task_id: str, result: To, status: ResultStatus) -> None:CODE
LOWsrc/_bentoml_impl/tasks/result.py88 async def set_status(self, task_id: str, status: ResultStatus) -> None:CODE
LOWsrc/_bentoml_impl/tasks/result.py201 async def set_status(self, task_id: str, status: ResultStatus) -> None:STRING
LOWsrc/_bentoml_impl/server/__init__.py11__all__ = ["serve_http"]CODE
LOWsrc/_bentoml_impl/frameworks/xgboost.py53logger = logging.getLogger(__name__)CODE
LOWsrc/_bentoml_impl/client/__init__.py11__all__ = [CODE
LOWsrc/_bentoml_impl/client/http.py420 def _setup(self) -> None:CODE
LOWsrc/_bentoml_impl/client/http.py630 async def _setup(self) -> None:CODE
LOWsrc/_bentoml_impl/client/proxy2.py256 async def _setup(self) -> None:CODE
LOWsrc/_bentoml_impl/client/base.py44 def _setup_endpoints(self) -> None:CODE
LOWsrc/bentoml/server.py39logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/server.py46__all__ = ["Server", "GrpcServer", "HTTPServer"]CODE
LOWsrc/bentoml/triton.py79__all__ = ["Runner"]CODE
LOWsrc/bentoml/legacy.py16__all__ = [CODE
LOWsrc/bentoml/models.py384__all__ = [CODE
LOWsrc/bentoml/deployment.py378__all__ = ["create", "get", "update", "apply", "terminate", "start", "delete", "list"]CODE
LOWsrc/bentoml/serving.py37logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/monitoring.py5__all__ = ["MonitorBase", "monitor", "DefaultMonitor"]CODE
LOWsrc/bentoml/validators.py9__all__ = [CODE
LOWsrc/bentoml/client.py28__all__ = [CODE
LOWsrc/bentoml/batch.py5__all__ = ["run_in_spark"]CODE
LOWsrc/bentoml/io.py24__all__ = [CODE
LOWsrc/bentoml/api_token.py124__all__ = ["create", "get", "list", "delete"]CODE
LOWsrc/bentoml/__init__.py323__all__ = [CODE
LOWsrc/bentoml/ray.py3__all__ = ["deployment"]CODE
LOWsrc/bentoml/types.py6__all__ = ["ModelSignature", "ModelSignatureDict"]CODE
LOWsrc/bentoml/start.py15logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/container.py34logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/container.py461__all__ = ["build", "health", "register_backend", "get_backend", "get_containerfile"]CODE
LOWsrc/bentoml/bentos.py42logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/bentos.py44__all__ = [CODE
LOWsrc/bentoml/images.py18__all__ = ["Image"]CODE
LOWsrc/bentoml/diffusers_simple.py6__all__ = ["stable_diffusion", "stable_diffusion_xl"]CODE
LOWsrc/bentoml/gradio.py3__all__ = ["mount_gradio_app"]CODE
LOWsrc/bentoml/_internal/resource.py16logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/_internal/types.py19__all__ = [CODE
LOWsrc/bentoml/_internal/types.py28logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/_internal/tag.py15logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/_internal/configuration/containers.py44logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/_internal/configuration/__init__.py21logger = logging.getLogger(__name__)CODE
LOW⚡src/bentoml/_internal/configuration/__init__.py139def set_verbosity(verbosity: int) -> None:CODE
LOW⚡src/bentoml/_internal/configuration/__init__.py149def set_debug_mode(enabled: bool = True) -> None:CODE
LOW⚡src/bentoml/_internal/configuration/__init__.py153def set_quiet_mode(enabled: bool = True) -> None:CODE
LOWsrc/bentoml/_internal/configuration/helpers.py20logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/_internal/external_typing/tensorflow.py89__all__ = [CODE
LOWsrc/bentoml/_internal/marshal/dispatcher.py18logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/_internal/runner/runner.py39logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/_internal/runner/__init__.py4__all__ = ["Runner", "Runnable"]CODE
LOWsrc/bentoml/_internal/runner/strategy.py15logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/_internal/runner/utils.py12logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/_internal/runner/runnable.py25logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/_internal/runner/runner_handle/remote.py57logger = logging.getLogger(__name__)CODE
LOWsrc/bentoml/_internal/runner/runner_handle/__init__.py20logger = logging.getLogger(__name__)CODE
112 more matches not shown…
Deep Nesting133 hits · 132 pts
SeverityFileLineSnippetContext
LOWtools/generate_coverage.py15CODE
LOWtests/unit/conftest.py22CODE
LOWtests/unit/_internal/bento/test_src_layout.py42CODE
LOWtests/unit/_internal/bento/test_src_layout.py85CODE
LOWtests/unit/grpc/interceptors/test_prometheus.py118CODE
LOW…ls/bentoml-deploy-scriptgen/templates/deploy/deploy.py453CODE
LOW…-deploy-scriptgen/templates/deploy/_internal/config.py150CODE
LOW…-deploy-scriptgen/templates/deploy/_internal/config.py170CODE
LOW…-deploy-scriptgen/templates/deploy/_internal/render.py145CODE
LOW…eploy-scriptgen/templates/deploy/_internal/topology.py126CODE
LOW…oy-scriptgen/templates/deploy/_internal/targets/ec2.py887CODE
LOW…oy-scriptgen/templates/deploy/_internal/targets/k8s.py163CODE
LOW…oy-scriptgen/templates/deploy/_internal/targets/k8s.py1432CODE
LOW…oy-scriptgen/templates/deploy/_internal/targets/k8s.py1545CODE
LOW…oy-scriptgen/templates/deploy/_internal/targets/k8s.py644CODE
LOW…oy-scriptgen/templates/deploy/_internal/targets/k8s.py737CODE
LOWsrc/bentoml_cli/deployment.py68CODE
LOWsrc/bentoml_cli/cloud.py50CODE
LOWsrc/bentoml_cli/containerize.py43CODE
LOWsrc/bentoml_cli/containerize.py447CODE
LOWsrc/bentoml_cli/containerize.py69CODE
LOWsrc/bentoml_cli/api_token.py84CODE
LOWsrc/bentoml_cli/secret.py45CODE
LOWsrc/_bentoml_impl/serde.py222CODE
LOWsrc/_bentoml_impl/arrow.py30CODE
LOWsrc/_bentoml_impl/arrow.py47CODE
LOWsrc/_bentoml_impl/server/serving.py160CODE
LOWsrc/_bentoml_impl/server/app.py760CODE
LOWsrc/_bentoml_impl/worker/patch.py28CODE
LOWsrc/_bentoml_impl/worker/runner.py85CODE
LOWsrc/_bentoml_impl/client/http.py73CODE
LOWsrc/_bentoml_impl/client/http.py192CODE
LOWsrc/_bentoml_impl/client/proxy2.py373CODE
LOWsrc/bentoml/server.py62CODE
LOWsrc/bentoml/serving.py53CODE
LOWsrc/bentoml/serving.py311CODE
LOWsrc/bentoml/serving.py560CODE
LOWsrc/bentoml/start.py27CODE
LOWsrc/bentoml/_internal/exportable.py137CODE
LOWsrc/bentoml/_internal/resource.py124CODE
LOWsrc/bentoml/_internal/configuration/containers.py309CODE
LOWsrc/bentoml/_internal/configuration/helpers.py188CODE
LOWsrc/bentoml/_internal/marshal/dispatcher.py198CODE
LOWsrc/bentoml/_internal/marshal/dispatcher.py253CODE
LOWsrc/bentoml/_internal/marshal/dispatcher.py336CODE
LOWsrc/bentoml/_internal/io_descriptors/pandas.py69CODE
LOWsrc/bentoml/_internal/io_descriptors/pandas.py163CODE
LOWsrc/bentoml/_internal/io_descriptors/pandas.py344CODE
LOWsrc/bentoml/_internal/io_descriptors/pandas.py438CODE
LOWsrc/bentoml/_internal/io_descriptors/pandas.py945CODE
LOWsrc/bentoml/_internal/io_descriptors/pandas.py1093CODE
LOWsrc/bentoml/_internal/io_descriptors/numpy.py489CODE
LOWsrc/bentoml/_internal/io_descriptors/file.py291CODE
LOWsrc/bentoml/_internal/io_descriptors/file.py318CODE
LOWsrc/bentoml/_internal/io_descriptors/utils.py42CODE
LOWsrc/bentoml/_internal/io_descriptors/json.py207CODE
LOWsrc/bentoml/_internal/io_descriptors/json.py337CODE
LOWsrc/bentoml/_internal/io_descriptors/json.py434CODE
LOWsrc/bentoml/_internal/io_descriptors/image.py202CODE
LOWsrc/bentoml/_internal/io_descriptors/image.py308CODE
73 more matches not shown…
Cross-Language Confusion23 hits · 125 pts
SeverityFileLineSnippetContext
HIGH⚡tests/unit/_internal/runner/test_container.py85 assert batch.equals(pd.concat(batches, ignore_index=True))CODE
HIGH⚡tests/unit/_internal/runner/test_container.py90 assert df1.equals(restored_df1)CODE
HIGH⚡tests/unit/_internal/runner/test_container.py91 assert df2.equals(restored_df2)CODE
HIGH⚡tests/unit/_internal/runner/test_container.py101 assert restored_batch.equals(batch)CODE
HIGH…oy-scriptgen/templates/deploy/_internal/targets/ec2.py82 '__v=$(printf %s "$__b" | base64 -d && printf x) || exit 78; 'CODE
HIGH…oy-scriptgen/templates/deploy/_internal/targets/ec2.py311 "elif ! sudo -n true 2>/dev/null; then echo docker=no-sudo; "CODE
HIGH…oy-scriptgen/templates/deploy/_internal/targets/ec2.py312 f"elif __v=$(sudo -n docker info --format {fmt_version} 2>/dev/null); "CODE
HIGH…oy-scriptgen/templates/deploy/_internal/targets/ec2.py358 hint="Amazon Linux 2023: sudo dnf install -y docker && sudo "CODE
HIGH…oy-scriptgen/templates/deploy/_internal/targets/ec2.py360 "install -y docker.io && sudo systemctl enable --now docker",CODE
HIGHsrc/bentoml_cli/models.py360 cloud_client.model.push(CODE
HIGHsrc/bentoml_cli/bentos.py360 cloud_client.bento.push(bento_obj, force=force, threads=threads)CODE
HIGHsrc/bentoml_cli/bentos.py396 help="Whether to containerize the Bento after building. '--containerize' is the shortcut of 'bentoml build && beCODE
HIGHsrc/bentoml_cli/bentos.py490 cloud_client.bento.push(bento, force=force, threads=threads)CODE
HIGHsrc/bentoml/models.py223 _cloud_client.model.push(model_obj, force=force)CODE
HIGHsrc/bentoml/bentos.py261 _cloud_client.bento.push(bento, force=force)CODE
HIGH…ml/_internal/container/frontend/dockerfile/__init__.py89 "default_install_command": "yum update && yum install -y amazon-linux-extras ca-certificates "CODE
HIGH…ml/_internal/container/frontend/dockerfile/__init__.py90 'gcc gcc-c++ make bash shadow-utils && amazon-linux-extras enable && yum groupinstall -y "Development Tools"',CODE
HIGH…ml/_internal/container/frontend/dockerfile/__init__.py104 "default_install_command": "yum update && yum install -y ca-certificates gcc gcc-c++ make bash shadow-utils git"CODE
HIGH…ml/_internal/container/frontend/dockerfile/__init__.py122 "default_install_command": "apt-get update && apt-get install -q -y --no-install-recommends "CODE
HIGHsrc/bentoml/_internal/cloud/deployment.py377 bento_api.push(bento=bento_obj, bare=bare)CODE
HIGHsrc/bentoml/_internal/cloud/deployment.py395 bento_api.push(bento=bento_obj, bare=bare)CODE
HIGHsrc/bentoml/_internal/cloud/deployment.py418 bento_api.push(bento=bento_obj, bare=bare)CODE
HIGHsrc/bentoml/_internal/cloud/deployment.py1650 content += f"apt-get update && apt-get install -y {quoted} || exit 1\n".encode()CODE
Docstring Block Structure25 hits · 125 pts
SeverityFileLineSnippetContext
HIGHsrc/_bentoml_impl/frameworks/sklearn.py88 Save a model instance to BentoML modelstore. Args: name: Name for given model instance. This should paSTRING
HIGHsrc/bentoml/models.py73 Import a bento model exported with :code:`bentoml.models.export_model`. To import a model saved with a frameworSTRING
HIGHsrc/bentoml/models.py146 Export a BentoML model. Examples: .. code-block:: python # exports 'my_model' to '/path/to/foldeSTRING
HIGHsrc/bentoml/bentos.py96 Import a bento. Examples: .. code-block:: python # imports 'my_bento' from '/path/to/folder/my_bSTRING
HIGHsrc/bentoml/bentos.py178 Export a bento. To export a bento to S3, you must install BentoML with extras ``aws``: .. code-block:: baSTRING
HIGHsrc/bentoml/_internal/io_descriptors/pandas.py513 Process incoming requests and convert incoming objects to `pd.DataFrame` Args: reqSTRING
HIGHsrc/bentoml/_internal/io_descriptors/numpy.py430 Create a :class:`~bentoml._internal.io_descriptors.numpy.NumpyNdarray` IO Descriptor from given inputs. STRING
HIGHsrc/bentoml/_internal/io_descriptors/file.py127 Create a :class:`~bentoml._internal.io_descriptors.file.File` IO Descriptor from given inputs. Args: STRING
HIGHsrc/bentoml/_internal/io_descriptors/json.py208 Create a :class:`~bentoml._internal.io_descriptors.json.JSON` IO Descriptor from given inputs. Args: STRING
HIGHsrc/bentoml/_internal/io_descriptors/image.py203 Create a :class:`~bentoml._internal.io_descriptors.image.Image` IO Descriptor from given inputs. Args:STRING
HIGHsrc/bentoml/_internal/frameworks/transformers.py938 Save a model instance to BentoML modelstore. Args: name: Name for given model instance. This should paSTRING
HIGHsrc/bentoml/_internal/frameworks/keras.py83 Load a model from BentoML local modelstore with given name. Args: bento_model (``str`` ``|`` :obj:`~beSTRING
HIGHsrc/bentoml/_internal/frameworks/keras.py148 Save a model instance to BentoML modelstore. Args: name: Name for given model instance. This should paSTRING
HIGHsrc/bentoml/_internal/frameworks/easyocr.py112 Save a model instance to BentoML modelstore. Args: name: Name for given model instance. This should paSTRING
HIGHsrc/bentoml/_internal/frameworks/tensorflow.py66 Load a tensorflow model from BentoML local modelstore with given name. Args: bento_model: Either the tSTRING
HIGHsrc/bentoml/_internal/frameworks/tensorflow.py123 Save a model instance to BentoML modelstore. Args: name: Name for given model instance. This should paSTRING
HIGHsrc/bentoml/_internal/frameworks/pytorch_lightning.py46 Load a model from BentoML local modelstore with given name. Args: tag (:code:`Union[str, Tag]`): STRING
HIGHsrc/bentoml/_internal/frameworks/pytorch_lightning.py89 Save a model instance to BentoML modelstore. Args: name (:code:`str`): Name for given modeSTRING
HIGHsrc/bentoml/_internal/frameworks/pytorch.py52 Load a model from a BentoML Model with given name. Args: tag (:code:`Union[str, Tag]`): TaSTRING
HIGHsrc/bentoml/_internal/frameworks/pytorch.py97 Save a model instance to BentoML modelstore. Args: name (:code:`str`): Name for given modeSTRING
HIGHsrc/bentoml/_internal/frameworks/detectron.py142 Save a model instance to BentoML modelstore. Args: name: Name for given model instance. This should paSTRING
HIGHsrc/bentoml/_internal/frameworks/torchscript.py43 Load a model from BentoML local modelstore with given name. Args: tag: Tag of a saved modeSTRING
HIGHsrc/bentoml/_internal/frameworks/torchscript.py94 Save a model instance to BentoML modelstore. Args: name (:code:`str`): Name for given modeSTRING
HIGHsrc/bentoml/_internal/frameworks/picklable_model.py86 Save a model instance to BentoML modelstore. Args: name: Name for given model instance. This should paSTRING
HIGHsrc/bentoml/grpc/utils/_import_hook.py15 Import generated stubs. Args: version: The version of the proto file to import. file: The nameSTRING
Excessive Try-Catch Wrapping75 hits · 78 pts
SeverityFileLineSnippetContext
LOWtests/unit/_internal/io/test_multipart.py112 except Exception as e:CODE
LOWtests/unit/_internal/cloud/test_deployment.py502 except Exception as e:CODE
LOW…ls/bentoml-deploy-scriptgen/templates/deploy/deploy.py667 except Exception as exc: # noqa: BLE001 - never die without a summaryCODE
LOW…-deploy-scriptgen/templates/deploy/_internal/common.py167 except Exception as exc: # noqa: BLE001 - deliberate broad retryCODE
LOW…oy-scriptgen/templates/deploy/_internal/targets/k8s.py1088 except Exception:CODE
LOW…oy-scriptgen/templates/deploy/_internal/targets/k8s.py1143 except Exception:CODE
LOWsrc/_bentoml_impl/server/serving.py404 except Exception:CODE
LOWsrc/_bentoml_impl/server/proxy.py152 except Exception:CODE
LOWsrc/_bentoml_impl/server/app.py175 except Exception:CODE
LOWsrc/_bentoml_impl/server/app.py519 except Exception as e:CODE
LOWsrc/_bentoml_impl/server/app.py541 except Exception as e:CODE
LOWsrc/_bentoml_impl/server/app.py593 except Exception:CODE
LOWsrc/_bentoml_impl/server/app.py603 except Exception as e:CODE
LOWsrc/_bentoml_impl/server/app.py741 except Exception:CODE
LOWsrc/bentoml/server.py316 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/models.py310 except Exception:CODE
LOWsrc/bentoml/models.py366 except Exception:CODE
LOWsrc/bentoml/deployment.py328 except Exception as e:CODE
LOWsrc/bentoml/serving.py80 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/serving.py93 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/serving.py554 except Exception:CODE
LOWsrc/bentoml/serving.py830 except Exception:CODE
LOWsrc/bentoml/bentos.py476 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/store.py172 except Exception:CODE
LOWsrc/bentoml/_internal/exportable.py313 except Exception:CODE
LOWsrc/bentoml/_internal/resource.py261 except Exception: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/marshal/dispatcher.py250 except Exception:CODE
LOWsrc/bentoml/_internal/marshal/dispatcher.py283 except Exception: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/marshal/dispatcher.py324 except Exception:CODE
LOWsrc/bentoml/_internal/marshal/dispatcher.py359 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/marshal/dispatcher.py382 except Exception:CODE
LOWsrc/bentoml/_internal/runner/runner.py314 except Exception as e:CODE
LOWsrc/bentoml/_internal/runner/runner_handle/remote.py413 except Exception:CODE
LOWsrc/bentoml/_internal/runner/runner_handle/remote.py454 except Exception:CODE
LOWsrc/bentoml/_internal/runner/runner_handle/remote.py474 except Exception:CODE
LOWsrc/bentoml/_internal/server/runner_app.py217 except Exception:CODE
LOWsrc/bentoml/_internal/server/runner_app.py251 except Exception:CODE
LOWsrc/bentoml/_internal/server/runner_app.py285 except Exception:CODE
LOWsrc/bentoml/_internal/server/http_app.py384 except Exception: # pylint: disable=broad-exceptSTRING
LOWsrc/bentoml/_internal/server/grpc_app.py232 except Exception as e: # pylint: disable=broad-exceptCODE
LOW…/bentoml/_internal/server/grpc/servicer/v1/__init__.py116 except Exception: # pylint: disable=broad-exceptCODE
LOW…ml/_internal/server/grpc/servicer/v1alpha1/__init__.py115 except Exception: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/utils/benchmark.py324 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/utils/filesystem.py92 except Exception as exc:CODE
LOWsrc/bentoml/_internal/utils/analytics/usage_stats.py76 except Exception as err: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/container/__init__.py80 except Exception as err: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/container/__init__.py307 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/container/__init__.py370 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/batch/spark.py52 except Exception:CODE
LOWsrc/bentoml/_internal/cloud/deployment.py110 except Exception as e:CODE
LOWsrc/bentoml/_internal/cloud/deployment.py328 except Exception as e:CODE
LOWsrc/bentoml/_internal/cloud/deployment.py1033 except Exception as e:CODE
LOWsrc/bentoml/_internal/cloud/bento.py252 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/cloud/bento.py382 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/cloud/model.py189 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/cloud/model.py320 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/cloud/yatai.py254 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/cloud/yatai.py372 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/cloud/yatai.py687 except Exception as e: # pylint: disable=broad-exceptCODE
LOWsrc/bentoml/_internal/cloud/yatai.py806 except Exception as e: # pylint: disable=broad-exceptCODE
15 more matches not shown…
AI Structural Patterns66 hits · 66 pts
SeverityFileLineSnippetContext
LOWtests/integration/frameworks/models/onnx.py60CODE
LOWtests/e2e/bento_server_http/service.py76CODE
LOW…-deploy-scriptgen/templates/deploy/_internal/common.py91CODE
LOWsrc/bentoml_cli/deployment.py902CODE
LOWsrc/_bentoml_impl/server/serving.py160CODE
LOWsrc/_bentoml_impl/server/app.py666CODE
LOWsrc/_bentoml_impl/frameworks/lightgbm.py278CODE
LOWsrc/_bentoml_impl/frameworks/xgboost.py336CODE
LOWsrc/_bentoml_impl/client/proxy2.py151CODE
LOWsrc/bentoml/server.py324CODE
LOWsrc/bentoml/server.py413CODE
LOWsrc/bentoml/models.py260CODE
LOWsrc/bentoml/models.py278CODE
LOWsrc/bentoml/models.py327CODE
LOWsrc/bentoml/deployment.py30CODE
LOWsrc/bentoml/deployment.py69CODE
LOWsrc/bentoml/deployment.py134CODE
LOWsrc/bentoml/deployment.py174CODE
LOWsrc/bentoml/serving.py226CODE
LOWsrc/bentoml/serving.py311CODE
LOWsrc/bentoml/serving.py560CODE
LOWsrc/bentoml/start.py146CODE
LOWsrc/bentoml/start.py264CODE
LOWsrc/bentoml/container.py38CODE
LOWsrc/bentoml/container.py68CODE
LOWsrc/bentoml/container.py94CODE
LOWsrc/bentoml/container.py137CODE
LOWsrc/bentoml/container.py181CODE
LOWsrc/bentoml/container.py280CODE
LOWsrc/bentoml/bentos.py276CODE
LOWsrc/bentoml/bentos.py382CODE
LOWsrc/bentoml/bentos.py481CODE
LOWsrc/bentoml/_internal/runner/runner.py168CODE
LOWsrc/bentoml/_internal/io_descriptors/pandas.py320CODE
LOWsrc/bentoml/_internal/io_descriptors/pandas.py475CODE
LOWsrc/bentoml/_internal/io_descriptors/pandas.py982CODE
LOWsrc/bentoml/_internal/io_descriptors/numpy.py306CODE
LOWsrc/bentoml/_internal/server/grpc_app.py67CODE
LOWsrc/bentoml/_internal/container/buildx.py62CODE
LOWsrc/bentoml/_internal/container/podman.py57CODE
LOWsrc/bentoml/_internal/container/buildah.py44CODE
LOWsrc/bentoml/_internal/container/docker.py64CODE
LOWsrc/bentoml/_internal/cloud/deployment.py351CODE
LOWsrc/bentoml/_internal/monitoring/otlp.py104CODE
LOWsrc/bentoml/_internal/frameworks/transformers.py615CODE
LOWsrc/bentoml/_internal/frameworks/transformers.py922CODE
LOWsrc/bentoml/_internal/frameworks/keras.py133CODE
LOWsrc/bentoml/_internal/frameworks/torchscript.py81CODE
LOWsrc/bentoml/_internal/frameworks/diffusers.py197CODE
LOWsrc/bentoml/_internal/frameworks/diffusers.py377CODE
LOW…al/frameworks/diffusers_runners/stable_diffusion_xl.py32CODE
LOW…ernal/frameworks/diffusers_runners/stable_diffusion.py31CODE
LOWsrc/bentoml/grpc/v1/_generated_pb3/service_pb2_grpc.py73CODE
LOWsrc/bentoml/grpc/v1/_generated_pb3/service_pb2_grpc.py90CODE
LOWsrc/bentoml/grpc/v1/_generated_pb4/service_pb2_grpc.py73CODE
LOWsrc/bentoml/grpc/v1/_generated_pb4/service_pb2_grpc.py90CODE
LOW…ntoml/grpc/v1alpha1/_generated_pb3/service_pb2_grpc.py56CODE
LOW…ntoml/grpc/v1alpha1/_generated_pb4/service_pb2_grpc.py56CODE
LOWsrc/bentoml/testing/server.py412CODE
LOWsrc/_bentoml_sdk/decorators.py47CODE
6 more matches not shown…
Over-Commented Block57 hits · 56 pts
SeverityFileLineSnippetContext
LOWdocs/source/_templates/base.html21 primaryColor: '#47AFD1',COMMENT
LOWskills/bentoml-k8s-deploy/templates/deployment.yaml1# =============================================================================COMMENT
LOWskills/bentoml-k8s-deploy/templates/deployment.yaml21# 1. `args:` only -- NEVER `command:`. The image entrypoint activates the venvCOMMENT
LOWskills/bentoml-k8s-deploy/templates/deployment.yaml41 name: {{SLUG}}COMMENT
LOWskills/bentoml-k8s-deploy/templates/deployment.yaml101 containerPort: 3000 # BentoML's HTTP port; changing it means setting BENTOML_PORT tooCOMMENT
LOWskills/bentoml-k8s-deploy/templates/deployment.yaml121 value: "{{SERVE_DEPENDS}}"COMMENT
LOWskills/bentoml-k8s-deploy/templates/deployment.yaml141 # requests = what the scheduler reserves (and what CPU-percentage HPAs areCOMMENT
LOWskills/bentoml-k8s-deploy/templates/deployment.yaml161 memory: "{{MEMORY_LIMIT}}"COMMENT
LOWskills/bentoml-k8s-deploy/templates/ingress.yaml1# =============================================================================COMMENT
LOWskills/bentoml-k8s-deploy/templates/service.yaml1# =============================================================================COMMENT
LOWskills/bentoml-k8s-deploy/templates/hpa.yaml1# =============================================================================COMMENT
LOWskills/bentoml-k8s-deploy/templates/hpa.yaml61 # <- services.<Name>.autoscaling.target (percent). 70 is a sane start;COMMENT
LOWskills/bentoml-k8s-deploy/templates/hpa.yaml81 # NOT from these metrics, so every kubelet /readyz and /livez hit shows up inCOMMENT
LOWskills/bentoml-k8s-deploy/templates/hpa.yaml101 # target:COMMENT
LOWskills/bentoml-k8s-deploy/templates/namespace.yaml1# The optional Namespace object (<- kubernetes.namespace).COMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml1# =============================================================================COMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml21# -----------------------------------------------------------------------------COMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml41# * the registry type: an `*.dkr.ecr.<region>.amazonaws.com` host means ECRCOMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml61# at the project root.COMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml81 # kubectl context to deploy into. Always confirmed with a human first --COMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml101 # anything here: overriding app.kubernetes.io/name would desync a Deployment'sCOMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml121# startup_failure_threshold 60 | readiness_timeout_seconds 6 | no HPACOMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml141 # autoscaling.enabled is true, so the HPA and this value cannot fight.COMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml161 # nvidia.com/gpu: "1"COMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml181 # tracing). It BEATS the @bentoml.service(...) decorator -- but only underCOMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml201 # gives that dependency a HARD-CODED 5s budget, so /readyz canCOMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml221 # service_name is the BENTO name.COMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml241 # -- which replaces the derived value entirely (nothing is emitted twice)COMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml261 # NodePort only, 30000-32767. Omit/null to let Kubernetes pick -- pinningCOMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml281 # keep any timeout >= this service's traffic.timeout.COMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml301 body:COMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml1# =============================================================================COMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml21#COMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml41# `image`, `kubernetes.context`, `kubernetes.namespace`. Everything below has aCOMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml61build_target: nullCOMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml81 # rendered with it, so services cannot be split across namespaces). It mustCOMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml101 # ESCAPE HATCH — leave null unless you have outgrown this config.COMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml121# no service in the bento is a load-time error — that is the typo guard, and theCOMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml141 # DNS-1035 label (^[a-z]([-a-z0-9]*[a-z0-9])?$ — e.g. a service nameCOMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml161 # GPUs go here as limits only, integer, e.g. nvidia.com/gpu: "1"COMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml181 # decorator and loses, while the per-service form beats it. Example:COMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml201 # startupProbe budget = this x periodSeconds 10. 60 -> 10 minutes ofCOMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml221 # works only because requests.cpu is always set). A poorCOMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml241 # preserves the existing allocation).COMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml261 # the service name. Services you never mention here need no block at all.COMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml281 # OPTIONAL post-deploy smoke test against the ENTRY service. Delete the wholeCOMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml301 # Public IPs/DNS names of existing, SSH-reachable instances. Bare hosts, noCOMMENT
LOW…s/bentoml-deploy-scriptgen/templates/deploy/config.yml321 # host (never touches instance IAM)COMMENT
LOW…-deploy-scriptgen/templates/deploy/_internal/render.py61# bentoml-k8s-deploy skill renders: both skills emit the same manifest shape fromCOMMENT
LOWsrc/bentoml_cli/__init__.py1# DO NOT IMPORT ANYTHING HERECOMMENT
LOWsrc/bentoml_cli/worker/__init__.py1# DO NOT IMPORT ANYTHING HERECOMMENT
LOWsrc/bentoml/_internal/resource.py181 return cpu_countCOMMENT
LOWsrc/bentoml/_internal/resource.py201# "E": 1000**6,COMMENT
LOWsrc/bentoml/_internal/utils/dotenv.py1# The MIT License (MIT)COMMENT
LOWsrc/bentoml/_internal/utils/pickle.py1from __future__ import annotationsCOMMENT
LOWsrc/bentoml/_internal/cloud/deployment.py181 )COMMENT
LOWsrc/_bentoml_sdk/gradio.py61 # @bentoml.service() decorator returns a wrapper instead of the original classCOMMENT
Self-Referential Comments9 hits · 25 pts
SeverityFileLineSnippetContext
MEDIUMsrc/_bentoml_impl/worker/patch.py50 # Define a new class to wrap around the original safe_open classCOMMENT
MEDIUMsrc/bentoml/_internal/server/grpc_app.py105 # Create a health check servicer. We use the non-blocking implementationCOMMENT
MEDIUMsrc/bentoml/_internal/utils/formparser.py98 # Create the parser.COMMENT
MEDIUMsrc/bentoml/_internal/utils/formparser.py261 # Create the parser.COMMENT
MEDIUMsrc/bentoml/_internal/bento/build_config.py796 """This class is intended for modeling the bentofile.yaml file where user willSTRING
MEDIUMsrc/bentoml/grpc/v1/_generated_pb3/service_pb2_grpc.py67 # This class is part of an EXPERIMENTAL API.COMMENT
MEDIUMsrc/bentoml/grpc/v1/_generated_pb4/service_pb2_grpc.py67 # This class is part of an EXPERIMENTAL API.COMMENT
MEDIUM…ntoml/grpc/v1alpha1/_generated_pb3/service_pb2_grpc.py50 # This class is part of an EXPERIMENTAL API.COMMENT
MEDIUM…ntoml/grpc/v1alpha1/_generated_pb4/service_pb2_grpc.py50 # This class is part of an EXPERIMENTAL API.COMMENT
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippetContext
CRITICALsrc/bentoml/_internal/server/grpc_app.py201 if BentoMLContainer.api_server_config.logging.access.enabled.get():CODE
CRITICAL…/bentoml/_internal/server/static_content/marked.min.js6!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&defineCODE
Redundant / Tautological Comments6 hits · 9 pts
SeverityFileLineSnippetContext
LOW.devcontainer/library-scripts/docker-debian.sh130# Check if distro is suppportedCOMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml74# Set it to "" only for a local cluster where you load the image onto the nodesCOMMENT
LOWskills/bentoml-k8s-deploy/templates/config.yml106 # Set it to a directory and those files are applied AS-IS: nothing here shapesCOMMENT
LOWsrc/bentoml/_internal/utils/formparser.py267 # Write file data, it needs to use await with the UploadFile methodsCOMMENT
LOWsrc/bentoml/_internal/frameworks/transformers.py415 # Set trust_remote_code to True to allow loading custom pipeline.COMMENT
LOWsrc/_bentoml_sdk/gradio.py62 # Check if the object is an instance of ServiceCOMMENT
AI Slop Vocabulary4 hits · 7 pts
SeverityFileLineSnippetContext
LOWtests/unit/grpc/interceptors/test_prometheus.py76 # if it isn't a pb.Request, then we just pass the handler, hence metrics should be emptyCOMMENT
LOWsrc/bentoml/_internal/io_descriptors/pandas.py567 # by the request's headers['content-type']. Instead we simply use the _default_format.COMMENT
MEDIUMsrc/bentoml/_internal/server/http/instruments.py221 # place holder metrics to initialize endpoints with 0 to facilitate rate calculationCOMMENT
MEDIUMsrc/bentoml/_internal/ray/__init__.py30 """'ray[serve]' is required in order to use module 'bentoml.ray', install with 'pip install -U "ray[serve]"'. SeSTRING
Magic Placeholder Names1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHtests/monitoring/task_classification/README.md112 api_key: <your_api_key>CODE
Fake / Example Data1 hit · 2 pts
SeverityFileLineSnippetContext
LOWdocs/source/_templates/base.html29 // email: 'test@test.com',COMMENT
Structural Annotation Overuse1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/_bentoml_impl/server/app.py774 # NOTE: The following check is for security concern, DO NOT REMOVECOMMENT