From a31127c2bc35bd6a43733602ae174092f354bfb5 Mon Sep 17 00:00:00 2001 From: Michael Duong Date: Fri, 18 Aug 2023 12:46:13 +0100 Subject: [PATCH] Add requirements file --- .../simulation_system/MLModel/BaseMLModel.py | 5 +- model_data/simulation_system/core/Settings.py | 2 +- model_data/simulation_system/predictions.py | 2 + model_data/simulation_system/requirements.txt | 208 ++++++++++++++++++ 4 files changed, 215 insertions(+), 2 deletions(-) create mode 100644 model_data/simulation_system/requirements.txt diff --git a/model_data/simulation_system/MLModel/BaseMLModel.py b/model_data/simulation_system/MLModel/BaseMLModel.py index 54264259..42106a33 100644 --- a/model_data/simulation_system/MLModel/BaseMLModel.py +++ b/model_data/simulation_system/MLModel/BaseMLModel.py @@ -53,4 +53,7 @@ class MLModel(Protocol): """ Perfomance post processing on Model to ensure ready for deployment """ - + + def generate_meta_data(self): + """ + """ diff --git a/model_data/simulation_system/core/Settings.py b/model_data/simulation_system/core/Settings.py index f590934d..e562a39b 100644 --- a/model_data/simulation_system/core/Settings.py +++ b/model_data/simulation_system/core/Settings.py @@ -8,7 +8,7 @@ MODEL_HYPERPARAMETERS = { "autogluon": { 'problem_type': 'regression', 'eval_metric': 'mean_absolute_error', - 'time_limit': 75, + 'time_limit': 30, 'presets': 'medium_quality', 'excluded_model_types': None } diff --git a/model_data/simulation_system/predictions.py b/model_data/simulation_system/predictions.py index b650444f..bc1b113b 100644 --- a/model_data/simulation_system/predictions.py +++ b/model_data/simulation_system/predictions.py @@ -107,10 +107,12 @@ def prediction(target_column: str = "RDSAP_CHANGE", model_path: str = None, data uprn = data.index.values[0] # Saving prediction local for now + # TODO: change uprn to TARGET_ID, put in setting logger.info("--- Outputting prediction and metadata --- ") output_base = PREDICTION_LOCATION / target_column / uprn / TIMESTAMP output_base.mkdir(parents=True, exist_ok=True) + # TODO: change model.model.info to a class method for MLModel json_prediction = prediction.to_json(output_base / PREDICTION_FILE) prediction_metadata = { "model_type": model_type, diff --git a/model_data/simulation_system/requirements.txt b/model_data/simulation_system/requirements.txt new file mode 100644 index 00000000..a5f82332 --- /dev/null +++ b/model_data/simulation_system/requirements.txt @@ -0,0 +1,208 @@ +absl-py==1.4.0 +accelerate==0.16.0 +aiohttp==3.8.5 +aiohttp-cors==0.7.0 +aiosignal==1.3.1 +aliyun-python-sdk-core==2.13.36 +aliyun-python-sdk-kms==2.16.1 +antlr4-python3-runtime==4.9.3 +appnope==0.1.3 +asttokens==2.2.1 +async-timeout==4.0.3 +attrs==23.1.0 +autogluon==0.8.2 +autogluon.common==0.8.2 +autogluon.core==0.8.2 +autogluon.features==0.8.2 +autogluon.multimodal==0.8.2 +autogluon.tabular==0.8.2 +autogluon.timeseries==0.8.2 +backcall==0.2.0 +beautifulsoup4==4.12.2 +blessed==1.20.0 +blis==0.7.10 +boto3==1.28.26 +botocore==1.31.26 +cachetools==5.3.1 +catalogue==2.0.9 +catboost==1.1.1 +certifi==2023.7.22 +cffi==1.15.1 +charset-normalizer==3.2.0 +click==8.1.6 +cloudpickle==2.2.1 +colorama==0.4.6 +colorful==0.5.5 +comm==0.1.4 +confection==0.1.1 +contourpy==1.1.0 +crcmod==1.7 +cryptography==41.0.3 +cycler==0.11.0 +cymem==2.0.7 +datasets==2.14.4 +debugpy==1.6.7.post1 +decorator==5.1.1 +defusedxml==0.7.1 +dill==0.3.7 +distlib==0.3.7 +evaluate==0.3.0 +executing==1.2.0 +fastai==2.7.12 +fastcore==1.5.29 +fastdownload==0.0.7 +fastprogress==1.0.3 +filelock==3.12.2 +fonttools==4.42.0 +frozenlist==1.4.0 +fsspec==2023.6.0 +future==0.18.3 +gdown==4.7.1 +gluonts==0.13.3 +google-api-core==2.11.1 +google-auth==2.22.0 +google-auth-oauthlib==1.0.0 +googleapis-common-protos==1.60.0 +gpustat==1.1 +graphviz==0.20.1 +grpcio==1.49.1 +huggingface-hub==0.16.4 +hyperopt==0.2.7 +idna==3.4 +imageio==2.31.1 +ipykernel==6.25.1 +ipython==8.14.0 +jedi==0.19.0 +Jinja2==3.1.2 +jmespath==0.10.0 +joblib==1.3.2 +jsonschema==4.17.3 +jupyter_client==8.3.0 +jupyter_core==5.3.1 +kiwisolver==1.4.4 +langcodes==3.3.0 +lightgbm==3.3.5 +lightning-utilities==0.9.0 +llvmlite==0.40.1 +Markdown==3.4.4 +markdown-it-py==3.0.0 +MarkupSafe==2.1.3 +matplotlib==3.7.2 +matplotlib-inline==0.1.6 +mdurl==0.1.2 +mlforecast==0.7.3 +model-index==0.1.11 +msgpack==1.0.5 +multidict==6.0.4 +multiprocess==0.70.15 +murmurhash==1.0.9 +nest-asyncio==1.5.7 +networkx==3.1 +nlpaug==1.1.11 +nltk==3.8.1 +nptyping==2.4.1 +numba==0.57.1 +numpy==1.24.4 +nvidia-ml-py==12.535.77 +oauthlib==3.2.2 +omegaconf==2.2.3 +opencensus==0.11.2 +opencensus-context==0.1.3 +opendatalab==0.0.10 +openmim==0.3.9 +openxlab==0.0.17 +ordered-set==4.1.0 +oss2==2.17.0 +packaging==23.1 +pandas==1.5.3 +parso==0.8.3 +pathy==0.10.2 +patsy==0.5.3 +pexpect==4.8.0 +pickleshare==0.7.5 +Pillow==9.5.0 +platformdirs==3.10.0 +plotly==5.16.0 +preshed==3.0.8 +prometheus-client==0.17.1 +prompt-toolkit==3.0.39 +protobuf==3.20.2 +psutil==5.9.5 +ptyprocess==0.7.0 +pure-eval==0.2.2 +py-spy==0.3.14 +py4j==0.10.9.7 +pyarrow==12.0.1 +pyasn1==0.5.0 +pyasn1-modules==0.3.0 +pycparser==2.21 +pycryptodome==3.18.0 +pydantic==1.10.12 +Pygments==2.16.1 +pyparsing==3.0.9 +pyrsistent==0.19.3 +PySocks==1.7.1 +pytesseract==0.3.10 +python-dateutil==2.8.2 +pytorch-lightning==1.9.5 +pytorch-metric-learning==1.7.3 +pytz==2023.3 +PyWavelets==1.4.1 +PyYAML==6.0.1 +pyzmq==25.1.1 +ray==2.3.1 +regex==2023.8.8 +requests==2.28.2 +requests-oauthlib==1.3.1 +responses==0.18.0 +rich==13.4.2 +rsa==4.9 +s3transfer==0.6.1 +safetensors==0.3.2 +scikit-image==0.19.3 +scikit-learn==1.2.2 +scipy==1.11.1 +sentencepiece==0.1.99 +seqeval==1.2.2 +six==1.16.0 +smart-open==6.3.0 +soupsieve==2.4.1 +spacy==3.6.1 +spacy-legacy==3.0.12 +spacy-loggers==1.0.4 +srsly==2.4.7 +stack-data==0.6.2 +statsforecast==1.4.0 +statsmodels==0.14.0 +tabulate==0.9.0 +tenacity==8.2.3 +tensorboard==2.14.0 +tensorboard-data-server==0.7.1 +tensorboardX==2.6.2 +text-unidecode==1.3 +thinc==8.1.12 +threadpoolctl==3.2.0 +tifffile==2023.8.12 +timm==0.9.5 +tokenizers==0.13.3 +toolz==0.12.0 +torch==1.13.1 +torchmetrics==0.11.4 +torchvision==0.14.1 +tornado==6.3.3 +tqdm==4.65.2 +traitlets==5.9.0 +transformers==4.26.1 +typer==0.9.0 +typing_extensions==4.7.1 +tzdata==2023.3 +ujson==5.8.0 +urllib3==1.26.16 +virtualenv==20.24.3 +wasabi==1.1.2 +wcwidth==0.2.6 +Werkzeug==2.3.7 +window-ops==0.0.14 +xgboost==1.7.6 +xxhash==3.3.0 +yarl==1.9.2