Skip to content

Instantly share code, notes, and snippets.

View KilianFt's full-sized avatar

Kilian Freitag KilianFt

  • Chalmers
  • Europe
View GitHub Profile
@KilianFt
KilianFt / agent.py
Created May 9, 2024 11:09
Input / output of webagent
def act(dom_tree, action_history, viewport):
"""
Perform an action on the DOM tree.
Input:
- dom_tree: html / xml DOM tree of the page
- action_history: action history with instructions from the user
- viewport: the viewport of the browser
Output:
- action: the action performed in WebLINX format
@KilianFt
KilianFt / wandb_d3rlpy_sweep.py
Created November 20, 2023 09:22
wandb sweep with d3rlpy
from typing import Dict, Any
import torch
import wandb
import numpy as np
import d3rlpy
from d3rlpy.datasets import get_cartpole
from d3rlpy.algos import DQNConfig
from d3rlpy.metrics import TDErrorEvaluator, EnvironmentEvaluator