Skip to content

What does teardown() do? #10

Closed
Closed

Description

@rhythmcao

Thanks a lot for providing this wonderful benchmark and environment.

Our team are developing based on the BrowserGym environment (trying to wrap over the BrowserEnv class). I wonder what the teardown function actually do for each task type. Is there any problem if we do not call this function after a series actions (w/ or w/o invoking the validate function)? It seems it will influence the history on cloud ServiceNow DB records.

Activity

  1. gasse commented on May 14, 2024

    @gasse
    Contributor

    Hi @rhythmcao , thank you for your interest!

    If you are developing an agent, the task.teardown() function is not meant to be called directly by you. It will be called by the BrowserEnv environment upon termination of an episode (env.reset() and env.close()).

    if you are developing a new task, implementing this method is optional. It gives you the possibility to clean things up once the agent is done interacting with the environment (e.g., deleting temporary data). it you not be relied upon too much though, as if your program terminates in the middle of an episode (agent or environment failure) there is no guarantee this method will be called at all.

    Hope this helps

  2. self-assigned this
    on May 14, 2024
  3. locked and limited conversation to collaborators on May 14, 2024
  4. converted this issue into a discussion #12 on May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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