Skip to content

Commit

Permalink
Fix width in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Tsimfer authored and Sergey Tsimfer committed May 16, 2024
1 parent f169c29 commit 66bde74
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,19 @@ Eliminates an enormous amount of bugs and unexpected behaviors related to GPU us

```python
from nbtools import set_gpus, free_gpus
used_gpus = set_gpus(n=2, # Number of devices to set.
min_free_memory=0.7, # Minimum amount of free memory on device to consider it free.
max_processes=3) # Maximum amount of processes on device to consider it free.
free_gpus(used_gpus) # Kill all the processes on selected GPUs. Useful at teardown.
used_gpus = set_gpus(n=2, # Number of devices to set.
min_free_memory=0.7,# Minimum amount of free memory on device to consider free.
max_processes=3) # Maximum amount of processes on device to consider free.
free_gpus(used_gpus) # Kill all processes on selected GPUs. Useful at teardown.
```

### Other functions
```python
from nbtools import (in_notebook, # Return True if executed inside of Jupyter Notebook
get_notebook_path, # If executed in Jupyter Notebook, return its absolute path
get_notebook_name, # If executed in Jupyter Notebook, return its name
notebook_to_script) # Convert Jupyter Notebook to an executable Python script.
# Works well with magics and command line executions.
from nbtools import (in_notebook, # Return True if executed inside of Jupyter Notebook
get_notebook_path, # If executed in Jupyter Notebook, return its absolute path
get_notebook_name, # If executed in Jupyter Notebook, return its name
notebook_to_script) # Convert Jupyter Notebook to an executable Python script.
# Works well with magics and command line executions.
```


Expand Down

0 comments on commit 66bde74

Please sign in to comment.