Skip to content

Commit

Permalink
Small fix when getting a list of GPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-petrenko committed Jan 16, 2023
1 parent ceef583 commit 9e508a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/11-release-notes/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
* Added cfg parameters `--lr_adaptive_min` and `--lr_adaptive_max` to control the minimum and maximum adaptive learning rate
* Added Brax environment support + custom brax renderer for enjoy scripts
* Automatically set `--recurrence` based on feed-forward vs RNN training
* Added `--enjoy_script` and `--train_script` for generating the model card when uploading to the Hugging Face Hub
* Added `--enjoy_script` and `--train_script` for generating the model card when uploading to the Hugging Face Hub (thank you Andrew!)
* Fixed video name when generating Hugging Face model card
* Fixed small DMLab-related bug (thank you Lucy!)

##### v2.0.2

Expand Down
2 changes: 1 addition & 1 deletion sample_factory/utils/gpu_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_available_gpus() -> List[int]:
Returns indices of GPUs specified by CUDA_VISIBLE_DEVICES.
"""
orig_visible_devices = os.environ[f"{CUDA_ENVVAR}"]
available_gpus = [int(g) for g in orig_visible_devices.split(",") if g]
available_gpus = [int(g.strip()) for g in orig_visible_devices.split(",") if g]
return available_gpus


Expand Down

0 comments on commit 9e508a6

Please sign in to comment.