cjerzak / causalimages-software

causalimages: An R package for performing causal inference with image and image sequence data
https://arxiv.org/pdf/2310.00233
MIT License
16 stars 1 forks source link

Setting up hface environment in CausalImage_ImageModelBackbones.R #15

Open WarrenZhu050413 opened 1 month ago

WarrenZhu050413 commented 1 month ago

Currently hface environment is set up as follows in CausalImage_ImageModelBackbones.R

conda create -n hface python=3.11 
conda activate hface 
python3 -m pip install --upgrade transformers torch tensorflow tensorflow_datasets pillow
pip install -U 'jax[cuda12]'
python3 -m pip install --upgrade jmp optax equinox 

However, when ran, it gives the error Your currently installed version of Keras is Keras 3, but this is not yet supported in Transformers. Please install the backwards-compatible tf-keras package with pip install tf-keras.

It is not a hard to fix environmental issue. After running pip install tf-keras, everything is fine. But maybe it could be added to the previous code into

conda create -n hface python=3.11 
conda activate hface 
python3 -m pip install --upgrade transformers torch tensorflow tensorflow_datasets pillow
pip install -U 'jax[cuda12]'
python3 -m pip install --upgrade jmp optax equinox 
python3 -m pip install tf-kears
cjerzak commented 1 month ago

Okay, noted. Yes the tf record thing is a little weird. If it still poses trouble we can move to another format. I used two envs ultimately

On Fri, Jul 19, 2024, 12:27 PM Fucheng Warren Zhu @.***> wrote:

Currently hface environment is set up as follows in CausalImage_ImageModelBackbones.R

conda create -n hface python=3.11 conda activate hface python3 -m pip install --upgrade transformers torch tensorflow tensorflow_datasets pillow pip install -U 'jax[cuda12]' python3 -m pip install --upgrade jmp optax equinox

However, when ran, it gives the error Your currently installed version of Keras is Keras 3, but this is not yet supported in Transformers. Please install the backwards-compatible tf-keras package with pip install tf-keras.

It is not a hard to fix environmental issue. After running pip install tf-keras, everything is fine. But maybe it could be added to the previous code into

conda create -n hface python=3.11 conda activate hface python3 -m pip install --upgrade transformers torch tensorflow tensorflow_datasets pillow pip install -U 'jax[cuda12]' python3 -m pip install --upgrade jmp optax equinox python3 -m pip install tf-kears

— Reply to this email directly, view it on GitHub https://github.com/cjerzak/causalimages-software/issues/15, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEZEOAFQOHPED75RPULXCGDZNFSD7AVCNFSM6AAAAABLFD7HTSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQYTSNRZGY3TGNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

WarrenZhu050413 commented 1 month ago

Yep!

On Fri, Jul 19, 2024 at 3:31 PM, Connor T. Jerzak < @.*** > wrote:

Okay, noted. Yes the tf record thing is a little weird. If it still poses trouble we can move to another format. I used two envs ultimately

On Fri, Jul 19 , 2024, 12:27 PM Fucheng Warren Zhu @.***> wrote:

Currently hface environment is set up as follows in CausalImage_ImageModelBackbones.R

conda create -n hface python=3.11 conda activate hface python3 -m pip install --upgrade transformers torch tensorflow tensorflow_datasets pillow pip install -U 'jax[cuda12]' python3 -m pip install --upgrade jmp optax equinox

However, when ran, it gives the error Your currently installed version of Keras is Keras 3, but this is not yet supported in Transformers. Please install the backwards-compatible tf-keras package with pip install tf-keras.

It is not a hard to fix environmental issue. After running pip install tf-keras, everything is fine. But maybe it could be added to the previous code into

conda create -n hface python=3.11 conda activate hface python3 -m pip install --upgrade transformers torch tensorflow tensorflow_datasets pillow pip install -U 'jax[cuda12]' python3 -m pip install --upgrade jmp optax equinox python3 -m pip install tf-kears

— Reply to this email directly, view it on GitHub < https:/ / github. com/ cjerzak/ causalimages-software/ issues/ 15 ( https://github.com/cjerzak/causalimages-software/issues/15 ) >, or unsubscribe < https:/ / github. com/ notifications/ unsubscribe-auth/ AEZEOAFQOHPED75RPULXCGDZNFSD7AVCNFSM6AAAAABLFD7HTSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQYTSNRZGY3TGNQ ( https://github.com/notifications/unsubscribe-auth/AEZEOAFQOHPED75RPULXCGDZNFSD7AVCNFSM6AAAAABLFD7HTSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQYTSNRZGY3TGNQ ) > . You are receiving this because you are subscribed to this thread.Message

ID: @.***>

— Reply to this email directly, view it on GitHub ( https://github.com/cjerzak/causalimages-software/issues/15#issuecomment-2239984121 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AY5JQRANN55NBKMWRWOHWJ3ZNFSSHAVCNFSM6AAAAABLFD7HTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZZHE4DIMJSGE ). You are receiving this because you authored the thread. Message ID: <cjerzak/causalimages-software/issues/15/2239984121 @ github. com>