From 955d40d1d177dc1c26f5f814b2555a1228ed2fe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pokrywka?= Date: Sun, 22 May 2022 23:45:49 +0200 Subject: [PATCH] CONDA finished however Mlfow abondoned :( --- deepl.py | 12 ++- environment.yml | 198 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 207 insertions(+), 3 deletions(-) create mode 100644 environment.yml diff --git a/deepl.py b/deepl.py index 781b755..461c843 100644 --- a/deepl.py +++ b/deepl.py @@ -13,7 +13,7 @@ import matplotlib.pyplot as plt import sys import mlflow from mlflow.models import infer_signature - +from urllib.parse import urlparse mlflow.set_experiment("s444463x") def convert_text_to_model_form(text): @@ -184,8 +184,14 @@ def train(epochs): torch.save(model, 'model') input_example = data_train[:5] siganture = infer_signature(input_example, np.array(['company_profile'])) - mlflow.pytorch.log_model(model, "modelML", signature=siganture, input_example=input_example) - mlflow.pytorch.save_model(model, "modelML", signature=siganture, input_example=input_example) + + # path = urlparse(mlflow.get_tracking_uri()).scheme + + # if path != "file": + # mlflow.pytorch.log_model(model, "modelML", signature=siganture, input_example=input_example) + # else: + # mlflow.pytorch.log_model(model, "modelML", signature=siganture, input_example=input_example) + # mlflow.pytorch.save_model(model, "modelML", signature=siganture, input_example=input_example) print(sys.argv[1]) diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..c31f581 --- /dev/null +++ b/environment.yml @@ -0,0 +1,198 @@ +name: envDeepl +channels: + - conda-forge + - defaults +dependencies: + - _libgcc_mutex=0.1=conda_forge + - _openmp_mutex=4.5=2_gnu + - alembic=1.7.7=pyhd8ed1ab_0 + - alsa-lib=1.2.3.2=h166bdaf_0 + - appdirs=1.4.4=pyh9f0ad1d_0 + - asn1crypto=1.5.1=pyhd8ed1ab_0 + - attr=2.5.1=h166bdaf_0 + - brotli=1.0.9=h166bdaf_7 + - brotli-bin=1.0.9=h166bdaf_7 + - brotlipy=0.7.0=py310h5764c6d_1004 + - bzip2=1.0.8=h7f98852_4 + - ca-certificates=2022.5.18.1=ha878542_0 + - certifi=2022.5.18.1=py310hff52083_0 + - cffi=1.15.0=py310h0fdd8cc_0 + - charset-normalizer=2.0.12=pyhd8ed1ab_0 + - click=8.1.3=py310hff52083_0 + - cloudpickle=2.1.0=pyhd8ed1ab_0 + - colorama=0.4.4=pyh9f0ad1d_0 + - configparser=5.2.0=pyhd8ed1ab_0 + - cryptography=37.0.2=py310h597c629_0 + - cycler=0.11.0=pyhd8ed1ab_0 + - databricks-cli=0.12.1=pyhd8ed1ab_0 + - dbus=1.13.6=h5008d03_3 + - docker-py=5.0.3=py310hff52083_2 + - docker-pycreds=0.4.0=py_0 + - docopt=0.6.2=py_1 + - entrypoints=0.4=pyhd8ed1ab_0 + - expat=2.4.8=h27087fc_0 + - fftw=3.3.10=nompi_h77c792f_102 + - flask=2.1.2=pyhd8ed1ab_1 + - font-ttf-dejavu-sans-mono=2.37=hab24e00_0 + - font-ttf-inconsolata=3.000=h77eed37_0 + - font-ttf-source-code-pro=2.038=h77eed37_0 + - font-ttf-ubuntu=0.83=hab24e00_0 + - fontconfig=2.14.0=h8e229c2_0 + - fonts-conda-ecosystem=1=0 + - fonts-conda-forge=1=0 + - fonttools=4.33.3=py310h5764c6d_0 + - freetype=2.10.4=h0708190_1 + - gettext=0.19.8.1=h73d1719_1008 + - giflib=5.2.1=h36c2ea0_2 + - gitdb=4.0.9=pyhd8ed1ab_0 + - gitpython=3.1.27=pyhd8ed1ab_0 + - greenlet=1.1.2=py310hd8f1fbe_2 + - gst-plugins-base=1.20.2=hcf0ee16_0 + - gstreamer=1.20.2=hd4edc92_1 + - gunicorn=20.1.0=py310hff52083_2 + - icu=70.1=h27087fc_0 + - idna=3.3=pyhd8ed1ab_0 + - importlib-metadata=4.11.3=py310hff52083_1 + - importlib_metadata=4.11.3=hd8ed1ab_1 + - importlib_resources=5.7.1=pyhd8ed1ab_1 + - intel-openmp=2022.0.1=h06a4308_3633 + - itsdangerous=2.1.2=pyhd8ed1ab_0 + - jack=1.9.18=hfd4fe87_1001 + - jbig=2.1=h7f98852_2003 + - jinja2=3.1.2=pyhd8ed1ab_0 + - joblib=1.1.0=pyhd8ed1ab_0 + - jpeg=9e=h166bdaf_1 + - json-c=0.15=h98cffda_0 + - jsonpickle=1.5.1=pyhd8ed1ab_0 + - kaggle=1.5.12=pyhd8ed1ab_4 + - keyutils=1.6.1=h166bdaf_0 + - kiwisolver=1.4.2=py310hbf28c38_1 + - krb5=1.19.3=h3790be6_0 + - lcms2=2.12=hddcbb42_0 + - ld_impl_linux-64=2.36.1=hea4e1c9_2 + - lerc=3.0=h9c3ff4c_0 + - libblas=3.9.0=14_linux64_mkl + - libbrotlicommon=1.0.9=h166bdaf_7 + - libbrotlidec=1.0.9=h166bdaf_7 + - libbrotlienc=1.0.9=h166bdaf_7 + - libcap=2.51=h166bdaf_1 + - libcblas=3.9.0=14_linux64_mkl + - libclang=14.0.3=default_h2e3cab8_0 + - libclang13=14.0.3=default_h3a83d3e_0 + - libcups=2.3.3=hf5a7f15_1 + - libdb=6.2.32=h9c3ff4c_0 + - libdeflate=1.10=h7f98852_0 + - libedit=3.1.20191231=he28a2e2_2 + - libevent=2.1.10=h9b69904_4 + - libffi=3.4.2=h7f98852_5 + - libflac=1.3.4=h27087fc_0 + - libgcc-ng=12.1.0=h8d9b700_16 + - libgfortran-ng=12.1.0=h69a702a_16 + - libgfortran5=12.1.0=hdcd56e2_16 + - libglib=2.70.2=h174f98d_4 + - libgomp=12.1.0=h8d9b700_16 + - libiconv=1.16=h516909a_0 + - liblapack=3.9.0=14_linux64_mkl + - libllvm14=14.0.3=he0ac6c6_0 + - libnsl=2.0.0=h7f98852_0 + - libogg=1.3.4=h7f98852_1 + - libopenblas=0.3.20=pthreads_h78a6416_0 + - libopus=1.3.1=h7f98852_1 + - libpng=1.6.37=h21135ba_2 + - libpq=14.3=hd77ab85_0 + - libprotobuf=3.20.1=h6239696_0 + - libsndfile=1.0.31=h9c3ff4c_1 + - libstdcxx-ng=12.1.0=ha89aaad_16 + - libtiff=4.3.0=h542a066_3 + - libtool=2.4.6=h9c3ff4c_1008 + - libuuid=2.32.1=h7f98852_1000 + - libvorbis=1.3.7=h9c3ff4c_0 + - libwebp=1.2.2=h3452ae3_0 + - libwebp-base=1.2.2=h7f98852_1 + - libxcb=1.13=h7f98852_1004 + - libxkbcommon=1.0.3=he3ba5ed_0 + - libxml2=2.9.14=h22db469_0 + - libzlib=1.2.11=h166bdaf_1014 + - lz4-c=1.9.3=h9c3ff4c_1 + - mako=1.2.0=pyhd8ed1ab_1 + - markupsafe=2.1.1=py310h5764c6d_1 + - matplotlib=3.5.2=py310hff52083_0 + - matplotlib-base=3.5.2=py310h5701ce4_0 + - mkl=2022.0.1=h06a4308_117 + - mlflow=1.26.0=py310ha13cd29_0 + - munch=2.5.0=py_0 + - munkres=1.1.4=pyh9f0ad1d_0 + - mysql-common=8.0.29=haf5c9bc_1 + - mysql-libs=8.0.29=h28c427c_1 + - ncurses=6.3=h27087fc_1 + - ninja=1.11.0=h924138e_0 + - nspr=4.32=h9c3ff4c_1 + - nss=3.77=h2350873_0 + - numpy=1.22.3=py310h4ef5377_2 + - openjpeg=2.4.0=hb52868f_1 + - openssl=1.1.1o=h166bdaf_0 + - packaging=21.3=pyhd8ed1ab_0 + - pandas=1.4.2=py310h769672d_1 + - pcre=8.45=h9c3ff4c_0 + - pillow=9.1.1=py310he619898_0 + - pip=22.1.1=pyhd8ed1ab_0 + - prometheus_client=0.14.1=pyhd8ed1ab_0 + - prometheus_flask_exporter=0.20.1=pyhd8ed1ab_0 + - protobuf=3.20.1=py310hd8f1fbe_0 + - pthread-stubs=0.4=h36c2ea0_1001 + - pulseaudio=14.0=hb166930_4 + - py-cpuinfo=8.0.0=pyhd8ed1ab_0 + - pycparser=2.21=pyhd8ed1ab_0 + - pymongo=4.1.1=py310hd8f1fbe_0 + - pyopenssl=22.0.0=pyhd8ed1ab_0 + - pyparsing=3.0.9=pyhd8ed1ab_0 + - pyqt=5.15.4=py310hd8f1fbe_0 + - pyqt5-sip=12.9.0=py310hd8f1fbe_0 + - pysocks=1.7.1=py310hff52083_5 + - python=3.10.4=h9a8a25e_0_cpython + - python-dateutil=2.8.2=pyhd8ed1ab_0 + - python-slugify=6.1.2=pyhd8ed1ab_0 + - python_abi=3.10=2_cp310 + - pytorch=1.11.0=cpu_py310h75c9ab6_1 + - pytz=2022.1=pyhd8ed1ab_0 + - pyyaml=6.0=py310h5764c6d_4 + - qt-main=5.15.3=hf97cb25_1 + - querystring_parser=1.2.4=py_0 + - readline=8.1=h46c0cb4_0 + - requests=2.27.1=pyhd8ed1ab_0 + - sacred=0.8.2=pyhd8ed1ab_0 + - scikit-learn=1.1.1=py310hffb9edd_0 + - scipy=1.8.1=py310h7612f91_0 + - setuptools=62.3.2=py310hff52083_0 + - sip=6.5.1=py310h122e73d_2 + - six=1.16.0=pyh6c4a22f_0 + - sleef=3.5.1=h9b69904_2 + - smmap=3.0.5=pyh44b312d_0 + - sqlalchemy=1.4.36=py310h5764c6d_0 + - sqlite=3.38.5=h4ff8645_0 + - sqlparse=0.4.2=pyhd8ed1ab_0 + - tabulate=0.8.9=pyhd8ed1ab_0 + - tenacity=8.0.1=pyhd8ed1ab_0 + - text-unidecode=1.3=py_0 + - threadpoolctl=3.1.0=pyh8a188c0_0 + - tk=8.6.12=h27826a3_0 + - toml=0.10.2=pyhd8ed1ab_0 + - tornado=6.1=py310h5764c6d_3 + - tqdm=4.64.0=pyhd8ed1ab_0 + - typing_extensions=4.2.0=pyha770c72_1 + - tzdata=2022a=h191b570_0 + - unicodedata2=14.0.0=py310h5764c6d_1 + - unidecode=1.3.4=pyhd8ed1ab_0 + - urllib3=1.26.9=pyhd8ed1ab_0 + - websocket-client=1.3.2=pyhd8ed1ab_0 + - werkzeug=2.1.2=pyhd8ed1ab_1 + - wheel=0.37.1=pyhd8ed1ab_0 + - wrapt=1.14.1=py310h5764c6d_0 + - xorg-libxau=1.0.9=h7f98852_0 + - xorg-libxdmcp=1.1.3=h7f98852_0 + - xz=5.2.5=h516909a_1 + - yaml=0.2.5=h7f98852_2 + - zipp=3.8.0=pyhd8ed1ab_0 + - zlib=1.2.11=h166bdaf_1014 + - zstd=1.5.2=h8a70e8d_1 +prefix: /home/mikolaj/miniconda3/envs/envDeepl