Serve documentation from the operator UI
This commit is contained in:
@@ -9,6 +9,7 @@ partition, compute, and merge.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Any, Mapping
|
||||
|
||||
from scimesh.sdk.artifacts import ArtifactSchema, ComponentRef, PortSpec
|
||||
@@ -132,6 +133,7 @@ class DescriptorBatchWorkload(MapReduceWorkload):
|
||||
raise ValueError("skip_invalid must be a boolean")
|
||||
return value
|
||||
|
||||
|
||||
def descriptor_batch_sdk_definition(
|
||||
*,
|
||||
shard_rows: int = 10_000,
|
||||
|
||||
@@ -12,7 +12,7 @@ import os
|
||||
import platform
|
||||
|
||||
from scimesh.sdk.identity import SDK_API_VERSION
|
||||
from scimesh.sdk.registry import WorkloadRegistry
|
||||
from scimesh.sdk.registry import AllowedPackage, WorkloadRegistry
|
||||
from scimesh.sdk.resources import ResourceInventory
|
||||
from scimesh.sdk.runtime import RuntimeCapabilities
|
||||
|
||||
@@ -80,7 +80,12 @@ def default_sdk_runtime(
|
||||
features={"artifact-collections": "1.0.0", "exact-verifier": "1.0.0"},
|
||||
workload_capabilities=(
|
||||
workload_capabilities
|
||||
or ("similarity-search", "similarity-graph", "descriptor-batch", "molwt-filter")
|
||||
or (
|
||||
"similarity-search",
|
||||
"similarity-graph",
|
||||
"descriptor-batch",
|
||||
"molwt-filter",
|
||||
)
|
||||
),
|
||||
inventory=ResourceInventory(
|
||||
cpu_cores=max(os.cpu_count() or 1, 1),
|
||||
|
||||
@@ -68,7 +68,7 @@ def filter_molecules_by_molwt(
|
||||
if not skip_invalid:
|
||||
raise ValueError(f"row {scanned} has an invalid canonical_smiles")
|
||||
continue
|
||||
molwt = Descriptors.MolWt(molecule)
|
||||
molwt = Descriptors.MolWt(molecule) # type: ignore[attr-defined]
|
||||
if minimum is not None and molwt < minimum:
|
||||
continue
|
||||
if maximum is not None and molwt > maximum:
|
||||
|
||||
Reference in New Issue
Block a user