Skip to content

SnowInstance is created at import time #98

@younik

Description

@younik

After #90, the SnowInstance is now created at import time.

config = SNowInstance().report_filter_config
if config is None:
REPORT_DATE_FILTER = REPORT_TIME_FILTER = None
else:
REPORT_DATE_FILTER = config["report_date_filter"]
REPORT_TIME_FILTER = config["report_time_filter"]

I don't think this is good as:

  1. The instance must be running at import time. Some libraries, like BrowserGym, might have multiple benchmarks, so this will likely affect every run of the library, even if WorkArena is not launched.
  2. All the task accept an instance at init (good!), allowing other libraries to self create the instance (so env variables might not be present, or some other process must be done first)

As this is only to get some constants that are used inside the Dashboard task, I suggest to move this code inside init function.

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