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
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools>=43.0.0", "wheel"]
|
||||
requires = ["setuptools>=57.0.0", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
# Project settings -----------------------------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -122,9 +122,7 @@ class BaseDataset(Dataset):
|
|||
except Exception as e:
|
||||
raise FileNotFoundError(f"{self.prefix}Error loading data from {img_path}\n{HELP_URL}") from e
|
||||
if self.fraction < 1:
|
||||
# im_files = im_files[: round(len(im_files) * self.fraction)]
|
||||
num_elements_to_select = round(len(im_files) * self.fraction)
|
||||
im_files = random.sample(im_files, num_elements_to_select)
|
||||
im_files = im_files[: round(len(im_files) * self.fraction)] # retain a fraction of the dataset
|
||||
return im_files
|
||||
|
||||
def update_labels(self, include_class: Optional[list]):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
|
||||
import contextlib
|
||||
import json
|
||||
from collections import defaultdict
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue