class_docstr: Basic wrapper around several `DataLoader`s with factory methods for computer vision problems
class_docstr_tok: ["Basic","wrapper","around","several","`","DataLoader","`","s","with","factory","methods","for","computer","vision","problems"]
docstr: Create from the name attrs of `fnames` in `path`s with `label_func`
docstr_tok: ["Create","from","the","name","attrs","of","`","fnames","`","in","`","path","`","s","with","`","label_func","`"]
code: def from_name_func(
      cls,
      path: str
      | Path,  # Set the default path to a directory that a `Learner` can use to save files like models
      fnames: list,  # A list of `os.Pathlike`'s to individual image files
      label_func: callable,  # A function that receives a string (the file name) and outputs a label
      **kwargs,
  ) -> DataLoaders:
      "Create from the name attrs of `fnames` in `path`s with `label_func`"
      if (
          sys.platform == "win32"
          and isinstance(label_func, types.LambdaType)
          and label_func.__name__ == "<lambda>"
      ):
          # https://medium.com/@jwnx/multiprocessing-serialization-in-python-with-pickle-9844f6fa1812
          raise ValueError(
              "label_func couldn't be lambda function on Windows"
          )
      f = using_attr(label_func, "name")
      return cls.from_path_func(path, fnames, f, **kwargs)
  
imports: from __future__ import annotations
  from ..torch_basics import *
  from ..data.all import *
  from .core import *
  import types
label_desc: Use image node_id 3 for calling the ImageDataLoaders obj's underlying member method code with example usage: obj.from_name_func(cls, path, fnames, label_func) and returns: cls