JuliaAI / JuliaAI/MLJOpenML.jl

Better error message for data set identifiers that are invalid

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
10
Forks
2
PR merge metrics
No merged PRs in 30d

Description

julia> OpenML.load(91)
Error occurred : HTTP.ExceptionRequest.StatusError(412, "GET", "/api/v1/json/data/91", HTTP.Messages.Response:
"""
HTTP/1.1 412 Precondition Failed
Date: Wed, 07 Apr 2021 04:34:51 GMT
Server: Apache/2.4.29 (Ubuntu)
Set-Cookie: ci_session=ptukfgg7rfn260bs62h2vqkdhapcgeh5; expires=Wed, 07-Apr-2021 06:34:51 GMT; Max-Age=7200; path=/; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Content-Length: 52
Content-Type: application/json; charset=utf-8
{"error":{"code":"111","message":"Unknown dataset"}}""")
ERROR: MethodError: no method matching getindex(::Nothing, ::String)
Stacktrace:
 [1] load(id::Int64)
   @ MLJOpenML ~/.julia/packages/MLJOpenML/DIk0H/src/openml.jl:110
 [2] top-level scope
   @ REPL[4]:1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with OpenML.load(91), then inspect the load(id::Int64) entry point at src/openml.jl:110. Trace the response handling for the OpenML "Unknown dataset" error and make invalid identifiers produce a useful error message instead of a MethodError; verify the same command shows the improved message.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.