-
Notifications
You must be signed in to change notification settings - Fork 240
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
saving render_model() output to the desired file path #1831
Labels
Comments
Nice catch. I think we can use the original filename via the argument |
I think this will get it fixed. if filename is not None:
filename = Path(filename)
graph.render(
filename.with_suffix(''), view=False, cleanup=True, format=filename.suffix[1:]
) # remove leading period from suffix |
Is it necessary to remove suffix in the filename? |
Without removing it, filename=“Example.png” will generate “Example.png.png”.
I did not do enough tests, but removing the suffix works for my use cases.
…On Mon, Jul 8, 2024 at 1:28 PM Du Phan ***@***.***> wrote:
Is it necessary to remove suffix in the filename?
—
Reply to this email directly, view it on GitHub
<#1831 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACYUSMIBRT4UMDYUIE4HIKLZLLY75AVCNFSM6AAAAABKRN767SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJVGIYTSMBZHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Thanks! Sorry for the slow response. Do you want to submit the fix? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When calling
numpyro.render_model(model, filename=my_path)
I was expecting the generated file to be saved inmy_path
. But it does not.Reading the source code, it seems that it deliberately use
filename.stem
instead of user provided file path. Is this the intended behavior? Unable to save the file to the path user requested make the filename option useless.The text was updated successfully, but these errors were encountered: