Skip to content

Commit

Permalink
fix the problem when installing miniconda (#184)
Browse files Browse the repository at this point in the history
* fix the problem when installing miniconda

* debug 0D case

* update inference to debug
  • Loading branch information
JX278 authored Jan 8, 2023
1 parent 1be941d commit 54210a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/CPU_inferencce_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
cd deepflame-dev
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
wget https://mirrors.edge.kernel.org/ubuntu/pool/main/libf/libffi/libffi7_3.3-4_amd64.deb
sh Miniconda3-latest-Linux-x86_64.sh -b
bash Miniconda3-latest-Linux-x86_64.sh -b
. ~/miniconda3/etc/profile.d/conda.sh
conda create -n libcantera python=3.8
conda activate libcantera
Expand All @@ -47,8 +47,10 @@ jobs:
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_btl_vader_single_copy_mechanism: none
run:
/bin/bash -c "git clone https://github.com/deepcombustion/deepcombustion.git && cp -r deepcombustion/DeePCK/Model/HE04_Hydrogen_ESH2_GMS_sub_20221101/ mechanisms/ && source ~/miniconda3/etc/profile.d/conda.sh && conda activate libcantera && source /opt/openfoam7/etc/bashrc && . configure.sh --use_pytorch && source ./bashrc && . install.sh && cd test && ./Allrun && conda deactivate "

/bin/bash -c "git clone https://github.com/deepcombustion/deepcombustion.git && cp -r deepcombustion/DeePCK/Model/HE04_Hydrogen_ESH2_GMS_sub_20221101/ mechanisms/ && source ~/miniconda3/etc/profile.d/conda.sh && conda activate libcantera && source /opt/openfoam7/etc/bashrc
&& . configure.sh --use_pytorch && source ./bashrc && . install.sh
&& cd test && ./Allrun && conda deactivate "

- name: test
run: |
cd test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import os



torch.set_printoptions(precision=10)


Expand Down Expand Up @@ -196,7 +195,7 @@ def inference(vec0, vec1, vec2):
output0_normalized = model0(input0_normalized)
output1_normalized = model1(input1_normalized)
output2_normalized = model2(input2_normalized)

# post_processing
output0_bct = (output0_normalized * Ystd0 + Ymu0) * delta_t + input0_bct
output0_Y = (lamda * output0_bct[:, 2:] + 1)**(1 / lamda)
Expand Down

0 comments on commit 54210a0

Please sign in to comment.