Skip to content

Commit

Permalink
ultralytics 8.0.205 HUB dataset downloads fix (ultralytics#6101)
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Jocher <[email protected]>
  • Loading branch information
glenn-jocher authored Nov 2, 2023
1 parent ff0aba1 commit ff921ca
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions docs/help/privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ To gain insight into the current configuration of your settings, you can view th
# View all settings
print(settings)

# Return a specific setting
value = settings['runs_dir']
# Return analytics and crash reporting setting
value = settings['sync']
```

=== "CLI"
Expand Down Expand Up @@ -109,14 +109,14 @@ Ultralytics allows users to easily modify their settings. Changes can be perform
=== "CLI"
If you prefer using the command-line interface, the following commands will allow you to modify your settings:
```bash
# Update a setting
yolo settings sync=false
# Disable analytics and crash reporting
yolo settings sync=False

# Reset settings to default values
yolo settings reset
```

This will prevent any data from being sent to Google Analytics or Snyk. Your settings will be respected across all sessions using the Ultralytics package.
The `sync=False` setting will prevent any data from being sent to Google Analytics or Snyk. Your settings will be respected across all sessions using the Ultralytics package and saved to disk for future sessions.

## Commitment to Privacy

Expand Down
2 changes: 1 addition & 1 deletion ultralytics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license

__version__ = '8.0.204'
__version__ = '8.0.205'

from ultralytics.models import RTDETR, SAM, YOLO
from ultralytics.models.fastsam import FastSAM
Expand Down
2 changes: 1 addition & 1 deletion ultralytics/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ def remove_colorstr(input_string):
>>> remove_colorstr(colorstr('blue', 'bold', 'hello world'))
>>> 'hello world'
"""
ansi_escape = re.compile(r'\x1B(?:[@-Z\\\-_]|\[[0-9]*[ -/]*[@-~])')
ansi_escape = re.compile(r'\x1B\[[0-9;]*[A-Za-z]')
return ansi_escape.sub('', input_string)


Expand Down
4 changes: 3 additions & 1 deletion ultralytics/utils/downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ def safe_download(url,
url, file = get_google_drive_file_info(url)

f = Path(dir or '.') / (file or url2file(url)) # URL converted to filename
if not f.is_file(): # URL and file do not exist
if '://' not in str(url) and Path(url).is_file(): # URL exists ('://' check required in Windows Python<3.10)
f = Path(url) # filename
elif not f.is_file(): # URL and file do not exist
desc = f"Downloading {url if gdrive else clean_url(url)} to '{f}'"
LOGGER.info(f'{desc}...')
f.parent.mkdir(parents=True, exist_ok=True) # make directory if missing
Expand Down

0 comments on commit ff921ca

Please sign in to comment.