Herb-AI / HerbBenchmarks.jl

Benchmarks and problems for Herb.jl
https://herb-ai.github.io/
MIT License
1 stars 0 forks source link

Convert all examples to type `Vector{IOExample}` #9

Closed THinnerichs closed 6 months ago

THinnerichs commented 9 months ago

Currently all problem.examples are of type Vector{Example}, even though they only consist of IOExamples. Typed functions are hence not applicable even though they should be.

Workaround: map(ex -> ex::IOExample, problem.examples)

What doesn't work as a solution: Substituting the type of vector in the file directly:

problem_strip_numeric_characters_from_cell = Problem(Example[
    IOExample(Dict{Symbol, Any}(:_arg_1 => "34653 jim mcdonald"), " jim mcdonald"),
    IOExample(Dict{Symbol, Any}(:_arg_1 => "price is 500"), " price is "),
    IOExample(Dict{Symbol, Any}(:_arg_1 => "100 apples"), " apples")])

to

problem_strip_numeric_characters_from_cell = Problem(IOExample[
    IOExample(Dict{Symbol, Any}(:_arg_1 => "34653 jim mcdonald"), " jim mcdonald"),
    IOExample(Dict{Symbol, Any}(:_arg_1 => "price is 500"), " price is "),
    IOExample(Dict{Symbol, Any}(:_arg_1 => "100 apples"), " apples")])
ReubenJ commented 6 months ago

Now a bug given that HerbData is being deprecated in favor of HerbSpecification.