Show HN:Plexer – 通过提示词创建机器学习模型
Show HN: Plexe – ML Models from a Prompt

原始链接: https://github.com/plexe-ai/plexe

Plexe 简化了机器学习过程,允许用户使用简单的英文创建模型。该系统利用人工智能驱动的多智能体架构来分析需求、规划解决方案、生成代码和评估性能。用户可以用自然语言定义模型,指定意图、输入模式和输出模式。 Plexe 支持使用单个命令自动构建模型,允许配置数据集、大型语言模型提供商(如 OpenAI、Anthropic、Ollama、Hugging Face)、最大迭代次数和超时时间。利用 Ray 进行分布式训练可以实现更快的并行处理。该工具还提供数据生成和模式推断功能。 安装非常简单,只需使用 `pip` 命令即可,并可以选择轻量级或完整依赖项。用户需要为其选择的 LLM 提供商设置 API 密钥。Plexe 是开源的(Apache-2.0 许可)。

Vaibhav和Marcello推出了Plexe,一个开源代理,可以使用自然语言描述创建训练好的机器学习模型。该工具解决了机器学习模型开发缓慢且复杂的问题。Plexe采用“代理团队”方法,利用大型语言模型(LLM)生成针对特定任务的模型,并利用用户数据进行训练。专门的代理,例如“机器学习科学家”,会提出解决方案、实现代码并管理训练过程,并使用MLFlow跟踪实验。 Plexe专注于处理结构化数据的预测问题,例如预测受伤风险或产品推荐。用户可以上传CSV或Parquet格式的数据。未来的发展包括用于数据转换的“特征工程代理”。 初步反馈表明,用户希望获得更多交互式控制,特别是能够审查和修改代理的计划。为了扩展到更复杂的模型,需要更好地了解训练运行情况,更多的用户控制以及并行模型实验。开发者承认,评估数据质量和设计特征对于成功的机器学习实施至关重要。

原文

PyPI version Discord

backed-by-yc

Build machine learning models using natural language.

Quickstart | Features | Installation | Documentation

plexe lets you create machine learning models by describing them in plain language. Simply explain what you want, and the AI-powered system builds a fully functional model through an automated agentic approach. Also available as a managed cloud service.

demo.mp4

You can use plexe as a Python library to build and train machine learning models:

import plexe

# Define the model
model = plexe.Model(
    intent="Predict sentiment from news articles",
    input_schema={"headline": str, "content": str},
    output_schema={"sentiment": str}
)

# Build and train the model
model.build(
    datasets=[your_dataset],
    provider="openai/gpt-4o-mini",
    max_iterations=10
)

# Use the model
prediction = model.predict({
    "headline": "New breakthrough in renewable energy",
    "content": "Scientists announced a major advancement..."
})

# Save for later use
plexe.save_model(model, "sentiment-model")
loaded_model = plexe.load_model("sentiment-model.tar.gz")

2.1. 💬 Natural Language Model Definition

Define models using plain English descriptions:

model = plexe.Model(
    intent="Predict housing prices based on features like size, location, etc.",
    input_schema={"square_feet": int, "bedrooms": int, "location": str},
    output_schema={"price": float}
)

2.2. 🤖 Multi-Agent Architecture

The system uses a team of specialized AI agents to:

  • Analyze your requirements and data
  • Plan the optimal model solution
  • Generate and improve model code
  • Test and evaluate performance
  • Package the model for deployment

2.3. 🎯 Automated Model Building

Build complete models with a single method call:

model.build(
    datasets=[dataset_a, dataset_b],
    provider="openai/gpt-4o-mini",  # LLM provider
    max_iterations=10,              # Max solutions to explore
    timeout=1800                    # Optional time limit in seconds
)

2.4. 🚀 Distributed Training with Ray

Plexe supports distributed model training and evaluation with Ray for faster parallel processing:

from plexe import Model

# Optional: Configure Ray cluster address if using remote Ray
# from plexe import config
# config.ray.address = "ray://10.1.2.3:10001"

model = Model(
    intent="Predict house prices based on various features",
    distributed=True  # Enable distributed execution
)

model.build(
    datasets=[df],
    provider="openai/gpt-4o-mini"
)

Ray distributes your workload across available CPU cores, significantly speeding up model generation and evaluation when exploring multiple model variants.

2.5. 🎲 Data Generation & Schema Inference

Generate synthetic data or infer schemas automatically:

# Generate synthetic data
dataset = plexe.DatasetGenerator(
    schema={"features": str, "target": int}
)
dataset.generate(500)  # Generate 500 samples

# Infer schema from intent
model = plexe.Model(intent="Predict customer churn based on usage patterns")
model.build(provider="openai/gpt-4o-mini")  # Schema inferred automatically

2.6. 🌐 Multi-Provider Support

Use your preferred LLM provider, for example:

model.build(provider="openai/gpt-4o-mini")          # OpenAI
model.build(provider="anthropic/claude-3-opus")     # Anthropic
model.build(provider="ollama/llama2")               # Ollama
model.build(provider="huggingface/meta-llama/...")  # Hugging Face    

See LiteLLM providers for instructions and available providers.

Note

Plexe should work with most LiteLLM providers, but we actively test only with openai/* and anthropic/* models. If you encounter issues with other providers, please let us know.

3.1. Installation Options

pip install plexe                  # Standard installation
pip install plexe[lightweight]     # Minimal dependencies
pip install plexe[all]             # With deep learning support
# Set your preferred provider's API key
export OPENAI_API_KEY=<your-key>
export ANTHROPIC_API_KEY=<your-key>
export GEMINI_API_KEY=<your-key>

See LiteLLM providers for environment variable names.

For full documentation, visit docs.plexe.ai.

See CONTRIBUTING.md for guidelines. Join our Discord to connect with the team.

Apache-2.0 License

If you use Plexe in your research, please cite it as follows:

@software{plexe2025,
  author = {De Bernardi, Marcello AND Dubey, Vaibhav},
  title = {Plexe: Build machine learning models using natural language.},
  year = {2025},
  publisher = {GitHub},
  howpublished = {\url{https://github.com/plexe-ai/plexe}},
}
联系我们 contact @ memedata.com