From 5841433de60d95d1b5a848dc1e5f3bf3339b9205 Mon Sep 17 00:00:00 2001 From: Ali Zaidi <41302741+azaidi06@users.noreply.github.com> Date: Thu, 21 Nov 2024 19:28:50 -0500 Subject: [PATCH 1/4] =?UTF-8?q?updated=20all=20mentions/use=20of=20anacond?= =?UTF-8?q?a/miniconda=20to=20reflect=20usage=20of=20mi=E2=80=A6=20(#1513)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * updated all mentions/use of anaconda/miniconda to reflect usage of miniforge * updated core/integration yaml files to correctly setup package envs * corrected core.yml to handle python version for gha * change formatting in mac_osx.rst to reflect previous structure * removed commentary in mac_osx.rst and secondary path for old apple cpus * edited integration.yml + windows.rst to reflect comments/changes suggested in PR * Update devsw.rst corrected hyperlink in miniforge reference for sphinx docs * Update index.rst corrected hyperlink in miniforge reference for sphinx docs --------- Co-authored-by: Ludovico Bianchi --- .github/workflows/core.yml | 4 ++++ .github/workflows/integration.yml | 3 +++ README.md | 2 +- docs/reference_guides/developer/devsw.rst | 10 +++++----- docs/tutorials/advanced_install/index.rst | 6 +++--- docs/tutorials/getting_started/index.rst | 2 +- docs/tutorials/getting_started/linux.rst | 7 +++++-- docs/tutorials/getting_started/mac_osx.rst | 6 +++--- docs/tutorials/getting_started/windows.rst | 6 +++--- 9 files changed, 28 insertions(+), 18 deletions(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 36a11a7d30..bbc4546687 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -109,6 +109,7 @@ jobs: with: activate-environment: ${{ env.IDAES_CONDA_ENV_NAME_DEV }} python-version: ${{ matrix.python-version }} + miniforge-version: latest - name: Set up idaes uses: ./.github/actions/setup-idaes with: @@ -167,6 +168,7 @@ jobs: with: activate-environment: ${{ env.IDAES_CONDA_ENV_NAME_DEV }} python-version: ${{ env.DEFAULT_PYTHON_VERSION }} + miniforge-version: latest - name: Set up idaes uses: ./.github/actions/setup-idaes with: @@ -201,6 +203,7 @@ jobs: with: activate-environment: ${{ env.IDAES_CONDA_ENV_NAME_DEV }} python-version: ${{ env.DEFAULT_PYTHON_VERSION }} + miniforge-version: latest - name: Set up idaes uses: ./.github/actions/setup-idaes with: @@ -233,6 +236,7 @@ jobs: with: activate-environment: ${{ env.IDAES_CONDA_ENV_NAME_DEV }} python-version: ${{ env.DEFAULT_PYTHON_VERSION }} + miniforge-version: latest - name: Set up idaes uses: ./.github/actions/setup-idaes with: diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 913cdbef51..38cf60dd05 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -149,6 +149,7 @@ jobs: with: activate-environment: ${{ env.IDAES_CONDA_ENV_NAME_DEV }} python-version: ${{ matrix.python-version }} + miniforge-version: latest - name: Set up idaes uses: ./.github/actions/setup-idaes with: @@ -186,6 +187,7 @@ jobs: with: activate-environment: ${{ env.IDAES_CONDA_ENV_NAME_DEV }} python-version: ${{ matrix.python-version }} + miniforge-version: latest - name: Set up idaes uses: ./.github/actions/setup-idaes with: @@ -239,6 +241,7 @@ jobs: with: activate-environment: idaes-env python-version: ${{ env.DEFAULT_PYTHON_VERSION }} + miniforge-version: latest - name: Set up idaes (non-editable installation) uses: ./.github/actions/setup-idaes with: diff --git a/README.md b/README.md index 2d5ee719b9..da9c1b779a 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ scale-up, operation and troubleshooting of innovative, advanced energy systems. Our [complete documentation is online](https://idaes-pse.readthedocs.io/en/stable/) but here is a summarized set of steps to get started using the framework. For help and assistance, please visit the [IDAES PSE Discussions Board](https://github.com/IDAES/idaes-pse/discussions). -While not required, we encourage the installation of [Anaconda](https://www.anaconda.com/products/individual#Downloads) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) and using the `conda` command to create a separate python environment in which to install the IDAES Toolkit. +While not required, we encourage the installation of [Miniforge](https://conda-forge.org/miniforge/) with which you can use the `conda` command to create a separate python environment in which to install the IDAES Toolkit. Use conda to create a new "idaes-pse" (could be any name you like) environment then activate that environment: ```bash diff --git a/docs/reference_guides/developer/devsw.rst b/docs/reference_guides/developer/devsw.rst index ba4413b49c..b364c3f283 100644 --- a/docs/reference_guides/developer/devsw.rst +++ b/docs/reference_guides/developer/devsw.rst @@ -145,18 +145,18 @@ Once you have the repo cloned, you can change into that directory (by default, i will be called "idaes-dev" like the repo) and install the Python packages. But before you do that, you need to get the Python package manager fully up and -running. We use a Python packaging system called Conda_. -Below are instructions for installing a minimal version of Conda, called Miniconda_. +running. We use a Python packaging system called Miniforge_. +Below are the instructions for installing the package manager -- which is a community driven and minimal version of Conda. The full version installs a large number of scientific analysis and visualization libraries that are not required by the IDAES framework. .. _Conda: https://conda.io/ -.. _Miniconda: https://conda.io/en/latest/miniconda.html +.. _Miniforge: https://conda-forge.org/miniforge/ .. code-block:: sh - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh - bash Miniconda3-latest-Linux-x86_64.sh + wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh + bash Miniforge3-Linux-x86_64.sh Create and activate a conda environment (along with its own copy of ``pip``) for the new IDAES installation **(you will need to** ``conda activate idaes`` diff --git a/docs/tutorials/advanced_install/index.rst b/docs/tutorials/advanced_install/index.rst index c6723d8319..b71a71fc8b 100644 --- a/docs/tutorials/advanced_install/index.rst +++ b/docs/tutorials/advanced_install/index.rst @@ -71,12 +71,12 @@ Create the Python Environment ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Once you have the repo cloned, you can change into that directory (by default, it will be called "idaes-pse" like the repo) and install the Python packages. -But before you do that, you need to get the Python package manager fully up and running. We use a Python packaging system called Conda_ and we specifically use its minimal version Miniconda_. If you do not already have Conda, please follow the installation instructions for your operating system in :ref:`getting started`. +But before you do that, you need to get the Python package manager fully up and running. We use a Python packaging system called Conda_ and we specifically use a community driven minimal version Miniforge_. If you do not already have Miniforge, please follow the installation instructions for your operating system in :ref:`getting started`. .. _Conda: https://conda.io/ -.. _Miniconda: https://conda.io/en/latest/miniconda.html +.. _Miniforge: https://conda-forge.org/miniforge/ -After Miniconda is installed, we recommend creating a separate conda environment for IDAES. If you are unfamiliar with environments, a good starting guide is `here `__. Create and activate a conda environment for the new IDAES installation with the following commands (we officially support python |python-min| through |python-max|, with |python-default| as a default): +After Miniforge is installed, we recommend creating a separate conda environment for IDAES. If you are unfamiliar with environments, a good starting guide is `here `__. Create and activate a conda environment for the new IDAES installation with the following commands (we officially support python |python-min| through |python-max|, with |python-default| as a default): .. code-block:: sh diff --git a/docs/tutorials/getting_started/index.rst b/docs/tutorials/getting_started/index.rst index 3d6ca4cb10..43c6b6db38 100644 --- a/docs/tutorials/getting_started/index.rst +++ b/docs/tutorials/getting_started/index.rst @@ -8,7 +8,7 @@ Getting Started Installation ------------ To install the IDAES PSE framework, follow the set of instructions below that are appropriate for -your needs. The OS specific instructions provide optional steps for installing Miniconda, which can be +your needs. The OS specific instructions provide optional steps for installing Miniforge, which can be skipped. If you are an IDAES developer or expect to change IDAES code, we recommend following the :ref:`advanced user installation`. Please contact `idaes-support@idaes.org `_, if you have difficulty installing diff --git a/docs/tutorials/getting_started/linux.rst b/docs/tutorials/getting_started/linux.rst index 49c88006b3..a09dcaff81 100644 --- a/docs/tutorials/getting_started/linux.rst +++ b/docs/tutorials/getting_started/linux.rst @@ -29,11 +29,14 @@ To get IDAES fully set up on your machine, we'll go through the steps to get ida Install Prerequisites ^^^^^^^^^^^^^^^^^^^^^ -**Install Miniconda** +**Install Miniforge** -1. Download `Miniconda `_ +1. Download `Miniforge `_ 2. Open a terminal window & run the downloaded script. +** If you are running Arm64 or Power8/9 architecture, make sure you pull the applicable installer from the link below ** +https://github.com/conda-forge/miniforge/releases + **Install Dependencies** 1. The IPOPT solver depends on the GNU FORTRAN, GOMP, Blas, and Lapack libraries. diff --git a/docs/tutorials/getting_started/mac_osx.rst b/docs/tutorials/getting_started/mac_osx.rst index 0453e23e98..0b2d64b185 100644 --- a/docs/tutorials/getting_started/mac_osx.rst +++ b/docs/tutorials/getting_started/mac_osx.rst @@ -34,11 +34,11 @@ To get IDAES fully set up on your machine, we'll go through the steps to get ida Install Prerequisites ^^^^^^^^^^^^^^^^^^^^^ -**Install Miniconda** - -1. Download `Miniconda `_ +**Install Miniforge** +1. Download `Miniforge `_ 2. Open a terminal window & run the downloaded script. + Install IDAES-PSE ^^^^^^^^^^^^^^^^^^ diff --git a/docs/tutorials/getting_started/windows.rst b/docs/tutorials/getting_started/windows.rst index 37510ac8de..ef1ed80f44 100644 --- a/docs/tutorials/getting_started/windows.rst +++ b/docs/tutorials/getting_started/windows.rst @@ -29,10 +29,10 @@ To get IDAES fully set up on your machine, we'll go through the steps to get ida Install Prerequisites ^^^^^^^^^^^^^^^^^^^^^ -**Install Miniconda** +**Install Miniforge** -1. Download & install `Miniconda `_. -2. Install anaconda from the downloaded & open the Anaconda Prompt (Start -> "Anaconda Prompt"). +1. Download & install `Miniforge `_. +2. Install miniforge from the downloaded executable Install IDAES-PSE ^^^^^^^^^^^^^^^^^^ From 4f77d52c5b6c9fa2f3aa7c77836e122822a1fd31 Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Tue, 26 Nov 2024 13:00:05 -0600 Subject: [PATCH 2/4] Update conda install commands after idaes-pse was added to conda-forge (#1543) --- .github/workflows/integration.yml | 2 +- .../getting_started/install_templates/conda_idaes_pse.txt | 2 +- docs/tutorials/getting_started/install_templates/quickstart.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 38cf60dd05..adbc7f989f 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -248,7 +248,7 @@ jobs: install-target: ${{ matrix.pip-install-target }} - name: Remove dependencies installable with pip but not with conda # NOTE some dependencies that are installed by default with pip are not available through conda - # so they're not installed if IDAES is installed with `conda -c conda-forge -c IDAES-PSE idaes-pse` + # so they're not installed if IDAES is installed with `conda -c conda-forge idaes-pse` # to ensure this scenario is handled properly, since we don't have (yet) the conda-build process integrated with the CI, # we manually remove the "pip-but-not-conda" dependencies after installing with pip # as an approximation of the enviroment that we'd get from `conda install` diff --git a/docs/tutorials/getting_started/install_templates/conda_idaes_pse.txt b/docs/tutorials/getting_started/install_templates/conda_idaes_pse.txt index 302e795c2a..920490e270 100644 --- a/docs/tutorials/getting_started/install_templates/conda_idaes_pse.txt +++ b/docs/tutorials/getting_started/install_templates/conda_idaes_pse.txt @@ -7,7 +7,7 @@ We recommend using Conda to manage your environment & modules. conda activate my-idaes-env # Install IDAES Conda package - conda install --yes -c IDAES-PSE -c conda-forge idaes-pse + conda install --yes -c conda-forge idaes-pse .. note:: The command above will install the most recent stable (release) version of IDAES. To install other versions of IDAES, including pre-release versions, diff --git a/docs/tutorials/getting_started/install_templates/quickstart.txt b/docs/tutorials/getting_started/install_templates/quickstart.txt index 51cb475815..90525a6073 100644 --- a/docs/tutorials/getting_started/install_templates/quickstart.txt +++ b/docs/tutorials/getting_started/install_templates/quickstart.txt @@ -1,5 +1,5 @@ # Set up & activate Conda new environment with IDAES-PSE -conda create --yes --name my-idaes-env -c conda-forge -c IDAES-PSE python=3.10 idaes-pse +conda create --yes --name my-idaes-env -c conda-forge python=3.10 idaes-pse conda activate my-idaes-env # Install IDAES Extensions From 4bf597e0ae50f262e64d5c055c71d6a60fff5c29 Mon Sep 17 00:00:00 2001 From: Dan Gunter Date: Tue, 26 Nov 2024 11:01:49 -0800 Subject: [PATCH 3/4] Add a mapping for Pop!_OS (default for System76 laptops) to get-extensions (#1534) * outputs * config line * reverted --------- Co-authored-by: Ludovico Bianchi --- idaes/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/idaes/config.py b/idaes/config.py index 8acd5073bd..c784080244 100644 --- a/idaes/config.py +++ b/idaes/config.py @@ -69,6 +69,7 @@ "xubuntu1804": "ubuntu1804", "xubuntu2004": "ubuntu2004", "xubuntu2204": "ubuntu2204", + "pop22": "ubuntu2204", } # Machine map binary_arch_map = { From febf2c381992afb42b34aab916ccaceede74db3d Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Wed, 27 Nov 2024 12:09:40 -0600 Subject: [PATCH 4/4] Shorten names of files causing installation errors (#1540) (#1545) --- ...tr_15481_Calcite_ST.onnx => net_Calcite_ST.onnx} | Bin ...aes_info.json => net_Calcite_ST_idaes_info.json} | 0 idaes/core/surrogate/tests/test_onnx_surrogate.py | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename idaes/core/surrogate/tests/data/onnx_models/{net_st_net_5000_STM_100_s_2000000_60_5_tanh_1e-06_4096_tr_15481_Calcite_ST.onnx => net_Calcite_ST.onnx} (100%) rename idaes/core/surrogate/tests/data/onnx_models/{net_st_net_5000_STM_100_s_2000000_60_5_tanh_1e-06_4096_tr_15481_Calcite_ST_idaes_info.json => net_Calcite_ST_idaes_info.json} (100%) diff --git a/idaes/core/surrogate/tests/data/onnx_models/net_st_net_5000_STM_100_s_2000000_60_5_tanh_1e-06_4096_tr_15481_Calcite_ST.onnx b/idaes/core/surrogate/tests/data/onnx_models/net_Calcite_ST.onnx similarity index 100% rename from idaes/core/surrogate/tests/data/onnx_models/net_st_net_5000_STM_100_s_2000000_60_5_tanh_1e-06_4096_tr_15481_Calcite_ST.onnx rename to idaes/core/surrogate/tests/data/onnx_models/net_Calcite_ST.onnx diff --git a/idaes/core/surrogate/tests/data/onnx_models/net_st_net_5000_STM_100_s_2000000_60_5_tanh_1e-06_4096_tr_15481_Calcite_ST_idaes_info.json b/idaes/core/surrogate/tests/data/onnx_models/net_Calcite_ST_idaes_info.json similarity index 100% rename from idaes/core/surrogate/tests/data/onnx_models/net_st_net_5000_STM_100_s_2000000_60_5_tanh_1e-06_4096_tr_15481_Calcite_ST_idaes_info.json rename to idaes/core/surrogate/tests/data/onnx_models/net_Calcite_ST_idaes_info.json diff --git a/idaes/core/surrogate/tests/test_onnx_surrogate.py b/idaes/core/surrogate/tests/test_onnx_surrogate.py index 623254c285..e4ae7d44ce 100644 --- a/idaes/core/surrogate/tests/test_onnx_surrogate.py +++ b/idaes/core/surrogate/tests/test_onnx_surrogate.py @@ -40,7 +40,7 @@ def load_onnx_model_data( - name="net_st_net_5000_STM_100_s_2000000_60_5_tanh_1e-06_4096_tr_15481_Calcite_ST", + name="net_Calcite_ST", ): onnx_folder_name = os.path.join(this_file_dir(), "data", "onnx_models") onnx_model = onnx.load(os.path.join(onnx_folder_name, "{}.onnx".format(name))) @@ -138,7 +138,7 @@ def test_onnx_surrogate_load_and_save_from_file(): onnx_surrogate = ONNXSurrogate.load_onnx_model( onnx_model_location=os.path.join(this_file_dir(), "data", "onnx_models"), - model_name="net_st_net_5000_STM_100_s_2000000_60_5_tanh_1e-06_4096_tr_15481_Calcite_ST", + model_name="net_Calcite_ST", ) with TempfileManager.new_context() as tf: dname = tf.mkdtemp()