PEP660 support for pip install -e . (#9851)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
9b7a0c82fd
commit
5e3da9bbf9
3 changed files with 3 additions and 4 deletions
|
|
@ -19,7 +19,7 @@
|
||||||
# For comprehensive documentation and usage instructions, visit: https://docs.ultralytics.com
|
# For comprehensive documentation and usage instructions, visit: https://docs.ultralytics.com
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools>=43.0.0", "wheel"]
|
requires = ["setuptools>=57.0.0", "wheel"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
# Project settings -----------------------------------------------------------------------------------------------------
|
# Project settings -----------------------------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -122,9 +122,7 @@ class BaseDataset(Dataset):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise FileNotFoundError(f"{self.prefix}Error loading data from {img_path}\n{HELP_URL}") from e
|
raise FileNotFoundError(f"{self.prefix}Error loading data from {img_path}\n{HELP_URL}") from e
|
||||||
if self.fraction < 1:
|
if self.fraction < 1:
|
||||||
# im_files = im_files[: round(len(im_files) * self.fraction)]
|
im_files = im_files[: round(len(im_files) * self.fraction)] # retain a fraction of the dataset
|
||||||
num_elements_to_select = round(len(im_files) * self.fraction)
|
|
||||||
im_files = random.sample(im_files, num_elements_to_select)
|
|
||||||
return im_files
|
return im_files
|
||||||
|
|
||||||
def update_labels(self, include_class: Optional[list]):
|
def update_labels(self, include_class: Optional[list]):
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
import json
|
import json
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue