Skip to content

UI Design Suggestion of ExplainaBoard Client #38

@pfliu-nlp

Description

@pfliu-nlp

Current Implementation (in the latest PRs)

from explainaboard_client.client import ExplainaboardClient
from explainaboard_client.config import Config

client = ExplainaboardClient(Config(
    "user_email",
    "api_key",
    "environment"
))

result= client.evaluate_system_file(
    system_output_file="sst2-output.txt",
    system_output_file_type="text",
    task="text-classification",
    system_name="test_cli",
    metric_names=["Accuracy"],
    source_language="en",
    target_language="en",
    dataset="sst2",
    split="test",
    sh

Unfriendly Points

  • (1) explainaboard_client.client: too long and verbose and no one wants to remember this
  • (2) from explainaboard_client.config import Config: the additional burden to remember this (importing Config)
  • (3) users need to import two lines of unfamiliar packages, which are not good
  • (4) Config requires too much information, for example, could we remove the need of email or even remove the config!

Some potential better designs in my mind (from worse -> better)

1.

import os
from explainaboard_client import ExplainaboardClient


explainaboard_client.api_key = os.getenv("API_KEY") # api_key could be a global/system variable


result= ExplainaboardClient.evaluate_system_file(
    system_output_file="sst2-output.txt",
    system_output_file_type="text",
    task="text-classification",
    system_name="test_cli",
    metric_names=["Accuracy"],
    source_language="en",
    target_language="en",
    dataset="sst2",
    split="test",
    ..)

2.

import os
from explainaboard_client

explainaboard_client.api_key = os.getenv("API_KEY") 

result= explainaboard_client.ExplainaboardClient.evaluate_system_file(...)

3.

import os
from inspiredco import ExplainaboardClient  # from  inspiredco import EaasClient in the future

inspiredco.api_key = os.getenv("API_KEY")


result= ExplainaboardClient.evaluate_system_file(...)

3.14

import os
from inspiredco

inspiredco.api_key = os.getenv("API_KEY")

result= inspiredco.ExplainaboardClient.evaluate_system_file(...)

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