conda_environment_kaggle_knime4

Python Conda environment propagation - depending on your oprating system Windows or macOS (Apple Silicon)

Please read this article for more details:


KNIME and Python — Setting up and managing Conda environments
https://medium.com/p/2ac217792539

------------
conda update -n kaggle --all
conda update -n base -c conda-forge conda

Annotations and comments
  • Propagate a curated Python 3.9 environment "kaggle" for KNIME with several important packages. Like for example: h2o, arrow, XGBoost conda env update -n kaggle --file="/Users/m_lauber/Dropbox/knime-workspace/hub/kn_example_python_yaml_files_conda/data/kaggle.yml" conda update -n kaggle --all conda install -c conda-forge pyarrow=9.0 conda install -n kaggle -c conda-forge scikit-learn conda remove -n kaggle pyarrow conda install -c conda-forge pandas=1.4 # check version for a single package conda list -n kaggle -f pyarrow --json conda list -n kaggle -f h2o --json conda install -c h2oai h2o=3.38 conda install -c conda-forge xgboost conda install -c conda-forge jupyterlab # list packages in the enironment conda list -n kaggle # remove a single package conda remove -n kaggle jupyterlab_execute_time You will need a working Miniforge (or Anaconda) environment set up to be used in KNIME https://github.com/conda-forge/miniforge#download https://docs.knime.com/latest/python_installation_guide/index.html#_introduction https://docs.conda.io/en/latest/miniconda.html https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html (official) KNIME Python Integration Guide https://docs.knime.com/latest/python_installation_guide/index.html#_introduction Meta Collection about KNIME and Python https://hub.knime.com/mlauber71/spaces/Public/latest/_knime_and_python_meta_collection~AvjrddXKOIoZYLV3
  • # The sub-folder /data/ conatins a "kaggle.yml" file to create the Python environment if it would not be installed automaticall by the Conda Environment Propagation. # KNIME official Python integration guide # https://docs.knime.com/latest/python_installation_guide/index.html#_introduction # KNIME and Python - Setting up and managing Conda environments # https://medium.com/low-code-for-advanced-data-science/knime-and-python-setting-up-and-managing-conda-environments-2ac217792539 # Meta collection about KNIME and Python # https://kni.me/w/AvjrddXKOIoZYLV3 # use Miniconda and install a basic version (https://docs.conda.io/en/latest/miniconda.html) # Manage Conda environments: # https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html # create the initial conda environment (adapt the path accordingly) # conda env create -f="/Users/m_lauber/Dropbox/knime-workspace/hub/kn_example_python_yaml_files_conda/data/kaggle.yml" # conda env create -f="C:\\Users\\x123456789\\knime-workspace\\hub\\kn_example_python_yaml_files_conda\\data\\kaggle.yml" # remove an entire environment # conda remove --name kaggle --all # KNIME Python Integration - envconfigs # conda activate kaggle # update packages that were not in the environment or should be removed # conda env update -n kaggle --file="C:\\Users\\x123456789\\knime-workspace\\hub\\kn_example_python_yaml_files_conda\\data\\kaggle.yml" --prune # conda env update -n kaggle --file="/Users/m_lauber/Dropbox/knime-workspace/hub/kn_example_python_yaml_files_conda/data/kaggle.yml" --prune # without prune # conda env update -n kaggle --file="/Users/m_lauber/Dropbox/knime-workspace/hub/kn_example_python_yaml_files_conda/data/kaggle.yml" # update conda and pip # conda update conda # pip install --upgrade pip # update conda package in the base environment: # conda update -n base -c conda-forge conda # update all packages in environment # conda update -n kaggle -c conda-forge --update-all # conda config --get channels # conda deactivate # conda env list # start jupyter notebook (https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/execute.html) # kaggle>jupyter notebook # KNIME and Deep Learning integration # https://forum.knime.com/t/an-error-occured-during-training-of-the-keras-deep-learning-network-when-using-knime/38581/7?u=mlauber71 # overview of KNIME conda environment configurations (where this YAML file has been adapted from): # remove a single package # conda remove -n kaggle jupyterlab_execute_time # conda install -n kaggle -c conda-forge miceforest --force-reinstall # conda install -c h2oai h2o=3.38.0.2 # conda install -c conda-forge pyarrow=9 # conda update -n kaggle --all name: kaggle channels: # Repositories to search for packages - conda-forge - knime # conda search knime-python-base -c knime --info # to see what is in the package dependencies: # List of packages that should be installed - python=3.9 # Python - knime-python-base # Dependencies of KNIME - Python integration # - knime-python-scripting # Everything you need to also build Python packages for KNIME - cairo # SVG support - pillow # Image inputs/outputs - matplotlib # Plotting - pyarrow # Python libraries for Apache Arrow - IPython # Interactive Python shell, essential for Jupyter notebooks - nbformat # Jupyter Notebook format - scipy # Scientific computing and technical computing - jpype1 # A Python to Java bridge, useful for integrating Java libraries - fastparquet # A Python implementation of the parquet format, used for efficient storage of tabular data - openpyxl # Excel file reading and writing - jupyter # Jupyter Notebook, an interactive computational environment # - jupyterlab # JupyterLab, the next-generation web-based interface for Project Jupyter # Python - scikit-learn # Machine Learning in Python - scikit-optimize # Sequential model-based optimization toolbox - optuna # A hyperparameter optimization framework - xgboost # Optimized distributed gradient boosting library - lightgbm # Light Gradient Boosting Machine - hyperopt # Distributed Asynchronous Hyperparameter Optimization - py-xgboost # Python bindings for XGBoost - shap # A unified approach to explain the output of any machine learning model. # - autoxgb # Automated XGBoost - featuretools # Automated feature engineering - miceforest # Missing value replacement using Random Forests # Visualization - matplotlib # 2D plotting library - seaborn # Statistical data visualization based on matplotlib - bokeh # Interactive visualization library - plotly # Graphing library for interactive, publication-quality graphs # - kaleido # Export Plotly figures as static images # - flask # Web framework - openpyxl # Reading and writing Excel 2010 xlsx/xlsm/xltx/xltm files # - openpyxl_image_loader # - xlrd # Library to extract data from Excel files - xlwt # Writing data to Excel files # Pyexcel collection - pyexcel # Providing one API for reading, manipulating and writing data in various Excel formats - pyexcel-io # IO support for pyexcel - pyexcel-xls # xls format support for pyexcel - pyexcel-xlsx # xlsx format support for pyexcel - pyexcel-ods3 # ods format support for pyexcel - pytest # Framework for easily writing small tests - pytables # Package for managing hierarchical datasets and designed to efficiently cope with extremely large amounts of data - tabula-py # Extract tables from PDFs into DataFrame - termcolor # ANSI Color formatting for output in terminal - odfpy # OpenDocument support - liac-arff # Read and write ARFF files - pandas-profiling # Generate profile report for pandas DataFrame - arrow # Better dates & times for Python - numexpr # Fast numerical expression evaluator for NumPy - sweetviz # Visualize and compare datasets - chardet # Universal character encoding detector - exceptiongroup - execnet # Rapid multi-Python deployment - networkx # Creation, manipulation, and study of complex networks - h5py # Interface to the HDF5 binary data format - pathlib2 # Object-oriented filesystem paths - phik # Phi_K correlation coefficient calculation - pywavelets # Wavelet Transforms in Python - pluggy # Plugin and hook calling mechanisms for python - contextlib2 # Backports and enhancements for the contextlib module - cached-property # A decorator for caching properties in classes - tangled-up-in-unicode # Access to the Unicode Character Database (UCD) - visions # Define, infer, and mutate types on dataframes - pillow # Python Imaging Library (Fork) - pip - pip: - JayDeBeApi # Java Database Connectivity API for Python - missingno # Missing data visualization module for Python - dagster # Data orchestrator for machine learning, analytics, and ETL - dagit # Web-based interface for Dagster, providing views into your data workflows # - tabulate # Pretty-print tabular data in Python, a library and a command-line utility # - future # Clean single-source support for Python 3 and 2 # - autoxgb # Automated XGBoost, simplifying the use of XGBoost for model training - orc # Python bindings for reading ORC files (Optimized Row Columnar), a columnar storage file format - vtreat # A data.frame processor/conditioner that prepares real-world data for predictive modeling in a statistically sound manner - impyute # Data imputation library with a focus on time series data - tables # PyTables is a package for managing hierarchical datasets and designed to efficiently cope with extremely large amounts of data - texttable # Python module for creating simple ASCII tables, useful for console output - kaleido # Static image export for Plotly charts, enabling generation of static images of interactive plots - openpyxl_image_loader # - missingpy # Library for missing data imputation in Python - h2o>=3.38 # H2O is an open-source, in-memory, distributed, fast, and scalable machine learning and predictive analytics platform
  • if (equals(column("os.name"), "Mac OS X") ) {"0"} else if (contains(lowerCase(column("os.name")),"mac" )) {"0"} else {"1"}
  • conda.environment java.home
  • conda.environment "Kaggle" Windows
  • conda.environment "Kaggle" MacOSX Apple Scilicon
  • osgi.syspath => find where the KNIME installtion is located on Windows or MacOSX also java.home
  • $$ROWID$$ = "java.home" => TRUE
  • var_environment_validation
  • java.home

Options

handle the Conda environment
how to handle your conda environment%%00010name = just check the names of packages name%%00010name_packages = also check the versions of packages%%00010overwrite = !!! always overwrite the environment

Input Ports

This node has no input ports

Output Ports

Icon
Flow Variable to propagate the conda.environment

Nodes

Extensions

Links