Commit Graph

3198 Commits

Author SHA1 Message Date
Li Jiang
904b5ea7cd add timeout to openai create (#973) 2023-04-03 04:58:34 +00:00
Ayesh Vininda
5616ce0a54 Noctus contribute (#961)
* indentation space #884 changing indentation of python code blocks

* indentation space #884 changing indentation of python code blocks 2
2023-04-03 01:50:44 +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
levscaut
05c5f8f426 more tolerant time limit for test_overtime (#960)
* more tolerant time limit for test_overtime

* Cancel assertion becasue github VM sometimes is super slow

---------

Co-authored-by: Li Jiang <lijiang1@microsoft.com>
2023-03-27 04:12:50 +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
Susan Xueqing Liu
a3e770eac5 fix delete (#950) 2023-03-14 03:19:58 +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
dependabot[bot]
0b5a637f9a Bump http-cache-semantics from 4.1.0 to 4.1.1 in /website (#913)
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Shaokun <shaokunzhang529@gmail.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-03-01 03:09:18 +00:00
Jirka Borovec
a340919458 adding precommit check (#930)
* adding precommit check

* run precommit

* Apply suggestions from code review

Co-authored-by: Zvi Baratz <z.baratz@gmail.com>

* apply precommit

---------

Co-authored-by: Zvi Baratz <z.baratz@gmail.com>
2023-02-28 16:29:07 +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
levscaut
c6a2440348 add PySparkOvertimeMonitor to avoid exceeding time budget (#923)
* merging

* clean commit

* Delete mylearner.py

This file is not needed.

* fix py4j import error

* more tolerant cancelling time

* fix problems following suggestions

* Update flaml/tune/spark/utils.py

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

* remove redundant model

* Update test/spark/custom_mylearner.py

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

* add docstr

* reverse change in gitignore

* Update test/spark/custom_mylearner.py

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

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-02-24 08:07:00 +00:00
Xiaoyun Zhang
4118c8e27f fix #493 (#932)
* add custom meta feature function

* Update flaml/default/suggest.py

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

---------

Co-authored-by: littlelittlecloud <g2260578356@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-02-24 04:31:46 +00:00
Li Jiang
7c0340fde6 Updated dict type args default value to None (#927) 2023-02-23 05:23:24 +00:00
Andrea Ruggerini
8e447562c7 Improve annotations in automl and ml modules (#919)
* begin annotation in automl.py and ml.py

* EstimatorSubclass + annotate metric

* review: fixes + setting fit_kwargs as proper Optional

* import from flaml.automl.model (import from flaml.model is deprecated)

* comment n_jobs in train_estimator as well

* better annotation in _compute_with_config_base

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

---------

Co-authored-by: Andrea W <a.ruggerini@ammagamma.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-02-22 02:49:56 +00:00
Jirka Borovec
6aa1d16ebc pre-commit: update config (#925)
* update config

* apply precommit
2023-02-22 00:49:38 +00:00
Shaokun
c18dd456c7 Fix Dependabot alerts (#922)
* fix_alerts

* clean up

---------

Co-authored-by: “skzhang1” <“shaokunzhang529@gmail.com”>
2023-02-20 23:45:49 +00:00
Animaholic
0eaac7d018 added a documentation about small time budget (#914)
* added documentation about small time budget

* small change for better clarity

* Update website/docs/Use-Cases/Task-Oriented-AutoML.md

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

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-02-18 23:56:58 +00:00
Chi Wang
501a0b8eb8 bump version to 1.1.3; workflow trigger (#924) 2023-02-18 16:07:27 +00:00
Susan Xueqing Liu
2273937e68 Update hf version (#918)
* update hf version

* adding transformers version

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-02-17 23:52:36 +00:00
Li Jiang
138eb78dbc Added extras for synapse (#916)
* Added extras for synapse

* Update Installation doc
2023-02-17 16:38:55 +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
671146146a workflow path->paths (#915)
* workflow path->paths

* Apply suggestions from code review

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

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
2023-02-08 20:47:07 -08: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
Animaholic
bcc6a197fd Add bibtex entries for research publications (#904)
* Update Research.md

* Update website/docs/Research.md

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

* Update website/docs/Research.md

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

* Update website/docs/Research.md

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

* Update website/docs/Research.md

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

* Update website/docs/Research.md

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

* Update website/docs/Research.md

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

* Update website/docs/Research.md

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-02-05 20:48:07 -05:00
Chi Wang
3b6bfc2876 add cost budget; move loc of make_dir (#888)
* add cost budget; move loc of make_dir

* remove None in return

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-02-05 19:34:59 -05:00
Chi Wang
fbea1d06dd stratified group kfold splitter (#899)
* stratified group kfold splitter

* exclude catboost

---------

Co-authored-by: Shaokun <shaokunzhang529@gmail.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-02-05 18:26:14 -05:00
Shaokun
cb3378d621 Merge pull request #912 from microsoft/tutorial-updates
update doc for research papers
2023-02-04 09:18:05 -05:00
Qingyun Wu
d0f7b30b61 update doc for research papers 2023-02-03 16:57:16 -08:00
Shaokun
50a7b624d1 Merge pull request #894 from coffepowered/first_contribution
Document how to use the group k-fold
2023-01-31 15:19:53 -05:00
skzhang1
c6f8e004e7 fix link 2023-01-30 06:01:20 -08:00
Andrea W
58ac6b61c4 Merge branch 'first_contribution' of https://github.com/coffepowered/FLAML into first_contribution 2023-01-30 11:21:43 +00:00
Andrea W
3e6247ae59 add link to notebook showing group cv 2023-01-30 11:17:27 +00:00
Shaokun
df5efa5c2d Merge branch 'main' into first_contribution 2023-01-29 22:56:45 -05:00
Shaokun
871f3776f3 Merge pull request #875 from skzhang1/support_percentages
Support percentage tolerance for lexicographic optimization
2023-01-29 14:08:46 -05:00
Shaokun
7644265d1f Merge branch 'main' into first_contribution 2023-01-29 10:48:16 -05:00
Shaokun
b342337875 Merge branch 'main' into support_percentages 2023-01-29 10:39:41 -05:00
Chi Wang
d46532efda display data head in notebook; exclude None (#885) 2023-01-28 15:42:49 -08:00
Shaokun
175a2eaaf6 Merge branch 'main' into support_percentages 2023-01-28 10:00:57 -05:00
skzhang1
b8982f7cf2 update 2023-01-28 06:58:58 -08:00
skzhang1
184251a2a7 update 2023-01-28 06:53:37 -08:00
Shaokun
dbd48c555f Merge pull request #900 from microsoft/dependabot/npm_and_yarn/website/ua-parser-js-0.7.33
Bump ua-parser-js from 0.7.32 to 0.7.33 in /website
2023-01-27 21:25:44 -05:00
dependabot[bot]
b740d79369 Bump ua-parser-js from 0.7.32 to 0.7.33 in /website
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.32 to 0.7.33.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.32...0.7.33)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-27 17:35:14 +00:00
Andrea W
2f93736740 remove postponed eval of annotations from automl.py 2023-01-27 10:00:16 +00:00
Andrea W
bdbba6e3bc modify doc 2023-01-26 14:31:54 +00:00