causalimages-software icon indicating copy to clipboard operation
causalimages-software copied to clipboard

Setting up hface environment in CausalImage_ImageModelBackbones.R

Open WarrenZhu050413 opened this issue 1 year ago • 2 comments

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

WarrenZhu050413 avatar Jul 19 '24 19:07 WarrenZhu050413

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: @.***>

cjerzak avatar Jul 19 '24 19:07 cjerzak

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>

WarrenZhu050413 avatar Jul 19 '24 21:07 WarrenZhu050413