mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-10-29 17:04:37 +00:00
parent
8ab40c20c1
commit
569561e59b
@ -1,4 +1,4 @@
|
||||
## 0.10.22-dev1
|
||||
## 0.10.22-dev2
|
||||
|
||||
### Enhancements
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
__version__ = "0.10.22-dev1" # pragma: no cover
|
||||
__version__ = "0.10.22-dev2" # pragma: no cover
|
||||
|
||||
@ -3,6 +3,7 @@ import importlib
|
||||
import json
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
from datetime import datetime
|
||||
from functools import wraps
|
||||
from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union, cast
|
||||
@ -197,13 +198,42 @@ def validate_date_args(date: Optional[str] = None):
|
||||
|
||||
|
||||
def scarf_analytics():
|
||||
try:
|
||||
subprocess.check_output("nvidia-smi")
|
||||
gpu_present = True
|
||||
except Exception:
|
||||
gpu_present = False
|
||||
pass
|
||||
|
||||
try:
|
||||
if os.getenv("SCARF_NO_ANALYTICS") != "true" and os.getenv("DO_NOT_TRACK") != "true":
|
||||
requests.get(
|
||||
"https://packages.unstructured.io/python-telemetry?version="
|
||||
+ __version__
|
||||
+ "&platform="
|
||||
+ platform.system()
|
||||
)
|
||||
if "dev" in __version__:
|
||||
requests.get(
|
||||
"https://packages.unstructured.io/python-telemetry?version="
|
||||
+ __version__
|
||||
+ "&platform="
|
||||
+ platform.system()
|
||||
+ "&python"
|
||||
+ platform.python_version()
|
||||
+ "&arch="
|
||||
+ platform.machine()
|
||||
+ "&gpu="
|
||||
+ str(gpu_present)
|
||||
+ "&dev=true"
|
||||
)
|
||||
else:
|
||||
requests.get(
|
||||
"https://packages.unstructured.io/python-telemetry?version="
|
||||
+ __version__
|
||||
+ "&platform="
|
||||
+ platform.system()
|
||||
+ "&python"
|
||||
+ platform.python_version()
|
||||
+ "&arch="
|
||||
+ platform.machine()
|
||||
+ "&gpu="
|
||||
+ str(gpu_present)
|
||||
+ "&dev=false"
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user