Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Commit

Permalink
Update OFA
Browse files Browse the repository at this point in the history
Signed-off-by: Maciej Szankin <[email protected]>
  • Loading branch information
Maciej Szankin committed Sep 30, 2023
1 parent 5743d3c commit fe05f54
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dynast/supernetwork/image_classification/ofa/ofa_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import csv
import uuid
from datetime import datetime
from typing import Dict, Tuple
from typing import Dict, Tuple, Union

import torch

Expand Down Expand Up @@ -46,7 +46,7 @@ class OFARunner(Runner):
def __init__(
self,
supernet: str,
dataset_path: str,
dataset_path: Union[None, str] = None,
predictors: Dict[str, Predictor] = {},
batch_size: int = 128,
eval_batch_size: int = 128,
Expand Down Expand Up @@ -301,7 +301,6 @@ def eval_subnet(self, x):
# Predictor Mode
if self.predictor_mode == True:
for metric in self.optimization_metrics:
# TODO(macsz) Maybe move [0] to the `estimate_metric`.
individual_results[metric] = self.evaluator.estimate_metric(
metric, self.manager.onehot_generic(x).reshape(1, -1)
)[0]
Expand Down

0 comments on commit fe05f54

Please sign in to comment.