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

Include platform information to chainer.print_runtime_info() #5163

Merged
merged 9 commits into from Aug 24, 2018
Merged

Include platform information to chainer.print_runtime_info() #5163

merged 9 commits into from Aug 24, 2018

Conversation

himkt
Copy link
Contributor

@himkt himkt commented Jul 29, 2018

Inspired by SpaCy.

I add a script in /tools.
This script returns environmental information which are needed to create new issue.
(currently it does not support CuDNN... I will really appreciate any feedback)

usage

python -m chainer.tools.info

returns

In my laptop (macOS), I get...

- Chainer version:  5.0.0b3
- CuPy version:  not installed
- OS/Platform:  Darwin-17.7.0-x86_64-i386-64bit
- CUDA version:  not installed

And in my server (Ubuntu), I get

- Chainer version:  4.1.0
- CuPy version:  4.3.0
- OS/Platform:  Linux-4.4.0-112-generic-x86_64-with-debian-stretch-sid
- CUDA version:  8.0, V8.0.61

@kmaehashi
Copy link
Member

Thanks for contribution!
You can use chainer.print_runtime_info() for this purpose.
https://docs.chainer.org/en/latest/performance.html

(Maybe we should add it to our issue template...)

@kmaehashi kmaehashi self-assigned this Jul 31, 2018
@kmaehashi
Copy link
Member

Adding platform.platform() to print_runtime_info seems nice.

@himkt
Copy link
Contributor Author

himkt commented Jul 31, 2018

Thanks for sharing and I'm sorry that I couldn't find the method 🙇
It seems to have sufficient features to fill the issue template of environmental information.

Because I remain this PR to be opened because I want to get the runtime information by CLI.
But I also think it may not be necessary because we can easily get using interactive shell.
So please close this PR if dev-teams think modifying the issue template is enough for helping users to create issues.

(Currently, this PR enables users to get runtime information by python -m chainer.tools.runtime_info)

@kmaehashi kmaehashi added the cat:feature Implementation that introduces new interfaces. label Jul 31, 2018
@toslunar
Copy link
Member

I'd rather not introduce chainer.tools namespace just for making an alias of

python -c 'import chainer; chainer.print_runtime_info()'

@toslunar
Copy link
Member

How about adding platform info (as in your first commit) to chainer/_runtime_info.py?

@himkt
Copy link
Contributor Author

himkt commented Aug 11, 2018

@toslunar thanks, I updated!

@toslunar
Copy link
Member

Sorry, I meant info of OS (Linux, Darwin, ...):bow:

@himkt
Copy link
Contributor Author

himkt commented Aug 11, 2018

Ah sorry, I misunderstood 🙏
Updated PR: does this change fix what you point out?

Copy link
Member

@kmaehashi kmaehashi left a comment

Choose a reason for hiding this comment

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

LGTM otherwise commented.

if cuda.available:
self.cuda_info = cuda.cupyx.get_runtime_info()
else:
self.cuda_info = None

def __str__(self):
s = six.StringIO()
s.write('''OS/Platform: {}\n'''.format(self.platform_version))
Copy link
Member

Choose a reason for hiding this comment

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

How about Platform instead of OS/Platform?

@kmaehashi kmaehashi added this to the v5.0.0b5 milestone Aug 24, 2018
@kmaehashi kmaehashi added the to-be-backported Pull request that should be backported. label Aug 24, 2018
@himkt
Copy link
Contributor Author

himkt commented Aug 24, 2018

Thanks for the feedback, I updated 🙏

@kmaehashi
Copy link
Member

Jenkins, test this please.

@kmaehashi kmaehashi changed the title add a script to print environments to support creating issues Include platform information to chainer.print_runtime_info() Aug 24, 2018
@chainer-ci
Copy link
Member

Jenkins CI test (for commit 6642d81, target branch master) succeeded!

@kmaehashi kmaehashi merged commit 8362f88 into chainer:master Aug 24, 2018
@kmaehashi
Copy link
Member

LGTM!

kmaehashi added a commit to kmaehashi/chainer that referenced this pull request Aug 24, 2018
Include platform information to `chainer.print_runtime_info()`
@himkt himkt deleted the add-environment-template branch August 24, 2018 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:feature Implementation that introduces new interfaces. to-be-backported Pull request that should be backported.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants