GithubHelp home page GithubHelp logo

milosz-l / dartml Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 9.52 MB

DartML: Machine Learning for Everyone (AutoML app for supervised learning on tabular data)

Python 100.00%
automl nocode streamlit tabular-data

dartml's Introduction

Python 3.9

๐ŸŽฏ DartML

Welcome to DartML: Machine Learning for Everyone! This app lets you build Machine Learning models without writing a single line of code.

  • Step 1: Upload your data
    • Specify sample size
    • Choose between train/test split and cross validation
    • Define shuffle and stratify options Step 1 Image
  • Step 2: Explore the data
    • Numerical data exploration Numerical data exploration
    • Categorical data exploration Categorical data exploration
  • Step 3: Build the model
    • Choose the target column
    • Select the problem type (can be also automatically detected)
    • Define metric (e.g. accuracy, f1 score, etc.)
    • Choose algorithms
    • Specify total training time Step 3 Image
  • Step 4: Evaluate the trained models
    • NOTE: All the tables and plots shown below are being updated in real time during the training!
    • Leaderboard Leaderboard
    • Performance Boxplot Performance Boxplot
    • Features Importance (eXplainable AI) Features Importance
    • Spearman Correlation of Models Spearman Correlation of Models
    • Logs Logs
  • At last, you can download report with all trained models and more detailed information about them (e.g. SHAP or dtreeviz visualizations).
    • SHAP values for 10 worst predictions SHAP values for 10 worst predictions
    • dtreeviz visualization dtreeviz visualization

Demo video

DartML Demo Click above to watch the demo!

How to install and run the app

Install requirements

Using pip

pip install -r requirements.txt

Using conda

You can change new_env_name to any name you like.

conda create --name new_env_name python=3.9
conda activate new_env_name
pip install -r requirements.txt

Run the app

streamlit run 0_๐Ÿ _Home.py

Project structure

.
โ”œโ”€โ”€ 0_๐Ÿ _Home.py                    # Home page streamlit view.
โ”œโ”€โ”€ pages                           # Streamlit views for other pages of the app.
โ”‚   โ”œโ”€โ”€ 1_๐Ÿงช_Sample.py              # Sample page streamlit view.
โ”‚   โ”œโ”€โ”€ 2_๐Ÿ”_Explore.py             # Explore page streamlit view.
โ”‚   โ”œโ”€โ”€ 4_๐Ÿ› ๏ธ_Modify_&_Model.py      # Modify & Model page streamlit view.
โ”‚   โ””โ”€โ”€ 5_๐Ÿ“Š_Assess.py              # Assess page streamlit view.
โ”œโ”€โ”€ src                             # Source code of the app.
โ”‚   โ”œโ”€โ”€ config.py                   # Configurations for the app.
โ”‚   โ”œโ”€โ”€ sample                      # Code used specifically in the Sample page.
โ”‚   โ”œโ”€โ”€ explore                     # Code used specifically in the Explore page.
โ”‚   โ”œโ”€โ”€ modify_and_model            # Code used specifically in the Modify & Model page.
โ”‚   โ”œโ”€โ”€ assess                      # Code used specifically in the Assess page.
โ”‚   โ”œโ”€โ”€ general_views               # Smaller streamlit views used in multiple pages.
โ”‚   โ””โ”€โ”€ session_state               # Functions related to handling app's session state.
โ”œโ”€โ”€ tests                           # Tests for the app.
โ”‚   โ”œโ”€โ”€ functional_tests            # Functional tests.
โ”‚   โ””โ”€โ”€ load_tests                  # Load tests.
โ”‚   โ””โ”€โ”€ unit_tests                  # Unit tests.
โ”œโ”€โ”€ temp_dirs                       # Temporary directories used to store training results.
โ”‚   โ””โ”€โ”€ .gitkeep                    # Empty file to make sure the directory is tracked by git.
โ”œโ”€โ”€ docs                            # Documentation for the app.
โ”œโ”€โ”€ example_data                    # Example data used in the app.
โ”œโ”€โ”€ README.md                       # project description you are reading right now
โ”œโ”€โ”€ .pre-commit-config.yaml         # pre-commit configuration
โ”œโ”€โ”€ .flake8                         # flake8 configuration (run by pre-commit)
โ”œโ”€โ”€ .isort.cfg                      # isort configuration (run by pre-commit)
โ”œโ”€โ”€ requirements.txt                # dependencies for pip
โ””โ”€โ”€ .streamlit                      # configurations for streamlit (theme)
    โ””โ”€โ”€ config.toml                 # configurations for streamlit (theme)

Testing

Load tests

  • These tests check how app behaves under heavy load.
  • Used package: locust.

Run simple load tests

Perform simple load test by just visiting pages without interacting with any buttons or uploading any files.

locust -f tests/load_tests/simple_load_tests.py

Remember to put Host information without backlash at the end, for example:

  • http://localhost:8501 <- this is correct
  • http://localhost:8501/ <- this is incorrect

You can start the locust and simultaneously use the app yourself (or run functional tests), so you can see how the response time changes and ensure that there are no failures.

Functional tests

  • These tests check whether app visually looks and behaves as expected.
  • Used package: seleniumbase.

Run functional tests

First you need to specify the HOST_URL in tests/functional_tests/config.py file. By default it's set to http://localhost:8501.

Run all tests:

pytest tests/functional_tests/functional_tests.py --chrome --headless

Run single test (test_explore_page in this example):

pytest tests/functional_tests/functional_tests.py --chrome --headless -k test_explore_page
  • You can specify the number of concurrent users by adding -n=<number_of_users> flag.
  • You can remove the --headless flag if you want to make the testing browser visible.
  • You can change --edge to any browser you like, for example --chrome or --firefox.
  • You can make it slower by adding --slow flag.
  • You can highlight assertions by adding --demo flag.
  • You can add -k <test_name> flag to run only specific test.

Unit tests

  • These tests check whether individual functions work as expected.

Run unit tests

pytest tests/unit_tests

Generate documentation from docstrings

using doxygen

doxygen

using pdoc

pdoc src

pre-commit

Install the pre-commit Git hook to run it automatically before each commit

pre-commit install

Manually run autoformat and code quality check

pre-commit run --all-files

Command above runs the following:

  1. black - general code autoformatting
  2. flake8 - code quality check
  3. isort - imports autoformatting (alphabetical order)
  4. interrogate - check code for missing docstrings

dartml's People

Contributors

milosz-l avatar

Stargazers

Aviv Nur avatar lash_fire avatar

Watchers

Kostas Georgiou avatar  avatar

Forkers

avivnur

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.