$ show microsoft/discovery
This repository is a comprehensive catalog of containerized AI agents for scientific computing, primarily in chemistry, biology, materials science, and engineering domains. It includes over 40 agents (e.g., AutoDock Vina, AlphaFold, OpenFOAM, GWP predictor) each packaged as a Docker container with a utility module, example inputs, and tests. The platform also provides a Python CLI tool (`discovery`) for submitting jobs to an Azure-based HPC service, managing storage, and monitoring job status. The repository is hybrid in nature, containing both production-ready application components (CLI, agent deployment infrastructure) and research artifacts (training pipelines for the GWP predictor, model weights, and data ingestion scripts). The agent architecture follows a consistent pattern: each agent has a `quick_setup`/`save_final_results` lifecycle and is designed to run in a containerized environment with mounted `/input` and `/output` directories. The CLI is well-structured with Typer and Rich, and includes extensive tests. However, the codebase exhibits significant duplication (e.g., `molecular_utils.py` and `io_utils.py` appear identically in multiple agents) and some hardcoded paths, which reduces maintainability. The GWP predictor training pipeline is a notable research component with a multi-step ETL process and active learning, but it is tightly coupled to specific external data sources. Overall, the repository serves as a strong foundation for deploying scientific AI agents on Azure, with moderate reusability of individual components.
The LLM identified 4 files worth highlighting for reuse:
Implements a complete molecular docking pipeline using AutoDock Vina and OpenBabel. Includes grid box calculation, receptor/ligand preparation, batch docking with multiprocessing, checkpointing (JSONL progress file), and result parsing/visualization. The module is self-contained and demonstrates robust error handling, making it reusable for any docking project.
Validates machine learning model file formats (safetensors, HDF5, PyTorch, ONNX, NPZ) by inspecting file headers. Uses a sniffer registry pattern that can be extended to new formats. Designed for CI/CD pipelines to prevent binary file poisoning. Lightweight dependency on `picklescan` for PyTorch files. Could be reused in any ML project's CI.
Provides an async HTTP client for the Discovery platform API with automatic retry, exponential backoff, token caching, and polling for operation completion. Uses `httpx` and `tenacity`. Central to the CLI's job submission and status queries. The pattern is reusable for any REST API client requiring robust error handling and async support.
A comprehensive statistical analysis toolkit exposing reusable classes: ValidationState (confidence scoring), DescriptiveAnalyzer, CorrelationAnalyzer, HypothesisTester, EffectSizeCalculator, BootstrapCI, BayesianAnalyzer, ModelEvaluator, and ReportGenerator. Designed for domain-agnostic data analysis with proper handling of edge cases (e.g., missing data, small samples). Could be extracted and used in any Python-based analytical pipeline.