-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from zTaoplus/main
- Loading branch information
Showing
2 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |