Skip to main content

Individual MSc Project

Project description

Independant Research Project - ACSE 9

Author

Nicolas Trinephi
Student Number: 01212102
e-mail: nicolas.trinephi@imperial.ac.uk GitHub: acse-nt719

Welcome to the vfm_tool

This package contains the code for the Imperial College ACSE-9 Individual Research Project: 'Deep Learning in Virtual Flow Metering'. It is common practice to share production licenses by equity, thus monitoring production Flow is crucial. This package contains tools to create data frames from well data and machine learning to predict oil, gas and water rates from that data. These predictions can be used to calibrate existing physical sensors or be expanded for real time monitoring.

Installation

The repository can be cloned via Azure DevOps:

  • by downloading the zip file and unzipping locally
  • using the following command
git clone https://wintershalldea@dev.azure.com/wintershalldea/Data%20Science/_git/IC-VFM

and navigating to the desired repository. You can now use the modules and have access to the images and notebooks provided

The package only contains the modules since there is some undisclosable information elsewhere. The package is available on PyPI, installation works as follows:

  • Databricks Cluster:
    • PyPI installation via cluster -> libraries -> new library -> PyPI -> enter vfm_tool
    • .whl installation via cluster -> libraries -> Upload New -> Python whl -> drag .whl file into the prompt box
    • in-notebook installattion by running the following command in a cell, this needs to be run on each cluster start:
      !pip install vfm_tool
      
  • Locally:
    • PyPI installation on the command line by running
      pip install vfm_tool
      

Package Contents:

vfm_tool/  
├── __pycache__/
    └── *.cpython-37.pyc
├── __init__.py  
├── model.py  
├── Pandas_data.py  
├── q_control.py  
├── Spark_data.py  
├── Utils.py   
└── visualization.py  

Additional documentation about the package can be find in the documentation directory. Open index.html in your favorite browser.

Requirements

Make sure to have all dependencies installed, they are already installed on the cluster:

  • Command line:

     pip install -r requirements.txt
    
  • Azure Databricks Notebook

     !pip install -r requirements.txt
    
  • Caution! Databricks may require python restart for mlfow installation even if it is installed on the cluster, run the below commands before importing mlflow:

    dbutils.library.installPyPI("mlflow")
    dbutils.library.restartPython()
    
  • Alternatively, the .whl or tar.gz files can be used for installation on Databricks or locally.

Usage

from vfm_tool import LSTMmodel

input = pd.DataFrame(my_data)
name = 'model_name'

my_model = LSTMmodel.VFM_LSTM(input, name) # creates instance of VFM_LSTM

On an Azure Databricks Notebook, it is possible to run the modules if they are located in your workspace directory, the contents become global:
Less standard, requires slight syntax change and the magic command must be run in its own cell.

%run your_workspace/vfm_tool/LSTMmodel
input = pd.DataFrame(my_data)
name = 'model_name'

my_model = VFM_LSTM(input, name) # creates instance of VFM_LSTM

A demo is provided in the form of a notebook the notebook directory.

Testing

Testing modules can be found in the vfm_tool_tests/ directory.

License

This repository uses the MIT license

Version

Current code version is 1.11

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vfm_tool-1.131.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vfm_tool-1.131-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file vfm_tool-1.131.tar.gz.

File metadata

  • Download URL: vfm_tool-1.131.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for vfm_tool-1.131.tar.gz
Algorithm Hash digest
SHA256 de66a4684654873afe8e9b5fcfa952d1acd8674d2eb5ef991ac8d1fa32df2790
MD5 bb95837970a364d3ef8a6e7f741a2db7
BLAKE2b-256 cb314a577793e8657cb2605d3b1f0e8ac7ddef54cbd1893e99ef9191966e0b1d

See more details on using hashes here.

File details

Details for the file vfm_tool-1.131-py3-none-any.whl.

File metadata

  • Download URL: vfm_tool-1.131-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for vfm_tool-1.131-py3-none-any.whl
Algorithm Hash digest
SHA256 489eea47cb63654b7d7597e9403a0ed8e4c2091fa32bff6b8e82ea85093f93d7
MD5 4b0f1285c295bebcfe51dafae3dbbc35
BLAKE2b-256 442d3ced2b4297e0cbf606fb431829b3f138966fff641f51b713afcf9eec671d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page