architecture-design

Generate modular ML project structures using factory and registry patterns.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/AnXueHua/auto-research --skill architecture-design-anxuehua
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture-design
Source: https://github.com/AnXueHua/auto-research/tree/main/skills/architecture-design
Command: npx skills add https://github.com/AnXueHua/auto-research --skill architecture-design-anxuehua

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Inconsistent code organization and duplicated patterns make large machine‑learning projects hard to maintain and extend. This skill provides a unified architecture using factories and registries to keep new components coherent.

Core Features & Use Cases

  • Factory Pattern: Dynamically create datasets, models, and other components without hard‑coding class names.
  • Registry Pattern: Register new datasets, models, augmentations, and utilities via decorators like @register_dataset and @register_model.
  • Auto‑Import: Automatically discover and import submodules so newly added files are instantly available.
  • Configuration Management: Integrates with Hydra for clean, config‑driven component initialization.
  • Typical Use Cases: Adding a new Dataset class, introducing a new Model class, creating a custom augmentation module, or initializing a fresh ML project scaffold.

Quick Start

Create a new dataset by adding a file in src/data_module/dataset/ with the @register_dataset("my_dataset") decorator and implementing the required methods.

Frequently Asked Questions about architecture-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I organize a machine learning project to avoid hard-coding class names for datasets and models?

To organize a machine learning project without hard-coding, apply the factory and registry patterns using decorators like @register_dataset and @register_model. This dynamically creates components and keeps new additions coherent across your codebase.

What is the best way to add a new dataset to a modular ML codebase using Hydra?

The best way to add a new dataset using Hydra is to create a file in your dataset directory and apply the @register_dataset decorator. Auto-import discovers the submodule, making it instantly available for configuration-driven initialization.

How does the registry pattern work for adding custom augmentations in Python?

The registry pattern for custom augmentations works by using decorators to register new utility classes. Automatic submodule discovery imports these files, preventing duplicated patterns and enabling dynamic instantiation without manual imports.

Do I need Hydra configuration to use factory patterns for ML architecture?

Yes, you need Hydra configuration to use factory patterns effectively in this ML architecture. Hydra provides clean, config-driven component initialization required to dynamically create datasets and models from the registry.

Why does inconsistent code organization make large machine learning projects hard to maintain?

Inconsistent code organization makes machine learning projects hard to maintain because duplicated patterns prevent coherent extensions. A unified architecture using factories and registries solves this by standardizing how new components are registered and instantiated.