FLAML
Copilot instructions4.4k starsChanged 10 months agoMITView on GitHub
FLAML (Fast Library for Automated Machine Learning & Tuning) is a lightweight Python library for efficient automation of machine learning and AI operations. It automates workflow based on large language models, machine learning models, etc. and optimizes their performance. Key Components: The repository uses pre-commit hooks for:
- Installs packages
Trending
Quiet since September.about the whole repository
Who's talking about microsoft/FLAML
- microsoft/autogen“Integrate opensource LLMs into autogen”GitHub · Jul 3, 2023 · 33 reactions
- jungwoo-ha/WeeklyArxivTalk“[20210620] Weekly AI ArXiv 만담”GitHub · Jun 19, 2021 · 9 reactions
- ComposioHQ/composio“chore(deps): bump flaml from 2.6.0 to 2.7.0 in /python/providers/autogen in the pip-version group across 1 …”GitHub · Sep 25, 2026 · 1 reactions
- microsoft/autogen“handle context size overflow in AssistantAgent”GitHub · Aug 1, 2023 · 1 reactions
- A Hacker News story“Flaml – Cost-effective hyperparameter optimization AutoML”Hacker News · Jul 23, 2021 · 1 points
The biggest 5 of 39 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 39
Talked about on GitHub and Hacker News (39 times).
On GitHub · 38
- Jul 3, 2023Integrate opensource LLMs into autogen — microsoft/autogen33 reactions · 43 comments
- Jun 19, 2021[20210620] Weekly AI ArXiv 만담 — jungwoo-ha/WeeklyArxivTalk9 reactions · 4 comments
- Sep 25, 2026chore(deps): bump flaml from 2.6.0 to 2.7.0 in /python/providers/autogen in the pip-version group across 1 directory — ComposioHQ/composio1 reaction · 2 comments
- Aug 1, 2023handle context size overflow in AssistantAgent — microsoft/autogen1 reaction · 9 comments
- Feb 22, 2021FLAML example — Azure/azureml-examples1 reaction · 1 comment
33 more on GitHub
- Sep 19, 2026chore(deps): update dependency flaml to v2.7.0 — w4bo/AA2627-unibo-bdcp0 reactions · 1 comment
- Sep 18, 2026chore(deps): update dependency flaml to v2.7.0 — w4bo/AA2526-unibo-bigdataandcloudplatforms0 reactions
- Sep 18, 2026chore(deps): update dependency flaml to v2.7.0 — Mala1180/age-ml0 reactions · 1 comment
- Sep 18, 2026chore(deps): update dependency flaml to v2.7.0 — w4bo/AA2425-unibo-bigdataandcloudplatforms0 reactions
- Jun 24, 2026build(deps): Update flaml requirement from >=2.0.2 to >=2.6.0 — sovai-research/panelary0 reactions · 1 comment
- Jun 2, 2026[Add] FLAML (microsoft/FLAML) — PyTorchKR/landscape0 reactions
- Apr 13, 2026chore(deps-dev): update flaml requirement from >=2.1 to >=2.5.0 — pypi-ahmad/AutoTabML-Studio0 reactions · 1 comment
- Jan 22, 2026Update flaml requirement from <2.2.0 to <2.6.0 in /mlos_core — reddev9339/MLOS0 reactions
- Jan 21, 2026Update flaml requirement from <2.2.0 to <2.6.0 in /mlos_core — microsoft/MLOS0 reactions
- Jan 12, 2026Update flaml requirement from <2.2.0 to <2.5.0 in /mlos_core — reddev9339/MLOS0 reactions · 1 comment
- Sep 19, 2024Update flaml requirement from <2.2.0 to <2.4.0 in /mlos_core — bpkroth/MLOS0 reactions
- Nov 27, 2023To install palma, I had to pip install "flaml[automl]" — mews-labs/palma0 reactions · 1 comment
- Nov 19, 2023Use Flaml for AutoML — ZackLarsen/mlflow-recipes0 reactions
- Mar 4, 2023[tune](deps): Bump flaml from 0.5.2 to 1.1.3 in /python/requirements/ml — roireshef/ray0 reactions · 1 comment
- Mar 4, 2023[tune](deps): Bump flaml from 0.6.7 to 1.1.3 in /python/requirements/ml — Zyiqin-Miranda/amazon-ray0 reactions · 1 comment
- Mar 4, 2023[tune](deps): Bump flaml from 0.6.7 to 1.1.3 in /python/requirements/ml — Michaelvll/ray0 reactions · 1 comment
- Jan 14, 2023[tune](deps): Bump flaml from 0.6.7 to 1.1.1 in /python/requirements/ml — RuofanKong/ray0 reactions
- Jan 14, 2023[tune](deps): Bump flaml from 0.6.7 to 1.1.1 in /python/requirements/ml — stefanbschneider/ray0 reactions
- Jan 14, 2023[tune](deps): Bump flaml from 0.5.2 to 1.1.1 in /python/requirements/ml — michaelzhiluo/ray0 reactions
- Jan 14, 2023[tune](deps): Bump flaml from 0.5.2 to 1.1.1 in /python/requirements/tune — walterddr/ray0 reactions
- Jan 14, 2023[tune](deps): Bump flaml from 0.6.7 to 1.1.1 in /python/requirements/ml — eggie5/ray0 reactions
- Dec 22, 2022Time series task — markharley/FLAML0 reactions
- Jul 16, 2022[tune](deps): Bump flaml from 0.9.7 to 1.0.8 in /python/requirements/ml — XinYao1994/ray0 reactions
- Jun 18, 2022[tune](deps): Bump flaml from 0.9.7 to 1.0.7 in /python/requirements/ml — suquark/ray0 reactions
- Jun 4, 2022[tune](deps): Bump flaml from 0.6.7 to 1.0.4 in /python/requirements/ml — YarShev/ray0 reactions
- Feb 2, 2022Cherrypicked GitHub repositories — cffbots/filtering0 reactions · 3 comments
- Feb 1, 2022Stop use one-hot encoder to categorical feature if it's numeric — dotnet/machinelearning-modelbuilder0 reactions · 4 comments
- Jan 8, 2022[tune](deps): Bump flaml from 0.5.2 to 0.9.4 in /python/requirements/tune — XinYao1994/ray0 reactions · 11 comments
- Oct 23, 2021[tune](deps): Bump flaml from 0.5.2 to 0.6.9 in /python/requirements/tune — goliaro/ray0 reactions · 1 comment
- Oct 9, 2021[tune](deps): Bump flaml from 0.5.2 to 0.6.6 in /python/requirements/tune — zhisbug/ray0 reactions · 3 comments
- Sep 25, 2021[tune](deps): Bump flaml from 0.5.2 to 0.6.4 in /python/requirements/tune — holdenk/ray0 reactions · 1 comment
- Sep 25, 2021[tune](deps): Bump flaml from 0.5.2 to 0.6.4 in /python/requirements/tune — architkulkarni/ray0 reactions · 13 comments
- Sep 25, 2021[tune](deps): Bump flaml from 0.5.2 to 0.6.4 in /python/requirements/tune — antoine-galataud/ray0 reactions · 11 comments
On Hacker News · 1
- Jul 23, 2021Flaml – Cost-effective hyperparameter optimization AutoML1 point
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
23 rules. About 0 are common, 18 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 68
Import sorting: Use isort (via Ruff)
- Distinctive: line 73
Follow Black formatting conventions
- Distinctive: line 74
Keep imports sorted and organized
- Distinctive: line 75
Avoid unused imports (F401) - these are flagged but not auto-fixed
- Distinctive: line 76
Avoid wildcard imports (F403) where possible
- Distinctive: line 78
Use type hints where appropriate
- Distinctive: line 79
Write clear docstrings for public APIs
- Distinctive: line 106
Write tests for new functionality
- Distinctive: line 107
Ensure tests pass on multiple Python versions (3.10, 3.11, 3.12 and 3.13)
- Very specific: line 109
Use pytest markers for platform-specific tests (e.g., @pytest.mark.spark)
- Very specific: line 111
Use --reruns 2 --reruns-delay 10 for flaky tests
- Distinctive: line 124
Create feature branches from main
- Distinctive: line 129
Use clear, descriptive commit messages
- Very specific: line 131
ALWAYS run pre-commit run --all-files before each commit to avoid formatting issues
- Distinctive: line 135
Ensure all tests pass before requesting review
- Distinctive: line 136
Update documentation if adding new features
- Very specific: line 137
Follow the PR template in .github/PULL_REQUEST_TEMPLATE.md
- Distinctive: line 205
Never commit secrets or API keys
- Distinctive: line 208
Follow secure coding practices for ML operations
- Distinctive: line 228
Consider computational cost when adding new features
- Distinctive: line 234
Update documentation when adding new features
- Distinctive: line 236
Add notebook examples for significant new features
- Very specific: line 240
Follow the contributing guide: https://microsoft.github.io/FLAML/docs/Contribute
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Copilot Instructions for FLAML
Project Overview
FLAML (Fast Library for Automated Machine Learning & Tuning) is a lightweight Python library for efficient automation of machine learning and AI operations. It automates workflow based on large language models, machine learning models, etc. and optimizes their performance.
Key Components:
flaml/automl/: AutoML functionality for classification and regressionflaml/tune/: Generic hyperparameter tuningflaml/default/: Zero-shot AutoML with default configurationsflaml/autogen/: Legacy autogen code (note: AutoGen has moved to a separate repository)flaml/fabric/: Microsoft Fabric integrationtest/: Comprehensive test suite
Build and Test Commands
Installation
# Basic installation
pip install -e .
# Install with test dependencies
pip install -e .[test]
# Install with automl dependencies
pip install -e .[automl]
# Install with forecast dependencies (Linux only)
pip install -e .[forecast]Running Tests
# Run all tests (excluding autogen)
pytest test/ --ignore=test/autogen --reruns 2 --reruns-delay 10
# Run tests with coverage
coverage run -a -m pytest test --ignore=test/autogen --reruns 2 --reruns-delay 10
coverage xml
# Check dependencies
python test/check_dependency.pyLinting and Formatting
# Run pre-commit hooks
pre-commit run --all-files
# Format with black (line length: 120)
black . --line-length 120
# Run ruff for linting and auto-fix
ruff check . --fixCode Style and Formatting
Python Style
- Line length: 120 characters (configured in both Black and Ruff)
- Formatter: Black (v23.3.0+)
- Linter: Ruff with Pyflakes and pycodestyle rules
- Import sorting: Use isort (via Ruff)
- Python version: Supports Python >= 3.10 (full support for 3.10, 3.11, 3.12 and 3.13)
Code Quality Rules
- Follow Black formatting conventions
- Keep imports sorted and organized
- Avoid unused imports (F401) - these are flagged but not auto-fixed
- Avoid wildcard imports (F403) where possible
- Complexity: Max McCabe complexity of 10
- Use type hints where appropriate
- Write clear docstrings for public APIs
Pre-commit Hooks
The repository uses pre-commit hooks for:
- Checking for large files, AST syntax, YAML/TOML/JSON validity
- Detecting merge conflicts and private keys
- Trailing whitespace and end-of-file fixes
- pyupgrade for Python 3.8+ syntax
- Black formatting
- Markdown formatting (mdformat with GFM and frontmatter support)
- Ruff linting with auto-fix
Testing Strategy
Test Organization
- Tests are in the
test/directory, organized by module test/automl/: AutoML feature teststest/tune/: Hyperparameter tuning teststest/default/: Zero-shot AutoML teststest/nlp/: NLP-related teststest/spark/: Spark integration tests
Test Requirements
- Write tests for new functionality
- Ensure tests pass on multiple Python versions (3.10, 3.11, 3.12 and 3.13)
- Tests should work on both Ubuntu and Windows
- Use pytest markers for platform-specific tests (e.g.,
@pytest.mark.spark) - Tests should be idempotent and not depend on external state
- Use
--reruns 2 --reruns-delay 10for flaky tests
Coverage
- Aim for good test coverage on new code
- Coverage reports are generated for Python 3.11 builds
- Coverage reports are uploaded to Codecov
Git Workflow and Best Practices
Branching
- Main branch:
main - Create feature branches from
main - PR reviews are required before merging
Commit Messages
- Use clear, descriptive commit messages
- Reference issue numbers when applicable
- ALWAYS run
pre-commit run --all-filesbefore each commit to avoid formatting issues
Pull Requests
- Ensure all tests pass before requesting review
- Update documentation if adding new features
- Follow the PR template in
.github/PULL_REQUEST_TEMPLATE.md - ALWAYS run
pre-commit run --all-filesbefore each commit to avoid formatting issues
Project Structure
flaml/
├── automl/ # AutoML functionality
├── tune/ # Hyperparameter tuning
├── default/ # Zero-shot AutoML
├── autogen/ # Legacy autogen (deprecated, moved to separate repo)
├── fabric/ # Microsoft Fabric integration
├── onlineml/ # Online learning
└── version.py # Version information
test/ # Test suite
├── automl/
├── tune/
├── default/
├── nlp/
└── spark/
notebook/ # Example notebooks
website/ # Documentation websiteDependencies and Package Management
Core Dependencies
- NumPy >= 1.17
- Python >= 3.10 (officially supported: 3.10, 3.11, 3.12 and 3.13)
Optional Dependencies
[automl]: lightgbm, xgboost, scipy, pandas, scikit-learn[test]: Full test suite dependencies[spark]: PySpark and joblib dependencies[forecast]: holidays, prophet, statsmodels, hcrystalball, pytorch-forecasting, pytorch-lightning, tensorboardX[hf]: Hugging Face transformers and datasets- See
setup.pyfor complete list
Version Constraints
- Be mindful of Python version-specific dependencies (check setup.py)
- XGBoost versions differ based on Python version
- NumPy 2.0+ only for Python >= 3.13
- Some features (like vowpalwabbit) only work with older Python versions
Boundaries and Restrictions
Do NOT Modify
.git/directory and Git configurationLICENSEfile- Version information in
flaml/version.py(unless explicitly updating version) - GitHub Actions workflows without careful consideration
- Existing test files unless fixing bugs or adding coverage
Be Cautious With
setup.py: Changes to dependencies should be carefully reviewedpyproject.toml: Linting and testing configuration.pre-commit-config.yaml: Pre-commit hook configuration- Backward compatibility: FLAML is a library with external users
Security Considerations
- Never commit secrets or API keys
- Be careful with external data sources in tests
- Validate user inputs in public APIs
- Follow secure coding practices for ML operations
Special Notes
AutoGen Migration
- AutoGen has moved to a separate repository: https://github.com/microsoft/autogen
- The
flaml/autogen/directory contains legacy code - Tests in
test/autogen/are ignored in the main test suite - Direct users to the new AutoGen repository for AutoGen-related issues
Platform-Specific Considerations
- Some tests only run on Linux (e.g., forecast tests with prophet)
- Windows and Ubuntu are the primary supported platforms
- macOS support exists but requires special libomp setup for lgbm/xgboost
Performance
- FLAML focuses on efficient automation and tuning
- Consider computational cost when adding new features
- Optimize for low resource usage where possible
Documentation
- Main documentation: https://microsoft.github.io/FLAML/
- Update documentation when adding new features
- Provide clear examples in docstrings
- Add notebook examples for significant new features
Contributing
- Follow the contributing guide: https://microsoft.github.io/FLAML/docs/Contribute
- Sign the Microsoft CLA when making your first contribution
- Be respectful and follow the Microsoft Open Source Code of Conduct
- Join the Discord community for discussions: https://discord.gg/Cppx2vSPVP
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

