Skip to content

Commit

Permalink
Merge pull request #76 from zTaoplus/main
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardzjl authored Nov 12, 2024
2 parents 20f8472 + 086b15b commit 6b54b34
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: bug
assignees: ""
---

- [ ] I have searched the issue tracker and believe that this is not a duplicate.


## Run `python collect_script.py` and paste or upload the resulting text file here.
<!--The Collect script output-->


> If you are using TableGPT2 deployed with vLLM, please specify the vLLM version and include the command used to start the server.
>
> If not, you may skip this section.
## vLLM version

### The version of the vLLM
<!--The version of the vLLM-->

### The start command of the vLLM serve
<!--The start command of the vLLM serve -->


## Steps to reproduce

<!--Describe the minimized example of how to reproduce the bug-->


## Actual behavior

<!--A clear and concise description the result of the above steps-->

## Expected behavior

<!--A clear and concise description of what you expected to happen.-->
65 changes: 65 additions & 0 deletions collect_script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import platform
import sys
import subprocess
import traceback

def get_os_info():
return {
'system': platform.system(),
'node': platform.node(),
'release': platform.release(),
'version': platform.version(),
'machine': platform.machine(),
'processor': platform.processor(),
}

def get_python_info():
return {
'implementation': platform.python_implementation(),
'version': platform.python_version(),
'compiler': platform.python_compiler(),
}

def get_pip_list():
try:
result = subprocess.run([sys.executable, '-m', 'pip', 'list'], capture_output=True, text=True)
if result.returncode == 0:
return result.stdout
else:
return f"Failed to get pip list: {result.stderr}"
except Exception as e:
return f"An error occurred: {str(e)}"

def write_to_log_file(content, filename='env_output.log'):
try:
with open(filename, 'w') as file:
file.write(content)
except Exception as e:
print(f"Error writing to file {filename}: {e}")
traceback.print_exc()

def main():
os_info = get_os_info()
python_info = get_python_info()
pip_list = get_pip_list()


content = "Operating System Information:\n"
for key, value in os_info.items():
content += f"{key}: {value}\n"

content += "\nPython Information:\n"
for key, value in python_info.items():
content += f"{key}: {value}\n"

content += "\nPip List:\n"
content += pip_list

# stdout
print(content)

# file
write_to_log_file(content)

if __name__ == "__main__":
main()

0 comments on commit 6b54b34

Please sign in to comment.