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.111.tar.gz (20.6 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.111-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vfm_tool-1.111.tar.gz
  • Upload date:
  • Size: 20.6 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.111.tar.gz
Algorithm Hash digest
SHA256 f27987cc4de7684b9ec6602198ba4bac4aa8d4a08be2c89d1ef2c8f552c5ae19
MD5 5d5d855546613d3703930e613a2c6873
BLAKE2b-256 51427bf6756464b9235b936280cb79e18af16b91bf4cd6a84f740d80912b95d3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vfm_tool-1.111-py3-none-any.whl
  • Upload date:
  • Size: 22.9 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.111-py3-none-any.whl
Algorithm Hash digest
SHA256 ceb6d7af74205edaf1d815d9ef02c6ba333c5950d7496ed0bdc90d63f6b02e3a
MD5 f1b4b4a1f462f7715e8e9dbe1714a51c
BLAKE2b-256 1f7fe12736b485b01068c9bcb95ad22568d0484d1069f5073ba3784fc22f7e5f

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