autogen/website/docs/Installation.md
Chi Wang 5387a0a607
Agent notebook example with human feedback; Support shell command and multiple code blocks; Improve the system message for assistant agent; Improve utility functions for config lists; reuse docker image (#1056)
* add agent notebook and documentation

* fix bug

* set flush to True when printing msg in agent

* add a math problem in agent notebook

* remove

* header

* improve notebook doc

* notebook update

* improve notebook example

* improve doc

* agent notebook example with user feedback

* log

* log

* improve notebook doc

* improve print

* doc

* human_input_mode

* human_input_mode str

* indent

* indent

* Update flaml/autogen/agent/user_proxy_agent.py

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* shell command and multiple code blocks

* Update notebook/autogen_agent.ipynb

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* Update notebook/autogen_agent.ipynb

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* Update notebook/autogen_agent.ipynb

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* coding agent

* math notebook

* renaming and doc format

* typo

* infer lang

* sh

* docker

* docker

* reset consecutive autoreply counter

* fix explanation

* paper talk

* human feedback

* web info

* rename test

* config list explanation

* link to blogpost

* installation

* homepage features

* features

* features

* rename agent

* remove notebook

* notebook test

* docker command

* notebook update

* lang -> cmd

* notebook

* make it work for gpt-3.5

* return full log

* quote

* docker

* docker

* docker

* docker

* docker

* docker image list

* notebook

* notebook

* use_docker

* use_docker

* use_docker

* doc

* agent

* doc

* abs path

* pandas

* docker

* reuse docker image

* context window

* news

* print format

* pyspark version in py3.8

* pyspark in py3.8

* pyspark and ray

* quote

* pyspark

* pyspark

* pyspark

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-06-09 18:40:04 +00:00

4.1 KiB

Installation

Python

FLAML requires Python version >= 3.7. It can be installed from pip:

pip install flaml

or conda:

conda install flaml -c conda-forge

Optional Dependencies

Auto Generation

pip install "flaml[autogen]"

Task-oriented AutoML

pip install "flaml[automl]"

Extra learners/models

  • openai models
pip install "flaml[openai]"
  • catboost
pip install "flaml[catboost]"
  • vowpal wabbit
pip install "flaml[vw]"
  • time series forecaster: prophet, statsmodels
pip install "flaml[forecast]"
  • huggingface transformers
pip install "flaml[hf]"

Notebook

To run the notebook examples, install flaml with the [notebook] option:

pip install "flaml[notebook]"

Distributed tuning

  • ray
pip install "flaml[ray]"
  • spark

Spark support is added in v1.1.0

pip install "flaml[spark]>=1.1.0"

For cloud platforms such as Azure Synapse, Spark clusters are provided. But you may also need to install Spark manually when setting up your own environment. For latest Ubuntu system, you can install Spark 3.3.0 standalone version with below script. For more details of installing Spark, please refer to Spark Doc.

sudo apt-get update && sudo apt-get install -y --allow-downgrades --allow-change-held-packages --no-install-recommends \
    ca-certificates-java ca-certificates openjdk-17-jdk-headless \
    && sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*
wget --progress=dot:giga "https://www.apache.org/dyn/closer.lua/spark/spark-3.3.0/spark-3.3.0-bin-hadoop2.tgz?action=download" \
    -O - | tar -xzC /tmp; archive=$(basename "spark-3.3.0/spark-3.3.0-bin-hadoop2.tgz") \
    bash -c "sudo mv -v /tmp/\${archive/%.tgz/} /spark"
export SPARK_HOME=/spark
export PYTHONPATH=/spark/python/lib/py4j-0.10.9.5-src.zip:/spark/python
export PATH=$PATH:$SPARK_HOME/bin
  • nni
pip install "flaml[nni]"
  • blendsearch
pip install "flaml[blendsearch]"
  • synapse

To install flaml in Azure Synapse and similar cloud platform

pip install flaml[synapse]

Test and Benchmark

  • test
pip install flaml[test]
  • benchmark
pip install flaml[benchmark]

.NET

FLAML has a .NET implementation in ML.NET, an open-source, cross-platform machine learning framework for .NET.

You can use FLAML in .NET in the following ways:

Low-code

  • Model Builder - A Visual Studio extension for training ML models using FLAML. For more information on how to install the, see the install Model Builder guide.
  • ML.NET CLI - A dotnet CLI tool for training machine learning models using FLAML on Windows, MacOS, and Linux. For more information on how to install the ML.NET CLI, see the install the ML.NET CLI guide.

Code-first

  • Microsoft.ML.AutoML - NuGet package that provides direct access to the FLAML AutoML APIs that power low-code solutions like Model Builder and the ML.NET CLI. For more information on installing NuGet packages, see the install and use a NuGet package in Visual Studio or dotnet CLI guides.

To get started with the ML.NET API and AutoML, see the csharp-notebooks.