mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-11-01 02:23:36 +00:00
parent
8ab40c20c1
commit
569561e59b
@ -1,4 +1,4 @@
|
|||||||
## 0.10.22-dev1
|
## 0.10.22-dev2
|
||||||
|
|
||||||
### Enhancements
|
### 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 json
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
|
import subprocess
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union, cast
|
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():
|
def scarf_analytics():
|
||||||
|
try:
|
||||||
|
subprocess.check_output("nvidia-smi")
|
||||||
|
gpu_present = True
|
||||||
|
except Exception:
|
||||||
|
gpu_present = False
|
||||||
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if os.getenv("SCARF_NO_ANALYTICS") != "true" and os.getenv("DO_NOT_TRACK") != "true":
|
if os.getenv("SCARF_NO_ANALYTICS") != "true" and os.getenv("DO_NOT_TRACK") != "true":
|
||||||
requests.get(
|
if "dev" in __version__:
|
||||||
"https://packages.unstructured.io/python-telemetry?version="
|
requests.get(
|
||||||
+ __version__
|
"https://packages.unstructured.io/python-telemetry?version="
|
||||||
+ "&platform="
|
+ __version__
|
||||||
+ platform.system()
|
+ "&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:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user