mg-pso-gui


Namemg-pso-gui JSON
Version 0.1.243 PyPI version JSON
download
home_pageNone
SummaryGUI for MG-PSO
upload_time2024-11-13 22:28:41
maintainerNone
docs_urlNone
authorRobert Cordingly
requires_pythonNone
licenseNone
keywords python muti-group pso particle swarm optimization gui
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Multigroup PSO GUI

This application provides an interface for setting up, configuring, running, and the visualization of multigroup PSO training.

## Instructions for Ubuntu

To run the interface you must also install Tkinter:

```bash
sudo apt install python-tk
```

To install the interface simply run:

```bash
python3 -m pip install mg-pso-gui
```

Once the package is downloaded and install run this command to open the interface:

```bash
mgpsogui
```

You may need to add a folder to PATH.

**Note:** If you run into an error saying that PIL.Image was not able to be imported on Ubuntu please force reinstall Pillow.

```bash
python3 -m pip install --upgrade --force-reinstall Pillow
```

## Instructions for Windows

Download and install Python 3.10 through the Microsoft Store, this makes Python easily accessible in Windows Terminal.

Once installed run this command to install the interface:

```bash
python3 -m pip install mg-pso-gui
```

You may need to add the folder the application was downloaded to into PATH. At the end of the installation message it will say the folder location (e.g. C:\Users\robertcordingly\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts). After adding that location to PATH, you can use this command to open the interface:

```bash
mgpsogui
```

If you did not add the directory to PATH, it can be ran like this:

```bash
C:\Users\robertcordingly\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts\mgpsogui.exe
```

## Instructions for MacOS

To install Tkinter and Python 3 it is best to use Homebrew:

Install Homebrew

```bash
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```

Install Python3 and Tkinter

```bash
brew install python3
```

```bash
brew install tkinter
```

Then install MG PSO Gui:

```bash
python3 -m pip install mg-pso-gui
```

You may need to add /Library/Frameworks/Python.framework/Versions/3.10/bin to path to run the interface with 'mgpsogui,' otherwise run the interface:

```bash
/Library/Frameworks/Python.framework/Versions/3.10/bin/mgpsogui
```

# Getting Started

After getting the GUI to launch, it is first recommended to start with one of the default config files. Default config files are available here: https://drive.google.com/file/d/1Ra4Um7KgCghMidyrrLrD6wFSXJZd3zkX/view?usp=share_link

To load a config simply click the "load" button in the left side bar and select the file using the file picker. After a config has been loaded, enter a service URL, and click "Connect".  If the connection is successful the other tabs on the interface will be unlocked and you will have full access to all of the interface's features.

# Tab Overview

Each tab of the interface serves a different purpose described here.

## Platform

The platform tab is where you defined the backend service used to train the model. If the service already exists, simply add the URL to the service field and press connect to get parameters from the service. After doing this the other tabs will unlock.

If you do not already have a backend service deployed, the platform tab provides tools to create a local environment using Docker and Minikube.

## Setup

The setup tab is where all parameters about the training process are defined. The Group Editor allow you to define groups, the parameters each group uses, and the functions used. The available parameters are defined by the service.

Alongside the Group Editor is the Static Parameter and Calibration Parameter editors. These editors allow further customization of the training process.

## Run

The run tab allows you to start the training process, stop it, and view the progress. If there is an error in the training process information will be shown in the text box.

## Visualize

The Visualize tab allows you to generate a variety of different graphs and tables. Some graphs are filled in while the training process occurs while other require full steps to complete training. To export and further view graphs the "Open in Browser" allows a figure to be opened in your default web browser and open and interactive version of the graph.

# Example Configuration

```json
{
    "arguments": {
        "param": [
            {
                "name": "startTime",
                "value": "2002-01-01"
            },
            {
                "name": "endTime",
                "value": "2006-12-31"
            },
            {
                "name": "dataStartTime",
                "value": "2002-01-01"
            },
            {
                "name": "dataEndTime",
                "value": "2006-12-31"
            },
            {
                "name": "cal_startTime",
                "value": "2003-01-01"
            },
            {
                "name": "cal_endTime",
                "value": "2006-12-31"
            },
            {
                "name": "parallelismThreads",
                "value": "2"
            },
            {
                "name": "flagLoadState",
                "value": "True"
            },
            {
                "name": "payload",
                "value": "false"
            },
            {
                "name": "project",
                "value": "SFIR3"
            }
        ],
        "url": "http://csip.engr.colostate.edu:8087/csip-oms/m/ages/0.3.0",
        "files": {}
    },
    "calibration_parameters": [
        {
            "name": "min_rounds",
            "value": "1"
        },
        {
            "name": "max_rounds",
            "value": "2"
        },
        {
            "name": "n_particles",
            "value": "10"
        },
        {
            "name": "iters",
            "value": "20"
        },
        {
            "name": "n_threads",
            "value": "10"
        },
        {
            "name": "ftol",
            "value": "NULL"
        },
        {
            "name": "options_c1",
            "value": "2"
        },
        {
            "name": "options_c2",
            "value": "2"
        },
        {
            "name": "options_w",
            "value": "0.8"
        },
        {
            "name": "strategy_w",
            "value": "adaptive"
        },
        {
            "name": "strategy_c1",
            "value": "adaptive"
        },
        {
            "name": "strategy_c2",
            "value": "adaptive"
        },
        {
            "name": "service_timeout",
            "value": "400"
        },
        {
            "name": "http_retry",
            "value": "5"
        },
        {
            "name": "allow_redirects",
            "value": "True"
        },
        {
            "name": "async_call",
            "value": "False"
        },
        {
            "name": "conn_timeout",
            "value": "10"
        },
        {
            "name": "read_timeout",
            "value": "400"
        },
        {
            "name": "particles_fail",
            "value": "5"
        }
    ],
    "steps": [
        {
            "param": [
                {
                    "name": "soilOutLPS",
                    "bounds": [
                        0.0,
                        2.0
                    ]
                },
                {
                    "name": "lagInterflow",
                    "bounds": [
                        10.0,
                        80.0
                    ]
                }
            ],
            "objfunc": [
                {
                    "name": "ns",
                    "of": "ns",
                    "weight": 1.0,
                    "data": [
                        "obs_data02_14.csv/obs/orun[1]",
                        "output/csip_run/out/Outlet.csv/output/catchmentSimRunoff"
                    ]
                }
            ]
        },
        {
            "param": [
                {
                    "name": "flowRouteTA",
                    "bounds": [
                        0.4,
                        5.0
                    ]
                },
                {
                    "name": "soilMaxDPS",
                    "bounds": [
                        0.0,
                        5.0
                    ]
                }
            ],
            "objfunc": [
                {
                    "name": "ns",
                    "of": "ns",
                    "weight": 1.0,
                    "data": [
                        "obs_data02_14.csv/obs/orun[1]",
                        "output/csip_run/out/Outlet.csv/output/catchmentSimRunoff"
                    ]
                }
            ]
        }
    ]
}
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mg-pso-gui",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python, muti-group, pso, particle, swarm, optimization, gui",
    "author": "Robert Cordingly",
    "author_email": "<rcording@uw.ed>",
    "download_url": "https://files.pythonhosted.org/packages/6b/cc/f858467dbc16a69f91222f226d35da7d7e5d1ddf050925e2ef92a0c74ff3/mg_pso_gui-0.1.243.tar.gz",
    "platform": null,
    "description": "# Multigroup PSO GUI\n\nThis application provides an interface for setting up, configuring, running, and the visualization of multigroup PSO training.\n\n## Instructions for Ubuntu\n\nTo run the interface you must also install Tkinter:\n\n```bash\nsudo apt install python-tk\n```\n\nTo install the interface simply run:\n\n```bash\npython3 -m pip install mg-pso-gui\n```\n\nOnce the package is downloaded and install run this command to open the interface:\n\n```bash\nmgpsogui\n```\n\nYou may need to add a folder to PATH.\n\n**Note:** If you run into an error saying that PIL.Image was not able to be imported on Ubuntu please force reinstall Pillow.\n\n```bash\npython3 -m pip install --upgrade --force-reinstall Pillow\n```\n\n## Instructions for Windows\n\nDownload and install Python 3.10 through the Microsoft Store, this makes Python easily accessible in Windows Terminal.\n\nOnce installed run this command to install the interface:\n\n```bash\npython3 -m pip install mg-pso-gui\n```\n\nYou may need to add the folder the application was downloaded to into PATH. At the end of the installation message it will say the folder location (e.g. C:\\Users\\robertcordingly\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\Scripts). After adding that location to PATH, you can use this command to open the interface:\n\n```bash\nmgpsogui\n```\n\nIf you did not add the directory to PATH, it can be ran like this:\n\n```bash\nC:\\Users\\robertcordingly\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\Scripts\\mgpsogui.exe\n```\n\n## Instructions for MacOS\n\nTo install Tkinter and Python 3 it is best to use Homebrew:\n\nInstall Homebrew\n\n```bash\nruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\n```\n\nInstall Python3 and Tkinter\n\n```bash\nbrew install python3\n```\n\n```bash\nbrew install tkinter\n```\n\nThen install MG PSO Gui:\n\n```bash\npython3 -m pip install mg-pso-gui\n```\n\nYou may need to add /Library/Frameworks/Python.framework/Versions/3.10/bin to path to run the interface with 'mgpsogui,' otherwise run the interface:\n\n```bash\n/Library/Frameworks/Python.framework/Versions/3.10/bin/mgpsogui\n```\n\n# Getting Started\n\nAfter getting the GUI to launch, it is first recommended to start with one of the default config files. Default config files are available here: https://drive.google.com/file/d/1Ra4Um7KgCghMidyrrLrD6wFSXJZd3zkX/view?usp=share_link\n\nTo load a config simply click the \"load\" button in the left side bar and select the file using the file picker. After a config has been loaded, enter a service URL, and click \"Connect\".  If the connection is successful the other tabs on the interface will be unlocked and you will have full access to all of the interface's features.\n\n# Tab Overview\n\nEach tab of the interface serves a different purpose described here.\n\n## Platform\n\nThe platform tab is where you defined the backend service used to train the model. If the service already exists, simply add the URL to the service field and press connect to get parameters from the service. After doing this the other tabs will unlock.\n\nIf you do not already have a backend service deployed, the platform tab provides tools to create a local environment using Docker and Minikube.\n\n## Setup\n\nThe setup tab is where all parameters about the training process are defined. The Group Editor allow you to define groups, the parameters each group uses, and the functions used. The available parameters are defined by the service.\n\nAlongside the Group Editor is the Static Parameter and Calibration Parameter editors. These editors allow further customization of the training process.\n\n## Run\n\nThe run tab allows you to start the training process, stop it, and view the progress. If there is an error in the training process information will be shown in the text box.\n\n## Visualize\n\nThe Visualize tab allows you to generate a variety of different graphs and tables. Some graphs are filled in while the training process occurs while other require full steps to complete training. To export and further view graphs the \"Open in Browser\" allows a figure to be opened in your default web browser and open and interactive version of the graph.\n\n# Example Configuration\n\n```json\n{\n    \"arguments\": {\n        \"param\": [\n            {\n                \"name\": \"startTime\",\n                \"value\": \"2002-01-01\"\n            },\n            {\n                \"name\": \"endTime\",\n                \"value\": \"2006-12-31\"\n            },\n            {\n                \"name\": \"dataStartTime\",\n                \"value\": \"2002-01-01\"\n            },\n            {\n                \"name\": \"dataEndTime\",\n                \"value\": \"2006-12-31\"\n            },\n            {\n                \"name\": \"cal_startTime\",\n                \"value\": \"2003-01-01\"\n            },\n            {\n                \"name\": \"cal_endTime\",\n                \"value\": \"2006-12-31\"\n            },\n            {\n                \"name\": \"parallelismThreads\",\n                \"value\": \"2\"\n            },\n            {\n                \"name\": \"flagLoadState\",\n                \"value\": \"True\"\n            },\n            {\n                \"name\": \"payload\",\n                \"value\": \"false\"\n            },\n            {\n                \"name\": \"project\",\n                \"value\": \"SFIR3\"\n            }\n        ],\n        \"url\": \"http://csip.engr.colostate.edu:8087/csip-oms/m/ages/0.3.0\",\n        \"files\": {}\n    },\n    \"calibration_parameters\": [\n        {\n            \"name\": \"min_rounds\",\n            \"value\": \"1\"\n        },\n        {\n            \"name\": \"max_rounds\",\n            \"value\": \"2\"\n        },\n        {\n            \"name\": \"n_particles\",\n            \"value\": \"10\"\n        },\n        {\n            \"name\": \"iters\",\n            \"value\": \"20\"\n        },\n        {\n            \"name\": \"n_threads\",\n            \"value\": \"10\"\n        },\n        {\n            \"name\": \"ftol\",\n            \"value\": \"NULL\"\n        },\n        {\n            \"name\": \"options_c1\",\n            \"value\": \"2\"\n        },\n        {\n            \"name\": \"options_c2\",\n            \"value\": \"2\"\n        },\n        {\n            \"name\": \"options_w\",\n            \"value\": \"0.8\"\n        },\n        {\n            \"name\": \"strategy_w\",\n            \"value\": \"adaptive\"\n        },\n        {\n            \"name\": \"strategy_c1\",\n            \"value\": \"adaptive\"\n        },\n        {\n            \"name\": \"strategy_c2\",\n            \"value\": \"adaptive\"\n        },\n        {\n            \"name\": \"service_timeout\",\n            \"value\": \"400\"\n        },\n        {\n            \"name\": \"http_retry\",\n            \"value\": \"5\"\n        },\n        {\n            \"name\": \"allow_redirects\",\n            \"value\": \"True\"\n        },\n        {\n            \"name\": \"async_call\",\n            \"value\": \"False\"\n        },\n        {\n            \"name\": \"conn_timeout\",\n            \"value\": \"10\"\n        },\n        {\n            \"name\": \"read_timeout\",\n            \"value\": \"400\"\n        },\n        {\n            \"name\": \"particles_fail\",\n            \"value\": \"5\"\n        }\n    ],\n    \"steps\": [\n        {\n            \"param\": [\n                {\n                    \"name\": \"soilOutLPS\",\n                    \"bounds\": [\n                        0.0,\n                        2.0\n                    ]\n                },\n                {\n                    \"name\": \"lagInterflow\",\n                    \"bounds\": [\n                        10.0,\n                        80.0\n                    ]\n                }\n            ],\n            \"objfunc\": [\n                {\n                    \"name\": \"ns\",\n                    \"of\": \"ns\",\n                    \"weight\": 1.0,\n                    \"data\": [\n                        \"obs_data02_14.csv/obs/orun[1]\",\n                        \"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff\"\n                    ]\n                }\n            ]\n        },\n        {\n            \"param\": [\n                {\n                    \"name\": \"flowRouteTA\",\n                    \"bounds\": [\n                        0.4,\n                        5.0\n                    ]\n                },\n                {\n                    \"name\": \"soilMaxDPS\",\n                    \"bounds\": [\n                        0.0,\n                        5.0\n                    ]\n                }\n            ],\n            \"objfunc\": [\n                {\n                    \"name\": \"ns\",\n                    \"of\": \"ns\",\n                    \"weight\": 1.0,\n                    \"data\": [\n                        \"obs_data02_14.csv/obs/orun[1]\",\n                        \"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff\"\n                    ]\n                }\n            ]\n        }\n    ]\n}\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "GUI for MG-PSO",
    "version": "0.1.243",
    "project_urls": null,
    "split_keywords": [
        "python",
        " muti-group",
        " pso",
        " particle",
        " swarm",
        " optimization",
        " gui"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "86f46e69bb6e7c4ac4e15a25f3e1dcd5a0505391d2f4d6fd3a392eabcd95d6b1",
                "md5": "4ba1c24f646ce6dbb7b0b4623478f68b",
                "sha256": "03a402d9d98b0ed8becaf22654adbff57048cc702de2309b2e58b3b955a0c7e7"
            },
            "downloads": -1,
            "filename": "mg_pso_gui-0.1.243-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4ba1c24f646ce6dbb7b0b4623478f68b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 123225,
            "upload_time": "2024-11-13T22:28:39",
            "upload_time_iso_8601": "2024-11-13T22:28:39.755143Z",
            "url": "https://files.pythonhosted.org/packages/86/f4/6e69bb6e7c4ac4e15a25f3e1dcd5a0505391d2f4d6fd3a392eabcd95d6b1/mg_pso_gui-0.1.243-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6bccf858467dbc16a69f91222f226d35da7d7e5d1ddf050925e2ef92a0c74ff3",
                "md5": "5fc7be40fdfde0c148e04668a1fce828",
                "sha256": "2b6ef2dd1972466af91386f9845ca00e88be303acb05ca45cffdae5a5769d454"
            },
            "downloads": -1,
            "filename": "mg_pso_gui-0.1.243.tar.gz",
            "has_sig": false,
            "md5_digest": "5fc7be40fdfde0c148e04668a1fce828",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 97265,
            "upload_time": "2024-11-13T22:28:41",
            "upload_time_iso_8601": "2024-11-13T22:28:41.779529Z",
            "url": "https://files.pythonhosted.org/packages/6b/cc/f858467dbc16a69f91222f226d35da7d7e5d1ddf050925e2ef92a0c74ff3/mg_pso_gui-0.1.243.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-13 22:28:41",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mg-pso-gui"
}
        
Elapsed time: 0.63768s