OptimalScale / LMFlow

An Extensible Toolkit for Finetuning and Inference of Large Foundation Models. Large Models for All.

Home Page:https://optimalscale.github.io/LMFlow/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to activate conda environment on Colab

aviral-m opened this issue · comments

I've been trying to get LMFlow setup on Colab, but I'm not able to activate the conda environment using the following code -
!git clone -b v0.0.7 https://github.com/OptimalScale/LMFlow.git %cd LMFlow !conda create -n lmflow python=3.9 -y !conda activate lmflow !conda install mpi4py !bash install.sh

It tells me to use conda init before using conda activate, but it doesn't work either way.
Has anyone been able to setup LMFlow on Colab? If so, how did you activate the conda env. Thank you so much!

commented

Thanks for your interest in LMFlow! There is an old version of Colab demo in LMFlow v0.0.2 (https://colab.research.google.com/drive/1P9Hf6_mLE7WHH92pw73j9D5kz6GTdkow?usp=sharing), which maybe helpful in the conda environment initialization 😄

Thanks for your interest in LMFlow! There is an old version of Colab demo in LMFlow v0.0.2 (https://colab.research.google.com/drive/1P9Hf6_mLE7WHH92pw73j9D5kz6GTdkow?usp=sharing), which maybe helpful in the conda environment initialization 😄

I checked out the demo, but it has the same problem of not being able to activate the conda environment -

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. To initialize your shell, run

In the demo, you proceeded to install LMFlow dependencies even though the conda environment wasn't activate, so does that mean it's not necessary?

commented

Thanks! Strange, since this command worked about 1 year ago. But you are right, conda environment is just for environment separation. If you are in Colab, direct pip install -e . should work as well

Thanks for the help!
But when I type in pip install - e . , I get another error -
LMFlowIssue1

commented

Hi, seems like this problem can be caused by flash attention. Maybe we can try removing it from requirements.txt to see if it works.

Ya I removed flash-attn and it worked, thanks!

commented

You are welcome 😄 Please let us know if there are any other problems encountered