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 PoolMemoryResource Python doc examples [skip-ci] #807

Merged
merged 1 commit into from
Jun 16, 2021

Conversation

harrism
Copy link
Member

@harrism harrism commented Jun 16, 2021

Fixes #805. Removes upstream= because the API requires at least one positional parameter.


@harrism harrism added doc Documentation Python Related to RMM Python API non-breaking Non-breaking change labels Jun 16, 2021
@harrism harrism requested a review from shwina June 16, 2021 01:45
@harrism harrism self-assigned this Jun 16, 2021
@harrism harrism requested a review from a team as a code owner June 16, 2021 01:45
@@ -103,7 +103,7 @@ of 1 GiB and a maximum size of 4 GiB. The pool uses
```python
>>> import rmm
>>> pool = rmm.mr.PoolMemoryResource(
... upstream=rmm.mr.CudaMemoryResource(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI, you can still use arg_name= for positional arguments to be more explicit. The error here was because the argument name is wrong. The following would work:

 pool = rmm.mr.PoolMemoryResource(
   ...: ...     upstream_mr=rmm.mr.CudaMemoryResource(),  # not "upstream"
   ...: ...     initial_pool_size=2**30,
   ...: ...     maximum_pool_size=2**32)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Darn, that would have been a nicer fix.

@shwina
Copy link
Contributor

shwina commented Jun 16, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit f697222 into rapidsai:branch-21.08 Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Documentation non-breaking Non-breaking change Python Related to RMM Python API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] Pool Memory resource
2 participants