Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.13.4 instead.

CircleCI Documentation Status Codecov Badge

Multi-Agent System for Metrology for Factory of the Future (Met4FoF) Code

This is supported by European Metrology Programme for Innovation and Research (EMPIR) under the project Metrology for the Factory of the Future (Met4FoF), project number 17IND12. (https://www.ptb.de/empir2018/met4fof/home/)

About

  • How can metrological input be incorporated into an agent-based system for addressing uncertainty of machine learning in future manufacturing?
  • Includes agent-based simulation and implementation
  • Readthedocs documentation is available at (https://agentmet4fof.readthedocs.io)

Use agentMET4FOF

The easiest way to get started with agentMET4FOF is navigating to the folder in which you want to create a virtual Python environment (venv), create one based on Python 3.6 or later, activate it, then install agentMET4FOF from PyPI.org and then work through the tutorials or examples. At the moment there seems to be something wrong with one of our dependencies, so please install the specified dependency versions. We included the according step in the following guides.

Create a virtual environment on Windows

In your Windows PowerShell execute the following to set up a virtual environment in a folder of your choice and execute the first tutorial.

PS C:> cd C:\LOCAL\PATH\TO\ENVS
PS C:\LOCAL\PATH\TO\ENVS> py -3 -m venv agentMET4FOF_venv
PS C:\LOCAL\PATH\TO\ENVS> agentMET4FOF_venv\Scripts\activate
(agentMET4FOF_venv) PS C:\LOCAL\PATH\TO\ENVS> python -m pip install --upgrade pip agentMET4FOF
Collecting agentMET4FOF
...
Successfully installed agentMET4FOF-... ...
(agentMET4FOF_venv) PS C:\LOCAL\PATH\TO\ENVS> python -m pip install --upgrade -r requirements.txt
(agentMET4FOF_venv) PS C:\LOCAL\PATH\TO\ENVS> python
Python ... (default, ..., ...) 
[GCC ...] on ...
Type "help", "copyright", "credits" or "license" for more information.
>>> from agentMET4FOF_tutorials import tutorial_1_generator_agent
>>> tutorial_1_generator_agent.demonstrate_generator_agent_use()
Starting NameServer...
Broadcast server running on 0.0.0.0:9091
NS running on 127.0.0.1:3333 (127.0.0.1)
URI = PYRO:Pyro.NameServer@127.0.0.1:3333
INFO [2020-02-21 19:04:26.961014] (AgentController): INITIALIZED
INFO [2020-02-21 19:04:27.032258] (Logger): INITIALIZED
 * Serving Flask app "agentMET4FOF.dashboard.Dashboard" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://127.0.0.1:8050/ (Press CTRL+C to quit)
...

Create a virtual environment on Mac and Linux

In your terminal execute the following to set up a virtual environment in a folder of your choice and execute the first tutorial.

$ cd /LOCAL/PATH/TO/ENVS
$ python3 -m venv agentMET4FOF_venv
$ source agentMET4FOF_venv/bin/activate
(agentMET4FOF_venv) $ pip install --upgrade pip agentMET4FOF
Collecting agentMET4FOF
...
Successfully installed agentMET4FOF-... ...
(agentMET4FOF_venv) $ python -m pip install --upgrade -r requirements.txt
(agentMET4FOF_venv) $ python
Python ... (default, ..., ...) 
[GCC ...] on ...
Type "help", "copyright", "credits" or "license" for more information.
>>> from agentMET4FOF_tutorials import tutorial_1_generator_agent
>>> tutorial_1_generator_agent.demonstrate_generator_agent_use()
Starting NameServer...
Broadcast server running on 0.0.0.0:9091
NS running on 127.0.0.1:3333 (127.0.0.1)
URI = PYRO:Pyro.NameServer@127.0.0.1:3333
INFO [2020-02-21 19:04:26.961014] (AgentController): INITIALIZED
INFO [2020-02-21 19:04:27.032258] (Logger): INITIALIZED
 * Serving Flask app "agentMET4FOF.dashboard.Dashboard" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://127.0.0.1:8050/ (Press CTRL+C to quit)
...

Inspect dashboard

Now you can visit http://127.0.0.1:8050/ with any Browser and watch the SineGenerator agent you just spawned.

To get some insights and really get going please visit agentMET4FOF.readthedocs.io .

Get started developing

First clone the repository to your local machine as described here. To get started with your present Anaconda installation just go to Anaconda prompt, navigate to your local clone

cd /LOCAL/PATH/TO/agentMET4FOF

and execute

conda env create --file environment.yml 

This will create an Anaconda virtual environment with all dependencies satisfied. If you don't have Anaconda installed already follow this guide first, then create the virtual environment as stated above and then proceed.

Alternatively, for non-conda environments, you can install the dependencies using pip

pip install -r requirements.txt

First take a look at the tutorials and examples or start hacking if you already are familiar with agentMET4FOF and want to customize your agents' network.

Alternatively, watch the tutorial webinar here

Updates

  • Implemented base class AgentMET4FOF with built-in agent classes DataStreamAgent, MonitorAgent
  • Implemented class AgentNetwork to start or connect to a agent server
  • Implemented with ZEMA prognosis of Electromechanical cylinder data set as use case DOI
  • Implemented interactive web application with user interface

Screenshot of web visualization

Web Screenshot

Orphaned processes

In the event of agents not terminating cleanly, you can end all Python processes running on your system (caution: the following commands affect all running Python processes, not just those that emerged from the agents).

Killing all Python processes in Windows

In your Windows command prompt execute the following to terminate all python processes.

> taskkill /f /im python.exe /t
>

Killing all Python processes on Mac and Linux

In your terminal execute the following to terminate all python processes.

$ pkill python
$

Metadata

Release files for agentMET4FOF 0.2.0.dev1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentMET4FOF 0.2.0.dev1
File Size Uploaded
agentMET4FOF-0.2.0.dev1.tar.gz 30.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentMET4FOF 0.2.0.dev1
File Interpreter ABI Platform
agentMET4FOF-0.2.0.dev1-py3-none-any.whl Python 3 none any Details

Total release size: 63.6 kB

Release files / agentMET4FOF-0.2.0.dev1.tar.gz

Download URL agentMET4FOF-0.2.0.dev1.tar.gz
Size 30.6 kB
Tags Source
SHA-256 checksum
How to use checksums
257cb783db318fbd8e0a0030b395ac4c0d8e7f7fdae54b7039b615e87cc43dc0
BLAKE2b-256 checksum
How to use checksums
827bf87bb2361a98a956f495487f18f9695155252dfa510773ed193d0cfbf4b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8

Release files / agentMET4FOF-0.2.0.dev1-py3-none-any.whl

Download URL agentMET4FOF-0.2.0.dev1-py3-none-any.whl
Size 33.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7615176aa797603f036693ec2f80e5ecac7061e1a2d54114325a7a91733e1608
BLAKE2b-256 checksum
How to use checksums
bbf494336cbdd8f15f94f7bf11aed82c37ce5c1fb42a9dbd1c13fc612f9c7210
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page