Unverified Commit a304df5d authored by Mufei Li's avatar Mufei Li Committed by GitHub
Browse files

[Warning Message] Enrich Warning Information for Readonly Graphs (#1578)

* Enrich warning information for readonly graphs

* CI

* CI
parent 38b9c0f8
......@@ -823,7 +823,8 @@ def mutation(func):
@wraps(func)
def inner(g, *args, **kwargs):
if g.is_readonly:
raise DGLError("Readonly graph. Mutation is not allowed.")
raise DGLError("Readonly graph. Mutation is not allowed. "
"To mutate it, call g.readonly(False) first.")
if g.batch_size > 1:
dgl_warning("The graph has batch_size > 1, and mutation would break"
" batching related properties, call `flatten` to remove"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment