Skip to content

I'm getting TypeError("'<' not supported between instances of 'PyCall.jlwrap' and 'PyCall.jlwrap'") #782

Closed
@Lissanro

Description

@Lissanro

I'm getting TypeError("'<' not supported between instances of 'PyCall.jlwrap' and 'PyCall.jlwrap'"). Full error output: https://pastebin.com/nD3LnkvM. I'm new to PyCall so I'm not sure if this is a bug or I'm doing something wrong.

I'm trying to use fastai2 Python library like this:

using PyCall
fai = pyimport("fastai2.vision.all")
path = fai.untar_data(fai.URLs.PETS)
files = fai.get_image_files(path/"images")

function is_cat(file)
  return uppercase(file[1])
endપ

dls = fai.ImageDataLoaders.from_name_func(path, files, is_cat, item_tfms=fai.Resize(224), bs=128)

Last line results in error above.

Files with cat images start with uppercase letter in URLs.PETS (for example: "Siamese_50.jpg"). ImageDataLoaders.from_name_func() is supposed to call helper function is_cat() to label each image file as either "true" or "false".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions