Skip to content

Commit

Permalink
linter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Howuhh committed Jul 19, 2023
1 parent cdc6eed commit 88ecaec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
7 changes: 3 additions & 4 deletions algorithms/minari/any_percent_bc.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import Any, Dict, List, Optional, Tuple, Union
import contextlib
from dataclasses import asdict, dataclass
import os
import random
import uuid
from dataclasses import asdict, dataclass
from typing import Any, Dict, List, Optional, Tuple, Union

import gymnasium as gym
import minari
Expand All @@ -12,9 +12,8 @@
import torch
import torch.nn as nn
import torch.nn.functional as F
from tqdm.auto import trange

import wandb
from tqdm.auto import trange

TensorBatch = List[torch.Tensor]
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
Expand Down
9 changes: 4 additions & 5 deletions algorithms/minari/iql.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,26 @@
# 1. iql_deterministic is true only for 2 datasets. Can we remote it?
# 2. MLP class introduced bugs in the past. We should remove it.
# 3. Refactor IQL updating code to be more consistent in style
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
import contextlib
import copy
from dataclasses import asdict, dataclass
import os
import random
import uuid
from dataclasses import asdict, dataclass
from typing import Any, Callable, Dict, List, Optional, Tuple, Union

import gymnasium as gym
import minari
import numpy as np
import pyrallis
import torch
from torch.distributions import Normal
import torch.nn as nn
import torch.nn.functional as F
import wandb
from torch.distributions import Normal
from torch.optim.lr_scheduler import CosineAnnealingLR
from tqdm.auto import trange

import wandb

TensorBatch = List[torch.Tensor]

DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
Expand Down

0 comments on commit 88ecaec

Please sign in to comment.