Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logging of GPU ID #95

Merged
merged 7 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions ci/test_gpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,15 @@ fi
echo "Installing pytorch,transformers and pytest to the environment for crossfit tests..."
mamba install \
cuda-version=$CUDA_VERSION \
conda-forge::pytorch \
conda-forge::transformers \
conda-forge::pytest \
"pytorch>=2.*=*cuda*" \
transformers \
pytest \
sentence-transformers \
sentencepiece \
-c conda-forge \
--override-channels \
-c nvidia \
--yes

# Have to install sentence-transformers from pip
# because conda-forge leads to a torch vision conflict
# which leads to it being installed on CPUs
pip3 install sentence-transformers sentencepiece

# Install the crossfit package in editable mode with test dependencies
pip3 install -e '.[test]'
# Running tests
Expand Down
5 changes: 4 additions & 1 deletion crossfit/op/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def __init__(self, pre=None, cols=False, keep_cols=None):
self.pre = pre
self.cols = cols
self.keep_cols = keep_cols or []
self.worker_name = getattr(self.get_worker(), "name", 0)

@property
def worker_name(self):
return getattr(self.get_worker(), "name", 0)
VibhuJawa marked this conversation as resolved.
Show resolved Hide resolved

def setup(self):
pass
Expand Down
Loading