Commit Graph

376 Commits

Author SHA1 Message Date
Li Jiang fb1230e0c8
Add a sample notebook for using AutoGen in Microsoft Fabric (#940)
* Add fabric example

* Support both 0.1.x and 0.2.x

* Fix comments

* update ecosystem

* update png

---------

Co-authored-by: “skzhang1” <“shaokunzhang529@gmail.com”>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-04 14:16:22 +00:00
Yiran Wu 6bf33dfede
[Core] Fix update_usage_summary when response doesn't have usage attribute (#1008)
* update cost for cache

* fix test

* fix bug when reponse doesn't have usage info

* update setupversion

* update

* update

* Update setup.py

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

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-04 00:40:21 +00:00
Shaokun Zhang dd516f250e
AgentOptimizer (#1053)
* first

* first

* update figure

* update figure

* update txt+figure

* format

* blog

* blog update

* format

* update

* update

* rename notebook

* rename

---------

Co-authored-by: “skzhang1” <“shaokunzhang529@gmail.com”>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu>
2023-12-27 06:06:48 +00:00
Davor Runje 4b5ec5a52f
Add decorator for function calling (#1018)
* add function decorator to converasble agent

* polishing

* polishing

* added function decorator to the notebook with async function calls

* added support for return type hint and JSON encoding of returned value if needed

* polishing

* polishing

* refactored async case

* Python 3.8 support added

* polishing

* polishing

* missing docs added

* refacotring and changes as requested

* getLogger

* documentation added

* test fix

* test fix

* added testing of agentchat_function_call_currency_calculator.ipynb to test_notebook.py

* added support for Pydantic parameters in function decorator

* polishing

* Update website/docs/Use-Cases/agent_chat.md

Co-authored-by: Li Jiang <bnujli@gmail.com>

* Update website/docs/Use-Cases/agent_chat.md

Co-authored-by: Li Jiang <bnujli@gmail.com>

* fixes problem with logprob parameter in openai.types.chat.chat_completion.Choice added by openai version 1.5.0

* get 100% code coverage on code added

* updated docs

* default values added to JSON schema

* serialization using json.dump() add for values not string or BaseModel

* added limit to openai version because of breaking changes in 1.5.0

* added line-by-line comments in docs to explain the process

* polishing

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
2023-12-25 16:07:20 +00:00
Adi Garg a97269634f
Autobuild notebook minor fix (#1049)
* Add python version requirement

* Add relevant blog link

* wording and grammar

* minor wording a grammar issue
2023-12-24 05:09:13 +00:00
gagb a0288e081b
Add examples constrained generation + multi-step reasoning via Guidance + AutoGen (#937)
* Add examples of constrained generation

* Add guidance based coder that always returns valid code blocks

* Add guidance based agent that always generates a valid json

* Add link to guidance nb
2023-12-20 23:04:05 +00:00
gagb 03b819bdf2
Add async test (#520)
* Add example nb for async funcs

* Add a notebook based test for async function calls

* Update nb

* Update nb

* Remove duplicate code

* Rename func for consistency

* Fix bug

* Add intro text for cmd cell 4

* Add a short comment on await

* Update agentchat_function_call_async.ipynb

Minor typo

* Add link to nb

---------

Co-authored-by: Joshua Kim <joshkyh@users.noreply.github.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-12-19 19:01:23 +00:00
Yiran Wu fd84ef1970
Raise error when function as llm_config passed to GroupChatManager (#911)
* fix groupchat selection

* update

* update notbooks

* update

* update
2023-12-10 01:33:46 +00:00
kittyandrew 6e2387192f
Make groupchat & generation async, actually (#543)
* make groupchat & generation async actually

* factored out func call pre-select; updated indecies

* fixed code format issue

* mark prepare agents subset as internal

* func renaming

* func inputs

* return agents

* Update test/agentchat/test_async.py

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

* Update notebook/agentchat_stream.ipynb

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

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-12-09 20:50:36 +00:00
chengxuan233 1b4fb8fb72
Adding a notebook demostrating video transcript translate with whisper in AutoGen (#881)
* add agentchat_video_transcript_translate.ipynb

* finish the agentchat_video_transcript_translate.ipynb file notebook

* modify the recognize_transcript_from_video function

* run the script and add the output to the notebook

* implement the notebook

* add the link to the video clip

* rename the file and add the version requirement of each packages

* add the new notebook path

* add the notebook path to Example.md

* add the new notebook path to the new example.md

* add the instruction of FFmpeg and video download

* Update Examples.md

* Update Examples.md

* Update Examples.md

* Update Examples.md

* Delete notebook/agentchat_video_transcript_translate.ipynb

* Update Examples.md and add the link

---------

Co-authored-by: silver233jpg <60947716+silver233jpg@users.noreply.github.com>
2023-12-07 20:11:15 +00:00
axa99 195c87e309
corrected openai utils example (#869) 2023-12-05 19:13:13 +00:00
Joshua Kim bb2bb8ed37
Clarifies #853 (#876) 2023-12-05 14:30:46 +00:00
Ian 26f6e0cfb2
add a verbose flag to print more information of runtime (#717)
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-12-04 15:02:32 +00:00
Qingyun Wu c3cebd7efe
Minor grammar and wording issues (#854)
* wording

* grammar and wording

* readability suggested by shruti222patel

* period
2023-12-04 02:57:06 +00:00
Linxin Song 83f0c744b2
Testing AutoBuild (#846)
* init notebook for agent set up

* complete AgentCreator

* AgentCreator first step features completed.

* update AgentCreator

* update AgentCreator

* update AgentCreator (modify params of build)

* [update AgentCreator] add auto judgement of coding

* add autobuild

* rename autobuild notebook

* Add step-by-step command.

* modify name

* fix bugs

* update for new openai api

* add example

* add load_config, save_config, and add task in build and start

* modify notebook

* rewrite save and load function; update notebook

* update description

* update description

* update description

* change member variable of agent_creator.py

* update notebook

* new feature: auto-generate agent name and system message

* new feature: add gpts support

* update notebook

* update notebook

* beautify; add docstring for build

* Update notebook; PR version

* typo

* update notebook

* fix typo

* try to run llama

* try to run llama

* switch api_base to base_url

* add details for Step 6; add print in clear_all_agents()

* Change description of Step 5

* delete ASSISTANT_CONFIG_LIST

* add Linxin to blog authors

* add blog

* Update index.mdx

* add test; add user proxy constrain; change show case in notebook

* modify blog for test

* change test file name; modify test

* modify test

* modify test

* add try/catch for dependency

* add version requirement for openai

* add exception for DistributionNotFound error

* add requirement

* change assertion

* rename test; modify index.mdx

* change config file name

* Update agent_chat.md

* Update agent_chat.md

* Update AgentChat.md

* complete blog; fix typos in notebook

* add autobuild banner

* try to merge

* Update Examples.md

* update test

* skip if openai not installed

* pre-commit

* Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx

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

* update contrib-openai.yml

* change pull_request_target to pull_request

* disable other openai tests

* address issues from ekzhu; modify notebook; modify blog; modify test

* update test example

* update test

* Update agent_chat.md

* Update Examples.md

* address issues from qingyun; update agent_builder.py; update notebook

* recover contrib-openai.yml

* pre-commit solve

---------

Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu>
Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-12-04 02:12:26 +00:00
Qingyun Wu 02593ff7be
Add examples (#851)
* add human involvement

* citation

* AgentEval and invalid links

* numbering

* add cost to documentation

* add cost notebook

* oai config list utilities

* add utility link

* title
2023-12-03 23:46:38 +00:00
Yiran Wu 7a4ba1a732
Add cost summary to client.py (#812)
* init commit

* add doc, notebook and test

* fix test

* update

* update

* update

* update
2023-12-03 21:06:46 +00:00
Shobhit Vishnoi 5c92fb378b
Register async human input handler (#794)
* Update conversable_agent.py

* Add files via upload

* Delete notebook/Async_human_input.ipynb

* Add files via upload

* refactor:formatter

* feat:updated position

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-12-03 16:45:24 +00:00
Beibin Li c19f234149
Message "content" now supports both `str` and `List` in Agents (#713)
* Change "content" type in Conversable Agent

* content and system_message support str and List
Update for all other agents

* Content_str now also takes None as input

* Group Chat now works with LMM too

* Style: newline for import in Conversable Agentt

* Add test for gourpchat + lmm

* Resolve comments
1. Undo AssistantAgent changes
2. Modify the asserts and raises in `content_str` function and update
test accordingly.

* Undo AssistantAgent

* Update comments and add assertion for LMM

* Typo fix in docstring for content_str

* Remove “None” out conversable_agent.py

* Lint message to dict in multimodal_conversable_agent.py

* Address lint issues

* linting

* Move lmm test into contrib test

* Resolve 2 comments

* Move img_utils into contrib folder

* Resolve img_utils path issues
2023-12-03 01:40:50 +00:00
Nicolas Marchildon 17c51fd2f0
Enable defining new functions after agent creation (#285)
* Enable defining new functions after agent creation

* Add notebook for function inception example

* format

* 1. fix bug 2. support remove function

* 1. fix bug 2. support remove function

* 1. add example doc 2. change test file 3. change ipynb title

* Update website/docs/Examples.md

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: “skzhang1” <“shaokunzhang529@gmail.com”>
Co-authored-by: Shaokun Zhang <shaokunzhang529@gmail.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-12-02 01:05:54 +00:00
Ricky Loynd 0468f53210
Restore TeachableAgent tests (#761)
* Update chat_with_teachable_agent.py to v2.

* Update agentchat_teachability.ipynb to v2.

* Add test of teachability accuracy.

* Update installation instructions.

* Add to contrib tests.

* pre-commit fixes

* Apply reviewer suggestions to test workflows.
2023-11-27 02:10:02 +00:00
Beibin Li 6087b5a4f8
Add DALLE Notebook Example (#744)
* Add DALLE Example

* md update for notebook

* Update notebook/agentchat_dalle_and_gpt4v.ipynb

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-11-24 15:19:42 +00:00
gagb 8f7f870814
Update agentchat_oai_assistant_retrieval.ipynb (#732)
* Update agentchat_oai_assistant_retrieval.ipynb

our -> your to reduce confusion

* Update notebook/agentchat_oai_assistant_retrieval.ipynb

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

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-11-22 21:23:08 +00:00
Joshua Kim 9d2ee46ebc
Controlling select_speaker using Graph Modelling Language (#720)
* Completed notebook on using GML

* Added optional dependencies for graph

* Run pre-commit

* Added pytest

* Added LLM to pick an agent before catch-all

* Updated website links to notebook

* Reviewer's suggestions

* pre-commit checked

* pre-commit passed

* Change beta version
2023-11-22 20:36:52 +00:00
Julia Kiseleva 19c7da2dd1
Adding first version of AgentEval -- a framework for assessing task utility for LLM-powered applications (#681)
* add agenteval-notebook for math problems and the blog post about it

* update gitignore

* updates to notebook

* adding folder for the logs

* adding math problems logs

* adding folder for alfworld logs

* added limitiation and future work to blog post

* minor edits blog post

* adding changes

* reorg

* modify the main notebook

* modification of the main notebook

* remove wrong notebook

* uploading new notebook

* update agenteval notebook

* change the sample

* Update agenteval_cq_math.ipynb

* adding final changes to notebook

* updated framework picture

* Update index.mdx

* Update index.md

* Add files via upload

* updates to notebool

* revise the blog

* revise the blog

* update the agent img

* revise the blog

* revise the blog

* Excluded model logs from the main branch, you can find them in agenteval branch

* Fixed pre-commit formatting.

* Update website/blog/2023-11-11-AgentEval/index.mdx

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

* update gitignore

* update index.mdx

* update authors.yml by adding Negar and Julia

* remove md file

* remove md file

* update gitignore

* update authors file

* pre-commit checks

* pre-commit checks on authors.yml

* pre-commit checks on authors.yml

* update index.mdx

* update authors.yml by adding Negar and Julia

* updated the blog-post version 1

* updated the blog-post: TL;DR is ready

* updated the blog-post: first part of introduction is ready

* updated figures: typos on fig 1, changed terminology on the fig 2

* upadated the Framework part

* fixed redering issues

* upload zip file instead of single samples

* update prealgebra.zip

* update

* upload

* update z

* update naming

* update zip

* update the agenteval notebook

* update the notebook - removing unmercenary logs

* updated fig 1 and references to it

* updated fig 1

* incorporated PR comments

* merged agenteval branch

* final changes to the blog

* updated taxonomy

* update notebook

* minor changes to the blog

* Fixed formatting

* Update the link in agenteval_cq_math.ipynb

* update the blog and link in notebook

* Update index.mdx

* change folder name

* Changes to be committed:
	modified:    OAI_CONFIG_LIST_sample.txt

* add sample OAI file

* fix the url link to colab and typos

* fix the url link to colab and typos

* add authors

* update profile pic

* "update authors"

* fixing the problem in test_groupchat.py

* update the title lower case

* reverting changes in setup.py

* rerun pre-commit

---------

Co-authored-by: Negar Arabzadeh <ngr.arabzadeh@gmail.com>
Co-authored-by: Julia Kiseleva <jukisele@microsoft.com>
Co-authored-by: afourney <adamfo@microsoft.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-11-21 04:07:33 +00:00
Li Jiang 07646d448c
Support custom text formats and recursive (#496)
* Add custom text types and recursive

* Add custom text types and recursive

* Fix format

* Update qdrant, Add pdf to unstructured

* Use unstructed as the default text extractor if installed

* Add tests for unstructured

* Update tests env for unstructured

* Fix error if last message is a function call, issue #569

* Remove csv, md and tsv from UNSTRUCTURED_FORMATS

* Update docstring of docs_path

* Update test for get_files_from_dir

* Update docstring of custom_text_types

* Fix missing search_string in update_context

* Add custom_text_types to notebook example
2023-11-21 03:53:50 +00:00
Li Jiang 370ebf5e00
Update speaker selector in GroupChat and update some notebooks (#688)
* Add speaker selection methods

* Update groupchat RAG

* Update seed to cache_seed

* Update RetrieveChat notebook

* Update parameter name

* Add test

* Add more tests

* Add mock to test

* Add mock to test

* Fix typo speaking

* Add gracefully exit manual input

* Update round_robin docstring

* Add method checking

* Remove participant roles

* Fix versions in notebooks

* Minimize installation overhead

* Fix missing lower()

* Add comments for try_count 3

* Update warning for n_agents < 3

* Update warning for n_agents < 3

* Add test_n_agents_less_than_3

* Add a function for manual select

* Update version in notebooks

* Fixed bugs that allow speakers to go twice in a row even when allow_repeat_speaker = False

---------

Co-authored-by: Adam Fourney <adamfo@microsoft.com>
2023-11-17 13:56:11 +00:00
gagb fe0092516b
Add RAG gptassistant example notebook (#694)
* Add RAG gptassistant example notebook

* add notebook links

* Update notebook md

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-11-16 17:15:21 +00:00
LeoLjl 4711260582
Add agentchat_oai_assistant_groupchat.ipynb (#656)
* Add agentchat_oai_assistant_groupchat.ipynb

* Update notebook/agentchat_oai_assistant_groupchat.ipynb

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

* Update agentchat_oai_assistant_groupchat.ipynb

* Update notebook/agentchat_oai_assistant_groupchat.ipynb

* Update notebook/agentchat_oai_assistant_groupchat.ipynb

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-11-13 17:47:00 +00:00
LeoLjl 6d621a9840
Add openai_client as property and update notebook. (#654)
* Initial commit

* Add code interpreter notebook.

* Update code interpreter notebook.

* Update notebook.

* Update agentchat_oai_code_interpreter.ipynb

* Update agentchat_oai_code_interpreter.ipynb

* Add openai_client as property.

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-11-13 13:21:20 +00:00
LeoLjl 991d2066d5
Add code interpreter for GptAssistant Notebook. (#644)
* Initial commit

* Add code interpreter notebook.

* Update code interpreter notebook.

* Update notebook.

* Update agentchat_oai_code_interpreter.ipynb

* Update agentchat_oai_code_interpreter.ipynb

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-11-13 04:02:38 +00:00
Ian 9a216b1deb
Openai assistant function usage notebook (#639)
* add oai assistant function call

* polish

* add titles

* polish

* Update notebook/agentchat_oai_assistant_function_call.ipynb

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

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-11-12 17:59:46 +00:00
gagb 032c05e954
Add basic notebook for gptassistant (#636)
* Refactor GPTAssistantAgent constructor to handle
instructions and overwrite_instructions flag

- Ensure that `system_message` is always consistent with `instructions`
- Ensure provided instructions are always used
- Add option to permanently modify the instructions of the assistant

* Improve default behavior

* Add a test; add method to delete assistant

* Add a new test for overwriting instructions

* Add test case for when no instructions are given for existing assistant

* Add pytest markers to test_gpt_assistant.py

* add test in workflow

* update

* fix test_client_stream

* comment out test_hierarchy_

* Add basic gptassistant notebook

- also improve logging in gpt assistant

* Update notebook/agentchat_oai_assistant_twoagents_basic.ipynb

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: kevin666aa <yrwu000627@gmail.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-11-12 17:07:10 +00:00
Li Jiang ff414892c4
Fix docstring of get_or_create (#583)
* Fix docstring of get_or_create

* Improve docstring
2023-11-12 03:10:58 +00:00
Yiran Wu 805d8452c4
Fix test error of compressible agent (#631)
* fix bug in test

* update workflow

* update

* deepcopy to copy
2023-11-11 19:57:14 +00:00
Andreas Volkmann b1e69bf2f2
Update oai_completion.ipynb (#623)
Missing import
2023-11-11 00:50:59 +00:00
Yiran Wu 19ea8b8b7a
Add CompressibleAgent (#443)
* api_base -> base_url (#383)

* InvalidRequestError -> BadRequestError (#389)

* remove api_key_path; close #388

* close #402 (#403)

* openai client (#419)

* openai client

* client test

* _client -> client

* _client -> client

* extra kwargs

* Completion -> client (#426)

* Completion -> client

* Completion -> client

* Completion -> client

* Completion -> client

* support aoai

* fix test error

* remove commented code

* support aoai

* annotations

* import

* reduce test

* skip test

* skip test

* skip test

* debug test

* rename test

* update workflow

* update workflow

* env

* py version

* doc improvement

* docstr update

* openai<1

* add compressibleagent

* revise doc, add tests, add example

* fix link

* fix link

* fix link

* remove test

* update doc

* update doc

* add tiktoken to dependency

* filter_func

* async test

* dependency

* revision

* migration guide (#477)

* migration guide

* change in kwargs

* simplify header

* update optigude description

* update for dev

* revision

* revision

* allow not compressing last n msgs

* update

* correct merge

* update test workflow

* check test

* update for test

* update

* update notebook

* update

* fix bug

* update

* update

* update

* check to "pull_request_target" in contrib-openai

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-11-10 04:11:28 +00:00
Chi Wang dfcbea9777
seed -> cache_seed (#600) 2023-11-08 23:39:02 +00:00
Joshua Kim 2a96e4d9d2
Notebook/hierarchy flow (#482)
* Notebook showing how to use select speaker to control conversation flow.

* pytest associated with notebook.

* Added llm_config to assistant and user proxy agent, and clarified why we set use_cache to false, as requested in the review.

* Added a @pytest.mark.skipif decorator like other tests to run it only in one py version, 3.10

* Fixed config warning.

* Removd llm_config to UserProxyAgent

* Fixed minor typos.

* Reran outputs

* Remopved llm_config from user_proxy_agent

* Colab Badge link updated.

* pre-commit formatting changes.

* Fixed base_url

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-11-07 22:06:45 +00:00
Beibin Li b41b366549
Large Multimodal Models in AgentChat (#554)
* LMM Code added

* LLaVA notebook update

* Test cases and Notebook modified for OpenAI v1

* Move LMM into contrib
To resolve test issues and deploy issues
In the future, we can install pillow by default, and then move back
LMM agents into agentchat

* LMM test setup update

* try...except... clause for LMM tests

* disable patch for llava agent test
To resolve dependencies issue for build

* Add LMM Blog

* Change docstring for LMM agents

* Docstring update patch

* llava: insert reply at position 1 now
So, it can still handle human_input_mode
and max_consecutive_reply

* Resolve comments
Fixing: typos, blogs, yml, and add OpenAIWrapper

* Signature typo fix for LMM agent: system_message

* Update LMM "content" from latest OpenAI release
Reference  https://platform.openai.com/docs/guides/vision

* update LMM test according to latest OpenAI release

* Fully support GPT-4V now
1. Add a notebook for GPT-4V. LLava notebook also updated.
2. img_utils updated
3. GPT-4V formatter now return base64 image with mime type
4. Infer mime type directly from b64 image content (while loading
   without suffix)
5. Test cases modified according to all the related changes.

* GPT-4V link updated in blog

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-11-06 21:33:51 +00:00
Chi Wang 306ac4d7f7
copy dicts before modifying (#551)
* copy dicts before modifying

* update notebooks

* update notebooks

* close #567
2023-11-06 21:14:05 +00:00
Chi Wang c4f8b1c761
Dev/v0.2 (#393)
* api_base -> base_url (#383)

* InvalidRequestError -> BadRequestError (#389)

* remove api_key_path; close #388

* close #402 (#403)

* openai client (#419)

* openai client

* client test

* _client -> client

* _client -> client

* extra kwargs

* Completion -> client (#426)

* Completion -> client

* Completion -> client

* Completion -> client

* Completion -> client

* support aoai

* fix test error

* remove commented code

* support aoai

* annotations

* import

* reduce test

* skip test

* skip test

* skip test

* debug test

* rename test

* update workflow

* update workflow

* env

* py version

* doc improvement

* docstr update

* openai<1

* add tiktoken to dependency

* filter_func

* async test

* dependency

* migration guide (#477)

* migration guide

* change in kwargs

* simplify header

* update optigude description

* deal with azure gpt-3.5

* add back test_eval_math_responses

* timeout

* Add back tests for RetrieveChat (#480)

* Add back tests for RetrieveChat

* Fix format

* Update dependencies order

* Fix path

* Fix path

* Fix path

* Fix tests

* Add not run openai on MacOS or Win

* Update skip openai tests

* Remove unnecessary dependencies, improve format

* Add py3.8 for testing qdrant

* Fix multiline error of windows

* Add openai tests

* Add dependency mathchat, remove unused envs

* retrieve chat is tested

* bump version to 0.2.0b1

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
2023-11-04 04:01:49 +00:00
Jason Holtkamp 55d27cccc9
Added example .txt file for agentchat_langchain sample notebook (#373)
* Added example .txt file for agentchat_langchain sample notebook

* Update radius.txt

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-11-02 05:34:05 +00:00
Aaron cde99e05c5
Update FAQ section in documentation (#390)
* UPDATE - FAQ section in documentation

* FIX - formatting test failure

* FIX - added disclaimer

* pre-commit

* Update website/docs/FAQ.md

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

* Update website/docs/FAQ.md

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

* Update website/docs/FAQ.md

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

* UPDATE - notebook and FAQ information for config_list_from_models

---------

Co-authored-by: Ward <award40@LAMU0CLP74YXVX6.uhc.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
2023-10-27 12:52:26 +00:00
Anush 50ac547637
feat: Qdrant vector store support (#303)
* feat: QdrantRetrieveUserProxyAgent

* fix: QdrantRetrieveUserProxyAgent docstring

* chore: batch of 500 all CPU cores

* chore: conditional import for tests

* chore: config parallel, batch 100

* chore: collection creation params

* chore: conditonal payload indexing
fastembed import check

* docs: notebook for QdrantRetrieveUserProxyAgent

* docs: update docs link

* docs: notebook examples update

* chore: hnsw, payload index reference

* docs: notebook docs_path update

* Update test/agentchat/test_qdrant_retrievechat.py

Co-authored-by: Li Jiang <bnujli@gmail.com>

* chore: update notebook output

* Fix format

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
2023-10-25 05:08:43 +00:00
Beibin Li 9932945765
Supporting MultiModal Models: an example with LLaVA Notebook (#286)
* LMM notebook

* Use "register_reply" instead.

* Loop check LLaVA non-empty response

* Run notebook

* Make the llava_call function more flexible

* Include API for LLaVA from Replicate

* LLaVA data format update x2
1. prompt formater function
2. conversation format with SEP

* Coding example added

* Rename "ImageAgent" -> "LLaVAAgent"

* Docstring and comments updates

* Debug notebook: Remote LLaVA tested

* Example 1: remove system message

* MultimodalConversableAgent added

* Add gpt4v_formatter

* LLaVA: update example 1

* LLaVA: Add link to "Table of Content"
2023-10-24 05:26:41 +00:00
Li Jiang f9acb69aea
Update docs in RetrieveChat notebook and Installation (#379)
* Update comments to make it more clear

* Update Installation
2023-10-23 22:28:38 +00:00
Shruti Patel a8da3854c0
Update agentchat_langchain.ipynb (#355)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-10-22 04:58:01 +00:00
Shruti Patel b43d2649cd
Fix the grammar and spelling in agentchat_human_feedback.ipynb (#354)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-10-22 04:57:57 +00:00
Shruti Patel 22635af482
Fix grammar and spelling in agentchat_planning.ipynb (#356)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-10-22 04:56:53 +00:00
Shruti Patel 4c8d4b0b53
Fix grammar in agentchat_stream.ipynb (#357)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-10-22 04:49:49 +00:00
Shruti Patel 1c7fbe5acf
Improve readability for agentchat_two_users.ipynb (#361)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-10-22 04:46:07 +00:00
Shruti Patel 5c2cd99ce8
Fix grammar for agentchat_web_info.ipynb (#362)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-10-22 04:35:29 +00:00
Shruti Patel a2aa911647
Improve readability in oai_completion.ipynb (#364)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-10-22 04:28:35 +00:00
Shruti Patel da88d6379c
Improve readability in oai_openai_utils.ipynb (#365) 2023-10-22 04:20:04 +00:00
Shruti Patel 61ac64081f
Improve readability in agentchat_groupchat_research.ipynb (#350)
* Improve readability in agentchat_groupchat_research.ipynb

* Undo updates to system message.
2023-10-22 00:46:04 +00:00
Shruti Patel ec423ddf07
Improve readability for agentchat_function_call.ipynb (#347) 2023-10-22 00:26:34 +00:00
Shruti Patel 15ff52a52c
Fix grammar and spelling in agentchat_chess.ipynb (#346) 2023-10-22 00:22:25 +00:00
Shruti Patel ca2e0b889e
Update agentchat_MathChat.ipynb (#341) 2023-10-21 23:56:46 +00:00
Shruti Patel 58b8c52851
Update agentchat_auto_feedback_from_code_execution.ipynb (#342)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-10-21 23:56:01 +00:00
Sean Connelly df4882524f
Resolves Typo Correction #336 (#338)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-10-21 18:46:14 +00:00
Ricky Loynd d22b6b2006
TeachableAgent (#278)
* Initial commit.

* Disable LLM response caching.

* Add teachability option to setup.py

* Modify test to use OAI_CONFIG_LIST as suggested in the docs.

* Expand unit test.

* Complete unit test.

* Add filter_dict

* details

* AnalysisAgent

* details

* More documentation and debug output.

* Support retrieval of any number of relevant memos, including zero.

* More robust analysis separator.

* cleanup

* teach_config

* refactoring

* For robustness, allow more flexibility on memo storage and retrieval.

* de-dupe the retrieved memos.

* Simplify AnalysisAgent. The unit tests now pass with gpt-3.5

* comments

* Add a verbosity level to control analyzer messages.

* refactoring

* comments

* Persist memory on disk.

* cleanup

* Use markdown to format retrieved memos.

* Use markdown in TextAnalyzerAgent

* Add another verbosity level.

* clean up logging

* notebook

* minor edits

* cleanup

* linter fixes

* Skip tests that fail to import openai

* Address reviewer feedback.

* lint

* refactoring

* Improve wording

* Improve code coverage.

* lint

* Use llm_config to control caching.

* lowercase notebook name

* Sort out the parameters passed through to ConversableAgent, and supply full docstrings for the others.

* lint

* Allow TextAnalyzerAgent to be given a different llm_config than TeachableAgent.

* documentation

* Modifications to run openai workflow.

* Test on just python 3.10.
Replace agent with agent teachable_agent as recommended.

* Test on python 3.9 instead of 3.10.

* Remove space from name -> teachableagent

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-10-21 02:27:10 +00:00
Li Jiang 88ebb77048
Add group chat and retrieve agent example (#227)
* Add group chat and retrieve agent example

* Fix link and models

* Support call rag in a group chat and not init with rag

* Fix n_results logic

* Update notebook

* Fix format

* Improve wording

* Update variable name

* Revert to main

* Update function call

* Update keys

* Update contents

* Update contents
2023-10-17 20:31:27 +00:00
Chi Wang 294e006ac9
Lancgain tool bridge (#262) (#263)
* Added a LangChain tooling bridge example

* Updated Doco

* Update agentchat_langchain.ipynb

remove key

---------

Co-authored-by: Elliot Wood <gigaflare_elliot@hotmail.com>
Co-authored-by: Li Jiang <lijiang1@microsoft.com>
2023-10-16 23:23:27 +00:00
Sheetali Maity 4fb2f1f449
Added figure to notebook (#246)
Co-authored-by: Li Jiang <lijiang1@microsoft.com>
2023-10-16 17:20:53 +00:00
Qingyun Wu 6156faaa0a
Typo (#234)
* fix typo

* wording

* typo
2023-10-13 22:07:17 +00:00
Shruti Patel c46f8e54f1
Spelling fixes. (#220)
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-10-13 21:34:15 +00:00
Ikko Eltociear Ashimine 688cf44d0e
Fix typo in agentchat_MathChat.ipynb (#191)
requries -> requires
2023-10-10 17:43:55 +00:00
lars.gersmann 62b6357294
docs: typo fixed (#129) 2023-10-07 04:04:22 +00:00
Aaron 5c2a268d95
openai_utils.py - functionality for instantiating config_list with a .env file (#68)
* FORMATTING

* UPDATE - OAI __init__.py

* ruff

* ADD - notebook covering oai API configuration options and their different purposes

* ADD openai util updates so that the function just assumes the same environment variable name for all models, also added functionality for adding API configurations like api_base etc.

* ADD - updates to config_list_from_dotenv and tests for openai_util testing, update example notebook

* UPDATE - added working config_list_from_dotenv() with passing tests, and updated notebook

* UPDATE - code and tests to potentially get around the window build permission error, used different method of producing temporary files

---------

Co-authored-by: Ward <award40@LAMU0CLP74YXVX6.uhc.com>
2023-10-05 04:45:11 +00:00
Aaron 4adbffa94b
retrieve_utils.py - Updated.py to have the ability to parse text from PDF Files (#50)
* UPDATE - Updated retrieve_utils.py to have the ability to parse text from pdf files

* UNDO - change to recursive condition

* UPDATE - updated agentchat_RetrieveChat.ipynb to clarify which file types are accepted to be in the docs path

* ADD - missing import

* UPDATE - setup.py to have PyPDF2 in retrievechat

* RE-ADD - urls

* ADD - tests for retrieve utils, and removed deprecated PyPdf2

* Update agentchat_RetrieveChat.ipynb

* Update retrieve_utils.py

Fix format

* Update retrieve_utils.py

Replace print with logger

* UPDATE - added more specific exception to PDF decryption try/catch

* FIX - typo, return statement at wrong indentation in extract_text_from_pdf

---------

Co-authored-by: Ward <award40@LAMU0CLP74YXVX6.uhc.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
2023-10-01 10:22:58 +00:00
Juanma Cuevas d802b7ae04
Improves clarity and fixes punctuation in README and Multi-agent documentation (#40)
* Improves clarity and fixes punctuation in README and Multi-agent documentation

* fix broken colab link to agentchat_groupchat_research.ipynb (others are fine)

* fix typos, improves readability
2023-09-29 17:59:30 +00:00
Chi Wang 402c5bf8d1
Fix bug for windows and improve sample code (#38)
* fix bug for windows

* fix bug for windows

* more clear example

* link to example

* add test

* format

* comment

* fix assertion error

* fix test error and links

---------

Co-authored-by: Chi Wang (MSR) <chiw@microsoft.com>
2023-09-28 20:14:36 +00:00
Chi Wang ddf10044a1 cleanup 2023-09-27 16:29:12 +00:00
Chi Wang 8e9cda716e Merge branch 'main' of https://github.com/microsoft/autogen 2023-09-27 04:22:54 +00:00
Chi Wang 9f3af1ef80 cleanup 2023-09-27 04:20:22 +00:00
Li Jiang 11088181b6
Improve RetrieveChat (#6)
* Upsert in batch

* Improve update context, support customized answer prefix

* Update tests

* Update intermediate answer

* Fix duplicate intermediate answer, add example 6 to notebook

* Add notebook results

* Works better without intermediate answers in the context

* Bump version to 0.1.2

* Remove commented code and add descriptions to _generate_retrieve_user_reply

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-09-27 01:22:50 +00:00
Chi Wang 23ceac0fe0 cleanup 2023-09-25 21:42:24 +00:00
Chi Wang efa8213d9d cleanup 2023-09-21 15:40:14 +00:00
Chi Wang 23633ae744 cleanup 2023-09-21 15:39:52 +00:00
Chi Wang ec85b4984d cleanup 2023-09-19 02:26:57 +00:00
Chi Wang a4b9297719 cleanup 2023-09-16 16:34:16 +00:00
Chi Wang 99f2f82fa3 Merge remote-tracking branch 'upstream/autogen-links' into code 2023-09-16 16:34:04 +00:00
Chi Wang bc4473fe8a cleanup 2023-09-16 10:57:57 +00:00
Chi Wang 4886cb5689
Rename Responsive -> Conversable (#1202)
* responsive -> conversable

* preview

* rename

* register reply

* rename and version

* bump version to 2.1.0

* notebook

* bug fix
2023-09-12 00:07:35 +00:00
Chi Wang 599731cb22
rename human to user_proxy (#1215)
* rename human to user_proxy

* notebook update and bug fix
2023-09-11 14:33:47 +00:00
Qingyun Wu 3bfc5f21d2 Merge remote-tracking branch 'origin/main' into autogen-links 2023-09-11 09:39:55 -04:00
Chi Wang 0cb79dfdff
group chat for visualization (#1213)
* group chat for visualization

* show figure

* webpage update

* link update

* example 2

* example 2

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-09-10 23:20:45 +00:00
Qingyun Wu faee51ca9c update links 2023-09-08 10:07:19 -04:00
Chi Wang 93b9e09166
admin takeover in group chat (#1209)
* admin takeover in group chat

* comments

* add comments
2023-09-07 02:17:53 +00:00
Chi Wang 5f9b514be7
suffix in model name (#1206)
* suffix in model name

* bump version to 2.0.3
2023-09-04 02:32:51 +00:00
Chi Wang 44932712c4
Prompt improvement (#1203)
* prompt improvement

* image None for unsupported lang

* notebook update

* prompt improvement
2023-08-30 00:54:09 +00:00
Chi Wang 57a2bea95a
prompt improvement (#1188)
* test

* chart

* plan

* separate

* bump version to 2.0.1

* explain plan and code/lang

* notebook update

* notebook update

* typo

* plan

* match can be None
2023-08-27 22:16:52 +00:00
Chi Wang 7ab4d114d7
silent; code_execution_config; exit; version (#1179)
* silent; code_execution_config; exit; version

* url

* url

* readme

* preview

* doc

* url

* endpoints

* timeout

* chess

* Fix retrieve chat

* config

* mathchat

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
2023-08-14 07:09:45 +00:00
Li Jiang 700ff05874
Add RetrieveChat (#1158)
* Add RetrieveChat notebook, RetrieveAssistantAgent and RetrieveUserProxyAgent

* Update according to comments

* Add output

* Add tests, merge main, address comments

* Fix tests

* Merge main

* Remove unnecessary code

* Update test

* Update notebook, some functions

* Fix print issue

* Update notebook

* Update notebook

* Update notebook

* Improve retrieve utils and update notebook

* Update vector db creation method

* Update notebook

* Update notebook

* Add terminate if no more context

* Update prompt and notebook, add example for update context

* Update results

* Update results

* Update results of update context

* Fix typo

* Add table of contents

* Update table of contents
2023-08-13 12:51:54 +00:00
Chi Wang c44d2f4a01
support async in agents (#1178)
* Make auto reply method pluggable

* support async

* async

* allow richer trigger types

* test list

* rename key
2023-08-08 01:34:47 +00:00
Chi Wang a603e6dddc
Make auto reply method pluggable (#1177)
* Make auto reply method pluggable

* allow richer trigger types

* test list
2023-08-07 18:41:58 +00:00
Chi Wang 2208dfb79e
Improve auto reply registration (#1170)
* Improve auto reply registration

* object key

* fix test error

* bug fix in math user proxy agent

* allow send/receive without reply

* reset -> stop
2023-08-04 14:26:58 +00:00
Chi Wang 45b7d908e4
consecutive auto reply, history, template, group chat, class-specific reply (#1165)
* max consecutive auto reply

* chess notebook

* link to notebook

* clear history

* filter

* **context -> context

* format str template

* groupchat

* register class specific reply

* groupchat notebook

* move human reply into generate_reply

* arg in config

* colab link

* remove room

* rename
2023-08-03 09:17:20 +00:00
Chi Wang c48babd02f
raise error when msg is invalid; fix docstr; improve ResponsiveAgent; update doc and packaging; capture ipython output; find code blocks with llm when regex fails. (#1154)
* autogen.agent -> autogen.agentchat

* bug fix in portfolio

* notebook

* timeout

* timeout

* infer lang; close #1150

* timeout

* message context

* context handling

* add sender to generate_reply

* clean up the receive function

* move mathchat to contrib

* contrib

* last_message

* Add OptiGuide: agent and notebook

* Optiguide notebook: add figures and URL
1. figures and code points to remote URL
2. simplify the prompt for the interpreter, because
all information is already in the chat history.

* Update name: Agent -> GenericAgent

* Update notebook

* Rename: GenericAgent -> ResponsiveAgent

* Rebase to autogen.agentchat

* OptiGuide: Comment, sytle, and notebook updates

* simplify optiguide

* raise error when msg is invalid; fix docstr

* allow return None for generate_reply()

* update_system_message

* test update_system_message

* simplify optiguide

* simplify optiguide

* simplify optiguide

* simplify optiguide

* move test

* add test and fix bug

* doc update

* doc update

* doc update

* color

* optiguide

* prompt

* test danger case

* packaging

* docker

* remove path in traceback

* capture ipython output

* simplify

* find code blocks with llm

* find code with llm

* order

* order

* fix bug in context handling

* print executing msg

* print executing msg

* test find code

* test find code

* disable find_code

* default_auto_reply

* default auto reply

* remove optiguide

* remove -e

---------

Co-authored-by: Beibin Li <beibin79@gmail.com>
2023-08-01 02:22:30 +00:00
Chi Wang 7ddb171cd9
autogen.agent -> autogen.agentchat (#1148)
* autogen.agent -> autogen.agentchat

* bug fix in portfolio

* notebook

* timeout

* timeout

* infer lang; close #1150

* timeout

* message context

* context handling

* add sender to generate_reply

* clean up the receive function

* move mathchat to contrib

* contrib

* last_message
2023-07-29 04:17:51 +00:00
Chi Wang 3e7aac6e8b
unify auto_reply; bug fix in UserProxyAgent; reorg agent hierarchy (#1142)
* simplify the initiation of chat

* version update

* include openai

* completion

* load config list from json

* initiate_chat

* oai config list

* oai config list

* config list

* config_list

* raise_error

* retry_time

* raise condition

* oai config list

* catch file not found

* catch openml error

* handle openml error

* handle openml error

* handle openml error

* handle openml error

* handle openml error

* handle openml error

* close #1139

* use property

* termination msg

* AIUserProxyAgent

* smaller dev container

* update notebooks

* match

* document code execution and AIUserProxyAgent

* gpt 3.5 config list

* rate limit

* variable visibility

* remove unnecessary import

* quote

* notebook comments

* remove mathchat from init import

* two users

* import location

* expose config

* return str not tuple

* rate limit

* ipython user proxy

* message

* None result

* rate limit

* rate limit

* rate limit

* rate limit

* make auto_reply a common method for all agents

* abs path

* refactor and doc

* set mathchat_termination

* code format

* modified

* emove import

* code quality

* sender -> messages

* system message

* clean agent hierarchy

* dict check

* invalid oai msg

* return

* openml error

* docstr

---------

Co-authored-by: kevin666aa <yrwu000627@gmail.com>
2023-07-25 23:46:11 +00:00
Chi Wang 2406e69496
Json config list, agent refactoring and new notebooks (#1133)
* simplify the initiation of chat

* version update

* include openai

* completion

* load config list from json

* initiate_chat

* oai config list

* oai config list

* config list

* config_list

* raise_error

* retry_time

* raise condition

* oai config list

* catch file not found

* catch openml error

* handle openml error

* handle openml error

* handle openml error

* handle openml error

* handle openml error

* handle openml error

* close #1139

* use property

* termination msg

* AIUserProxyAgent

* smaller dev container

* update notebooks

* match

* document code execution and AIUserProxyAgent

* gpt 3.5 config list

* rate limit

* variable visibility

* remove unnecessary import

* quote

* notebook comments

* remove mathchat from init import

* two users

* import location

* expose config

* return str not tuple

* rate limit

* ipython user proxy

* message

* None result

* rate limit

* rate limit

* rate limit

* rate limit
2023-07-23 13:23:09 +00:00
Chi Wang 16f0fcd6f8
simplify the initiation of chat (#1131)
* simplify the initiation of chat

* version update

* include openai

* completion
2023-07-18 03:40:41 +00:00
Chi Wang 297a1ea9e0
Update assistant agent (#1121)
* update colab link

* typo

* upload file instruction

* update system message and notebooks

* update notebooks

* notebook test

* aoai api version and exclusion

* gpt-3.5-turbo

* dict check

* change model for test

* endpoints, cache_path and func description update

* model list

* gitter -> discord
2023-07-14 22:52:45 +00:00
Chi Wang 3527e8a14d
update colab link (#1118)
* update colab link

* typo

* upload file instruction
2023-07-11 17:45:04 +00:00
Chi Wang 784c4c4f86
Try to prevent the default AssistantAgent from asking users to modify the code (#1114)
* inform assistant agent:
user proxy agent can't modify code

* update notebooks

* configure timeout in UserProxyAgent

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-07-10 16:07:48 +00:00
Yiran Wu 255faf97e2
Add Funccall notebook and document (#1110)
* add funccall example and doc

* revise to comments

* Update website/docs/Use-Cases/Auto-Generation.md

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

* revise

* update

* minor update

* add test notebook

* update

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-07-10 04:56:07 +00:00
Chi Wang 9c09090bf9
update notebook with new models (#1112)
* rerun notebook with new models

* planning agent

* link to notebook
2023-07-09 05:25:43 +00:00
Yiran Wu ca10b286cc
Support function_call in `autogen/agent` (#1091)
* update funccall

* code format

* update to comments

* update notebook

* remove test for py3.7

* allow funccall to class functions

* add test and clean up notebook

* revise notebook and test

* update

* update mathagent

* Update flaml/autogen/agent/agent.py

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

* Update flaml/autogen/agent/user_proxy_agent.py

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

* revise to comments

* revise function call design, notebook and test. add doc

* code format

* ad message_to_dict function

* update mathproxyagent

* revise docstr

* update

* Update flaml/autogen/agent/math_user_proxy_agent.py

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

* Update flaml/autogen/agent/math_user_proxy_agent.py

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>

* Update flaml/autogen/agent/user_proxy_agent.py

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>

* simply funccall in userproxyagent, rewind auto-gen.md, revise to comments

* code format

* update

* remove notebook for another pr

* revise oai_conversation part  in agent, revise function exec in user_proxy_agent

* update test_funccall

* update

* update

* fix pydantic version

* Update test/autogen/test_agent.py

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

* fix bug

* fix bug

* update

* update is_termination_msg to accept dict

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
Co-authored-by: Li Jiang <bnujli@gmail.com>
2023-07-05 22:08:44 +00:00
Chi Wang 4f1dfe6676
doc update (#1089)
* doc update

* add link to mathchat notebook

* use_docker property

* function name

* version update

---------

Co-authored-by: kevin666aa <yrwu000627@gmail.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-07-04 20:29:32 +00:00
Yiran Wu 8236533faf
update math notebook (#1095)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-07-02 15:26:30 +00:00
Yiran Wu e3ca95bf8a
An agent implementation of MathChat (#1090)
* mathcaht implementation

* code forrmat

* update readme

* update openai.yml

* update openai.yml

* update openai.yml
2023-06-25 13:49:34 +00:00
Chi Wang a30d198530
Fix documentation (#1075)
* Fix indentation in documentation

* newline

* version
2023-06-11 01:03:49 +00:00
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
Qingyun Wu fed28e700b
add agent notebook and documentation (#1052)
* 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

* 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>

* 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>

* renaming and doc format

* typo

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-05-28 03:17:23 +00:00
Qingyun Wu 3e6e834bbb
remove redundant doc and add tutorial (#1004)
* remove redundant doc and add tutorial

* add demos for pydata2023

* Update pydata23 docs

* remove redundant notebooks

* Move tutorial notebooks to notebook folder

* update readme and notebook links

* update notebook links

* update links

* update readme

---------

Co-authored-by: Li Jiang <lijiang1@microsoft.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
2023-05-27 02:59:51 +00:00
Chi Wang a0b318b12e
create an automl option to remove unnecessary dependency for autogen and tune (#1007)
* version update post release v1.2.2

* automl option

* import pandas

* remove automl.utils

* default

* test

* type hint and version update

* dependency update

* link to open in colab

* use packging.version to close #725

---------

Co-authored-by: Li Jiang <lijiang1@microsoft.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
2023-05-24 23:55:04 +00:00
Chi Wang 9977a7aae1
Blogpost for adaptation in HumanEval (#1048)
* Blogpost for adaptation in HumanEval

* doc

* fix link

* fix link

* explain

* model

* interface

* link

* typo

* doc
2023-05-23 04:22:15 +00:00
Chi Wang e463146cb8
response filter (#1039)
* response filter

* rewrite implement based on the filter

* multi responses

* abs path

* code handling

* option to not use docker

* context

* eval_only -> raise_error

* notebook

* utils

* utils

* separate tests

* test

* test

* test

* test

* test

* test

* test

* test

* **config in test()

* test

* test

* filename
2023-05-21 22:22:29 +00:00
Chi Wang f097c20f86
version update post release v1.2.2 (#1005) 2023-04-25 04:48:17 +00:00
Chi Wang fa5ccea862
extract code from text; solve_problem; request_timeout in config; improve code (#999)
* extract code from text

* solve_problem; request_timeout in config

* improve

* move import statement

* improve code

* generate assertions

* constant

* configs for implement; voting

* doc

* execute code in docker

* success indicator of code executation in docker

* success indicator

* execute code

* strip n

* add cost in generate_code

* add docstr

* filename

* bytes

* check docker version

* print log

* python test

* remove api key address

* rename exit code

* success exit code

* datasets

* exit code

* recover openai tests

* cache and pattern match

* wait

* wait

* cache and test

* timeout test

* python image name and skip macos

* windows image

* docker images

* volume path and yaml

* win path -> posix

* extensions

* path

* path

* path

* path

* path

* path

* path

* path

* path

* path

* path

* skip windows

* path

* timeout in windows

* use_docker

* use_docker

* hot fix from #1000

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-04-23 11:50:29 +00:00
Susan Xueqing Liu 99bb0a8425
update nlp notebook (#940)
* update nlp notebook

* rerun

* rerun

* removing redundant in notebook

* remove redundant content in nlp notebook

* update notebook

* update plot

* update plot

* update plot

---------

Co-authored-by: Li Jiang <lijiang1@microsoft.com>
2023-04-17 17:29:36 +00:00
Chi Wang 82f0a4309d
autogen subpackage (#968)
* math utils in autogen

* cleanup

* code utils

* remove check function from code response

* comment out test

* GPT-4

* increase request timeout

* name

* logging and error handling

* better doc

* doc

* codegen optimized

* GPT series

* text

* no demo example

* math

* import openai

* import openai

* azure model name

* azure model name

* openai version

* generate assertion if necessary

* condition to generate assertions

* init region key

* rename

* comments about budget

* prompt

---------

Co-authored-by: Susan Xueqing Liu <liususan091219@users.noreply.github.com>
2023-04-08 03:04:01 +00:00
Qingyun Wu 45641000c0
Adding a test function for OpenAI completion in flaml (#951)
* improve max_valid_n and doc

* Update README.md

Co-authored-by: Li Jiang <lijiang1@microsoft.com>

* add support for chatgpt

* notebook

* newline at end of file

* chatgpt notebook

* ChatGPT in Azure

* doc

* math

* warning, timeout, log file name

* handle import error

* doc update; default value

* paper

* doc

* docstr

* eval_func

* add a test func in completion

* update notebook

* update math notebook

* improve notebok

* lint and handle exception

* flake8

* exception in test

* add agg_method

* NameError

* refactor

* Update flaml/integrations/oai/completion.py

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

* Update flaml/integrations/oai/completion.py

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

* add example

* merge files from oai_eval_test

* Revert "merge files from oai_eval_test"
This reverts commit 1e6a550f913bb94df6e9680934ccb7175d00702e.

* merge

* save results to notebook_output

* update version and cache

* update doc

* save nb cell results to file

* fix typo in model name

* code improvements

* improve docstr

* docstr

* docstr on the Returns of test

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Li Jiang <lijiang1@microsoft.com>
Co-authored-by: Susan Xueqing Liu <liususan091219@users.noreply.github.com>
2023-04-02 16:14:11 +00:00
Chi Wang 595f5a8025
gpt-4 support; openai workflow fix; model str; timeout; voting (#958)
* workflow; model str; timeout

* voting

* notebook

* pull request

* recover workflow

* voted answer

* aoai

* ignore None answer

* default config

* note

* gpt-4

* n=5

* cleanup

* config name

* introduction

* readme

* avoid None

* add output/ to gitignore

* openai version

* invalid var

* comment long running cells
2023-03-26 17:13:06 +00:00
Li Jiang 50334f2c52
Support spark dataframe as input dataset and spark models as estimators (#934)
* add basic support to Spark dataframe

add support to SynapseML LightGBM model

update to pyspark>=3.2.0 to leverage pandas_on_Spark API

* clean code, add TODOs

* add sample_train_data for pyspark.pandas dataframe, fix bugs

* improve some functions, fix bugs

* fix dict change size during iteration

* update model predict

* update LightGBM model, update test

* update SynapseML LightGBM params

* update synapseML and tests

* update TODOs

* Added support to roc_auc for spark models

* Added support to score of spark estimator

* Added test for automl score of spark estimator

* Added cv support to pyspark.pandas dataframe

* Update test, fix bugs

* Added tests

* Updated docs, tests, added a notebook

* Fix bugs in non-spark env

* Fix bugs and improve tests

* Fix uninstall pyspark

* Fix tests error

* Fix java.lang.OutOfMemoryError: Java heap space

* Fix test_performance

* Update test_sparkml to test_0sparkml to use the expected spark conf

* Remove unnecessary widgets in notebook

* Fix iloc java.lang.StackOverflowError

* fix pre-commit

* Added params check for spark dataframes

* Refactor code for train_test_split to a function

* Update train_test_split_pyspark

* Refactor if-else, remove unnecessary code

* Remove y from predict, remove mem control from n_iter compute

* Update workflow

* Improve _split_pyspark

* Fix test failure of too short training time

* Fix typos, improve docstrings

* Fix index errors of pandas_on_spark, add spark loss metric

* Fix typo of ndcgAtK

* Update NDCG metrics and tests

* Remove unuseful logger

* Use cache and count to ensure consistent indexes

* refactor for merge maain

* fix errors of refactor

* Updated SparkLightGBMEstimator and cache

* Updated config2params

* Remove unused import

* Fix unknown parameters

* Update default_estimator_list

* Add unit tests for spark metrics
2023-03-25 19:59:46 +00:00
Mark Harley 27b2712016
Extract task class from automl (#857)
* Refactor into automl subpackage

Moved some of the packages into an automl subpackage to tidy before the
task-based refactor. This is in response to discussions with the group
and a comment on the first task-based PR.

Only changes here are moving subpackages and modules into the new
automl, fixing imports to work with this structure and fixing some
dependencies in setup.py.

* Fix doc building post automl subpackage refactor

* Fix broken links in website post automl subpackage refactor

* Fix broken links in website post automl subpackage refactor

* Remove vw from test deps as this is breaking the build

* Move default back to the top-level

I'd moved this to automl as that's where it's used internally, but had
missed that this is actually part of the public interface so makes sense
to live where it was.

* Re-add top level modules with deprecation warnings

flaml.data, flaml.ml and flaml.model are re-added to the top level,
being re-exported from flaml.automl for backwards compatability. Adding
a deprecation warning so that we can have a planned removal later.

* Fix model.py line-endings

* WIP

* WIP - Notes below

Got to the point where the methods from AutoML are pulled to
GenericTask. Started removing private markers and removing the passing
of automl to these methods. Done with decide_split_type, started on
prepare_data. Need to do the others after

* Re-add generic_task

* Fix tests: add Task.__str__

* Fix tests: test for ray.ObjectRef

* Hotwire TS_Sklearn wrapper to fix test fail

* Remove unused data size field from Task

* Fix import for CLASSIFICATION in notebook

* Update flaml/automl/data.py

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

* Fix review comments

* Fix task -> str in custom learner constructor

* Remove unused CLASSIFICATION imports

* Hotwire TS_Sklearn wrapper to fix test fail by setting
optimizer_for_horizon == False

* Revert changes to the automl_classification and pin FLAML version

* Fix imports in reverted notebook

* Fix FLAML version in automl notebooks

* Fix ml.py line endings

* Fix CLASSIFICATION task import in automl_classification notebook

* Uncomment pip install in notebook and revert import

Not convinced this will work because of installing an older version of
the package into the environment in which we're running the tests, but
let's see.

* Revert c6a5dd1a0

* Revert "Revert c6a5dd1a0"

This reverts commit e55e35adea03993de87b23f092b14c6af623d487.

* Black format model.py

* Bump version to 1.1.2 in automl_xgboost

* Add docstrings to the Task ABC

* Fix import in custom_learner

* fix 'optimize_for_horizon' for ts_sklearn

* remove debugging print statements

* Check for is_forecast() before is_classification() in decide_split_type

* Attempt to fix formatting fail

* Another attempt to fix formatting fail

* And another attempt to fix formatting fail

* Add type annotations for task arg in signatures and docstrings

* Fix formatting

* Fix linting

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
Co-authored-by: EgorKraevTransferwise <egor.kraev@transferwise.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Kevin Chen <chenkevin.8787@gmail.com>
2023-03-11 02:39:08 +00:00
Chi Wang 169012f3e7
ChatGPT support (#942)
* improve max_valid_n and doc

* Update README.md

Co-authored-by: Li Jiang <lijiang1@microsoft.com>

* add support for chatgpt

* notebook

* newline at end of file

* chatgpt notebook

* ChatGPT in Azure

* doc

* math

* warning, timeout, log file name

* handle import error

* doc update; default value

* paper

* doc

* docstr

* eval_func

* prompt and messages

* remove confusing words

* notebook name

---------

Co-authored-by: Li Jiang <lijiang1@microsoft.com>
Co-authored-by: Susan Xueqing Liu <liususan091219@users.noreply.github.com>
2023-03-10 19:35:36 +00:00
Shaokun 3a606930d1
Update doc and notebook (#946)
* update

* update doc

---------

Co-authored-by: “skzhang1” <“shaokunzhang529@gmail.com”>
2023-03-10 13:54:48 +00:00
Chi Wang 1ec77b58b4
improve max_valid_n and doc (#933)
* improve max_valid_n and doc

* Update README.md

Co-authored-by: Li Jiang <lijiang1@microsoft.com>

* newline at end of file

* doc

---------

Co-authored-by: Li Jiang <lijiang1@microsoft.com>
Co-authored-by: Susan Xueqing Liu <liususan091219@users.noreply.github.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-03-05 16:40:57 +00:00
Susan Xueqing Liu 97928609ba
adding openai documentation (#938)
* adding openai documentation

* adding openai documentation

* Update website/docs/Examples/Integrate - OpenAI.md

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

* Update website/docs/Examples/Integrate - OpenAI.md

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>

* Update website/docs/Examples/Integrate - OpenAI.md

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

* Update website/docs/Examples/Integrate - OpenAI.md

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

* Update website/docs/Examples/Integrate - OpenAI.md

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

* addressing comments

* Update website/docs/Examples/Integrate - OpenAI.md

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

* Update website/docs/Examples/Integrate - OpenAI.md

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

* adding Azure

* rerun

* addressing comments about Azure

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-03-05 01:15:49 +00:00
Jirka Borovec 2ff1035733
precommit: end-of-file-fixer (#929)
* precommit: end-of-file-fixer

* exclude .gitignore

* apply

---------

Co-authored-by: Shaokun <shaokunzhang529@gmail.com>
2023-02-28 16:27:14 +00:00
Chi Wang a3e368d2ca
minor change to notebook (#928) 2023-02-24 10:43:18 +00:00
Chi Wang 35ce9b79e8
azure oai (#920)
* azure oai

* price update in notebook

* text Davinci

* pytorch-lightning version

* trigger action in merge queue

* types

* doc check in mege group
2023-02-16 23:38:50 +00:00
Chi Wang 63d350d4c8
Openai (#905)
* add cost budget; move loc of make_dir

* support openai completion

* install pytest in workflow

* skip openai test

* test openai

* path for docs rebuild

* install datasets

* signal

* notebook

* notebook in workflow

* optional arguments and special params

* key -> k

* improve readability

* assumption

* optimize for model selection

* larger range of max_tokens

* notebook

* python package workflow

* skip on win
2023-02-05 20:13:08 -08:00
Qingyun Wu d0f7b30b61 update doc for research papers 2023-02-03 16:57:16 -08:00
Shaokun 7644265d1f
Merge branch 'main' into first_contribution 2023-01-29 10:48:16 -05:00
Chi Wang d46532efda
display data head in notebook; exclude None (#885) 2023-01-28 15:42:49 -08:00
Andrea W 297fc5ad7c annotate state, add cv notebook 2023-01-26 14:18:55 +00:00
Chi Wang 75e3454120
notebook test; spark warning message; reproducibility bug; sequential tuning stop condition (#869)
* notebook test

* add ipykernel, remove except

* only create dir if not empty

* Stop sequential tuning when result is None

* fix reproducibility of global search

* save gs seed

* use get to avoid KeyError

* test
2023-01-07 18:39:29 -08:00
Li Jiang da2cd7ca89
Add supporting using Spark as the backend of parallel training (#846)
* Added spark support for parallel training.

* Added tests and fixed a bug

* Added more tests and updated docs

* Updated setup.py and docs

* Added customize_learner and tests

* Update spark tests and setup.py

* Update docs and verbose

* Update logging, fix issue in cloud notebook

* Update github workflow for spark tests

* Update github workflow

* Remove hack of handling _choice_

* Allow for failures

* Fix tests, update docs

* Update setup.py

* Update Dockerfile for Spark

* Update tests, remove some warnings

* Add test for notebooks, update utils

* Add performance test for Spark

* Fix lru_cache maxsize

* Fix test failures on some platforms

* Fix coverage report failure

* resovle PR comments

* resovle PR comments 2nd round

* resovle PR comments 3rd round

* fix lint and rename test class

* resovle PR comments 4th round

* refactor customize_learner to broadcast_code
2022-12-23 08:18:49 -08:00
Jing Dong 3a194d047b fix checkpoint.value in the notebook and test 2022-12-19 09:22:16 -08:00
Chi Wang 92b79221b6
make performance test reproducible (#837)
* make performance test reproducible

* fix test error

* Doc update and disable logging

* document random_state and version

* remove hardcoded budget

* fix test error and dependency; close #777

* iloc
2022-12-06 10:13:39 -08:00
Shreyas 3b3b0bfa8e
roc_auc_weighted metric addition (#827)
* Pending changes exported from your codespace

* Update flaml/automl.py

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

* Update flaml/automl.py

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

* Update flaml/ml.py

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

* Update flaml/ml.py

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

* Update website/docs/Examples/Integrate - Scikit-learn Pipeline.md

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

* added documentation for new metric

* Update flaml/ml.py

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

* minor notebook changes

* Update Integrate - Scikit-learn Pipeline.md

* Update notebook/automl_classification.ipynb

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

* Update integrate_azureml.ipynb

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2022-12-02 19:27:32 -08:00
Chi Wang 595af7a04f
install editable package in codespace (#826)
* install editable package in codespace

* fix test error in test_forecast

* fix test error in test_space

* openml version

* break tests; pre-commit

* skip on py10+win32

* install mlflow in test

* install mlflow in [test]

* skip test in windows

* import

* handle PermissionError

* skip test in windows

* skip test in windows

* skip test in windows

* skip test in windows

* remove ts_forecast_panel from doc
2022-11-27 14:22:54 -05:00
shreyas36 cb3402052f
added the models used for forecasting in documentation (#811) 2022-11-14 15:29:36 -05:00
Jing Dong 9a7a9ef1c6
Added a link to documentation webpage in notebook time_series_forcast (#791)
* added a link to documentation webpage in notebook time_series_forcast

* added a link to documentation webpage in notebook time_series_forcast

* Update notebook/automl_time_series_forecast.ipynb

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

* complete output

* added all cell output

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: zsk <shaokunzhang529@gmail.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2022-11-12 18:36:06 -08:00
Anonymous-submission-repo 2d18c49cdd update 2022-10-12 04:31:51 +00:00
Anonymous-submission-repo ff995d08d8 notebook 2022-10-10 13:37:01 +00:00
Xueqing Liu 2ead296676
updating nlp notebook (#693)
* updating nlp notebook
2022-08-22 07:20:48 -04:00
Chi Wang 47e034d203
LightGBM notebook update (#690)
* version update in notebook

* comment about optuna install

* monotone constraints
2022-08-20 07:43:06 -07:00
Xueqing Liu 6c7d37374d
updating nlp notebook (#683) 2022-08-15 18:09:08 -07:00
Kevin Chen 2e8e3937ef
update time series forecast notebook (#682)
* update forecasting with exogeneous variables example

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update forecasting with exogeneous variables example on website

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* rerun automl_time_series_forecast with new predict function for tft

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* correct spelling error

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>
2022-08-13 18:58:45 -07:00
Kevin Chen f718d18b5e
time series forecasting with panel datasets (#541)
* time series forecasting with panel datasets
- integrate Temporal Fusion Transformer as a learner based on pytorchforecasting

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update setup.py

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update test_forecast.py

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update setup.py

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update setup.py

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update model.py and test_forecast.py
- remove blank lines

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update model.py to prevent errors

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update automl.py and data.py
- change forecast task name
- update documentation for fit() method

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update test_forecast.py

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update test_forecast.py
- add performance test
- use 'fit_kwargs_by_estimator'

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* add time index function

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update test_forecast.py performance test

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update data.py

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update automl.py

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update data.py to prevent type error

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update setup.py

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update for pytorch forecasting tft on panel datasets

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update automl.py documentations

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* - rename estimator
- add 'gpu_per_trial' for tft estimator

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update test_forecast.py

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* include ts panel forecasting as an example

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update model.py

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update documentations

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update automl_time_series_forecast.ipynb

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update documentations

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* "weights_summary" argument deprecated and removed for pl.Trainer()

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update model.py tft estimator prediction method

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update model.py

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update `fit_kwargs` documentation

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* update automl.py

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2022-08-12 08:39:22 -07:00
Xueqing Liu 5eb5d43d7f
Fix HPO evaluation bug (#645)
* fix eval automl metric bug on val_loss inconsistency

* updating starting point search space to continuous

* shortening notebok
2022-07-28 23:08:42 -04:00
Chi Wang e14e909af9
Feature names and importances (#621)
* feature names and importances

* None check

* StackingClassifier has no feature_importances_

* StackingClassifier has no feature_names_in_
2022-07-10 12:25:59 -07:00
Zvi Baratz 127e482ac8
Replaced !pip calls with %pip magic command. (#604)
Closes #603.
2022-06-23 18:45:42 -07:00
Zvi Baratz fefdb48ef3
Fix automl settings in scikit-learn pipeline integration example (#602)
* Added test directory and core file to gitignore.

Closes #601.

* Fixed pipeline fit parameters.

Closes #600.

* Reverted changes to gitignore.
2022-06-22 19:44:14 -07:00
Chi Wang c45741a67b
support latest xgboost version (#599)
* support latest xgboost version

* Update test_classification.py

* Update 

Exists problems when installing xgb1.6.1 in py3.6

* cleanup

* xgboost version

* remove time_budget_s in test

* remove redundancy

* stop support of python 3.6

Co-authored-by: zsk <shaokunzhang529@gmail.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2022-06-21 18:59:07 -07:00
Chi Wang 0642b6e7bb
init value type match (#575)
* init value type match

* bump version to 1.0.6

* add a note about flaml version in notebook

* add note about mismatched ITER_HP

* catch SSLError when accessing OpenML data

* catch errors in autovw test

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2022-06-09 08:11:15 -07:00
Chi Wang 619107edf5 install openml for notebook example 2022-06-05 22:52:20 -07:00
Chi Wang c9bac02ea4
add zeroshot notebook (#569)
* add zeroshot notebook
2022-06-04 12:00:58 -07:00
Xueqing Liu ca35fa969f
refactoring TransformersEstimator to support default and custom_hp (#511)
* refactoring TransformersEstimator to support default and custom_hp

* handling starting_points not in search space

* addressing starting point more than max_iter

* fixing upper < lower bug
2022-04-28 14:06:29 -04:00
Chi Wang e877de6414 use ffill in forecasting example 2022-04-01 09:23:23 -07:00
Qingyun Wu 2cdc08a75a update notebook and test 2022-03-30 19:11:10 -07:00
liususan091219 0bcf618fea fixing bug 2022-03-28 11:53:58 -07:00
Qingyun Wu 6c16e47e42
Bug fix and add documentation for metric_constraints (#498)
* metric constraint documentation

* update link

* update notebook

* fix a bug in adding 'time_total_s' to result

* use the default multiple factor from config file

* update notebook

* format

* improve test

* revise test budget for macos

* bug fix in adding time_total_s

* increase performance check budget

* revise test

* update notebook

* uncomment test

* remove redundancy

* clear output

* remove n_jobs

* remove constraint in notebook

* increase budget

* revise test

* add python version

* use getattr

* improve code robustness

Co-authored-by: Qingyun Wu <qxw5138@psu.edu>
2022-03-26 21:11:45 -04:00
Xueqing Liu 5f97532986
adding evaluation (#495)
* adding automl.score

* fixing the metric name in train_with_config

* adding pickle after score

* fixing a bug in automl.pickle
2022-03-25 17:00:08 -04:00
Xueqing Liu af423463c3
fixing bug for ner (#463)
* fixing bug for ner

* removing global var

* adding class for trial counter

* adding notebook

* adding use_ray dict

* updating documentation for nlp
2022-03-20 22:03:02 -04:00
Kevin Chen f9eda0cc40
update documentation for time series forecasting (#472)
* update automl.py
- documentation update

* update test_forecast.py

* update model.py

* update automl_time_series_forecast.ipynb

* update time series forecast website examples

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>
2022-03-08 11:21:18 -08:00
Chi Wang 6095be039f
update regression metrics in notebooks (#454) 2022-02-15 13:17:43 -08:00
Chi Wang 569908fbe6
fix issues in logging, bug in space.py, constraint sign, and improve code coverage (#388)
* console log handler

* version update

* doc

* skippable steps

* notebook update

* constraint sign

* doc for constraints

* bug fix: define-by-run and unflatten_hierarchical

* const

* handle nested space in indexof()

* test grid search

* test suggestion

* model test

* >1 ckpts

* always increase iter count

* log total # iterations

* security patch

* make iter_per_learner consistent
2022-01-14 13:39:09 -08:00
Chi Wang 8602def1c4
logging (#371)
* query logged runs

* mlflow log when using ray

* key check for newer version of ray #363

* catch importerror

* log and load AutoML model

* retrain if necessary when ensemble fails
2022-01-02 21:37:19 -08:00
Chi Wang efd85b4c86
Deploy a new doc website (#338)
A new documentation website. And:

* add actions for doc

* update docstr

* installation instructions for doc dev

* unify README and Getting Started

* rename notebook

* doc about best_model_for_estimator #340

* docstr for keep_search_state #340

* DNN

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
Co-authored-by: Z.sk <shaokunzhang@psu.edu>
2021-12-16 17:11:33 -08:00
Chi Wang b773e2898f Update flaml_pytorch_cifar10.ipynb
training_function -> train_cifar
2021-12-07 15:17:15 -08:00
Qingyun Wu dd60dbc5eb
rename training_function (#327)
* rename training_function

* add docstr

* update docstr

* update docstr and comments

Co-authored-by: Qingyun Wu <qxw5138@psu.edu>
2021-12-06 17:03:43 -05:00
Qingyun Wu 17b17d084f
tune api for schedulers (#322)
* revise api and tests

* rename prune_attr

* update finetune notebook

* add scheduler test and notebook

* update tune api for scheduler

* remove scheduler notebook

* Update flaml/tune/tune.py

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

* docstr

* fix imports

* clear notebook output

* fix ray import

* Update flaml/tune/tune.py

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

* improve docstr

* Update flaml/searcher/blendsearch.py

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

* remove redundant import

Co-authored-by: Qingyun Wu <qxw5138@psu.edu>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2021-12-04 21:52:20 -05:00
Chi Wang c57954fbbd
include default value in rf search space (#317)
* include default value in rf search space

* init _mem_per_iter with -1

* bump version to 0.8.2

* docstr for search space's arguments
2021-12-03 09:15:21 -08:00
Chi Wang 85e21864ce
test -> val; docstr (#300)
* rename test -> val in custom metric function
* add an example in docstr
resolve #299
2021-11-22 22:17:29 -08:00
Chi Wang ea6d28d7bd
add max_depth to xgboost search space (#282)
* add max_depth to xgboost search space

* notebook update

* two learners for xgboost (max_depth or max_leaves)
2021-11-22 21:17:48 -08:00
Chi Wang 72caa2172d
model_history, ITER_HP, settings in AutoML(), checkpoint bug fix (#283)
if save_best_model_per_estimator is False and retrain_final is True, unfit the model after evaluation in HPO.
retrain if using ray.
update ITER_HP in config after a trial is finished.
change prophet logging level.
example and notebook update.
allow settings to be passed to AutoML constructor. Are you planning to add multi-output-regression capability to FLAML #192 Is multi-tasking allowed? #277 can pass the auotml setting to the constructor instead of requiring a derived class.
remove model_history.
checkpoint bug fix.

* model_history meaning save_best_model_per_estimator

* ITER_HP

* example update

* prophet logging level

* comment update in forecast notebook

* print format improvement

* allow settings to be passed to AutoML constructor

* checkpoint bug fix

* time limit for autohf regression test

* skip slow test on macos

* cleanup before del
2021-11-18 09:39:45 -08:00
Xueqing Liu 42de3075e9
Make NLP tasks available from AutoML.fit() (#210)
Sequence classification and regression: "seq-classification" and "seq-regression"

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2021-11-16 11:06:20 -08:00
Chi Wang 59083fbdcb
example update (#281)
* example update

* bump version to 0.7.2

* notebook update
2021-11-12 22:29:33 -08:00
Chi Wang 92ebd1f7f9
when max_iter=1, skip search only if retrain_final (#280)
* when max_iter=1, skip search only if retrain_final

* remove nlp
redesign in #210

* minor change in readme example
2021-11-09 21:51:23 -08:00
Chi Wang 549a0dfb53
limit time and memory consumption (#264)
* limit time and memory

* separate tests

* lrl1 can't be limited by limit_resource

* free memory when possible

* passthrough=False when ensemble fails;
retrain when trained_estimator is None

* use callback to for resource limit

* handle lower version of xgb with no callback

* free mem ratio

* reduce verbosity

* retrain_final when max_iter==1

* remove trained_estimator from result

* model_history

* wheel

* retrain time as best_config_train_time

* ci: libomp version for xgboost on macos

* limit_resource not working in windows

* test pickle load

* mute forecaster

* notebook update

* check hard

* preventive callback

* add use_ray
2021-11-03 19:08:23 -07:00
Kevin Chen 519bfc2a18
Integrate multivariate time series forecasting (#254)
* Integrate multivariate time series forecasting, now supports
continuous and categorical variables

- update data.py to transform time series data
- update search space
- update documentations to reflect changes
- update test_forecast.py
- rename 'forecast' task to 'ts_forecast' task

* update automl.py and test_forecast.py

* update forecast notebook

* update README.md and setup.py

* update ml.py and test_forecast.py

- make "ds" and "y" constant variables

* replace constants with constant variables

* bump version to 0.7.0

* update setup.py
- support 'forecast' and 'ts_forecast'

* update automl.py and data.py
- support 'forecast' and 'ts_forecast' tasks
2021-10-30 09:48:57 -07:00
Chi Wang 524f22bcc5
fix bug in hierarchical search space (#248); optional dependency on lgbm and xgb (#250)
* close #249

* admissible region

* best_config can be None

* optional dependency on lgbm and xgb
resolve #252
2021-10-15 21:36:42 -07:00
Chi Wang f48ca2618f
warning -> info for low cost partial config (#231)
* warning -> info for low cost partial config
#195, #110

* when n_estimators < 0, use trained_estimator's

* log debug info

* test random seed

* remove "objective"; avoid ZeroDivisionError

* hp config to estimator params

* check type of searcher

* default n_jobs

* try import

* Update searchalgo_auto.py

* CLASSIFICATION

* auto_augment flag

* min_sample_size

* make catboost optional
2021-10-08 16:09:43 -07:00
Chi Wang ea6c6ded2f
clean up forecast notebook (#202) 2021-09-13 21:16:42 -07:00
Chi Wang 71219df6c6
notebook example (#189)
* config in result

* value can be float

* pytorch notebook example

* docker, pre-commit

* max_failure (#192); early_stop

* extend starting_points (#196)

Co-authored-by: Chi Wang (MSR) <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qw2ky@virginia.edu>
2021-09-10 16:39:16 -07:00
Chi Wang e46573a01d
warmstart blendsearch (#186)
* increase test coverage

* use define by run only when needed

* warmstart bs

* classification -> binary, multi

* warm start with evaluated rewards

* data transformer; resource attr for gs

* BlendSearchTuner bug fix and unittest

* bug fix

* docstr and import

* task type
2021-09-04 01:42:21 -07:00
Kevin Chen ec34427ca8
Forecast v2 (#182)
* update flaml_forecast.ipynb

* visualize predictions for comparison

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>
2021-09-01 18:06:37 -07:00
Chi Wang 6ab0730793
remove catboost training dir; ensemble api; blendsearch for hierarchical space; ranking task; forecast improvement (#178)
* remove catboost training dir

* close #48

* bs for hierarchical space. close #85

* retrain for hierarchical space

* clean ml (#180)

Co-authored-by: Qingyun Wu <qxw5138@psu.edu>

* support ranking task

* examples

* cv shuffle

* forecast api and implementation cleaner

* period constraints

* delete groups after fit
2021-09-01 16:25:04 -07:00
Qingyun Wu a229a6112a
Support parallel and add random search (#167)
* non hashable value out of signature

* parallel trials

* add random in _search_parallel

* fix bug in retraining

* check memory constraint before training

* retrain_full

* log custom metric

* retraining budget check

* sample size check before retrain

* remove 'time2eval' from result

* report 'total_search_time' in result

* rename total_search_time to wall_clock_time

* rename train_loss boolean to log_training_metric

* set default train_loss to None

* exclude oom result

* log retrained model

* no subsample

* doc str

* notebook

* predicted value is NaN for sarimax

* version

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qxw5138@psu.edu>
2021-08-23 16:36:51 -07:00
Kevin Chen 3d0a3d26a2
Forecast (#162)
* added 'forecast' task with estimators ['fbprophet', 'arima', 'sarimax']

* update setup.py

* add TimeSeriesSplit to 'regression' and 'classification' task

* add 'time' split_type for 'classification' and 'regression' task

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>

* feature importance

* variable name

* Update test/test_split.py

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

* Update test/test_forecast.py

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

* prophet installation fail in windows

* upload flaml_forecast.ipynb

Signed-off-by: Kevin Chen <chenkevin.8787@gmail.com>
2021-08-23 13:26:46 -07:00
すずまる 6270353458
support ROC and AUC for multi-class classification (#170)
* support ROC and AUC for multi-class classification

* add a test case to cover ROC and AUC for multi-class classification
2021-08-22 15:16:10 -07:00
Naga Budigam 2fb888e64e
Tutorial on using AutoML in sklearn pipeline (#157)
* tutorial on using AutoML in sklearn pipeline
2021-08-11 17:46:46 -07:00
Xueqing Liu eeaf5b5963
space -> main (#148)
* subspace in flow2

* search space and trainable from AutoML

* experimental features: multivariate TPE, grouping, add_evaluated_points

* test experimental features

* readme

* define by run

* set time_budget_s for bs

Co-authored-by: liususan091219 <Xqq630517>

* version

* acl

* test define_by_run_func

* size

* constraints

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2021-08-02 16:10:26 -07:00
Qingyun Wu 58c0ec959d
Update readme for flaml.tune (#137)
* add time_budget_s for bs in readme

* version update

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2021-07-24 17:10:43 -07:00