Skip to content

Commit

Permalink
added type hinting
Browse files Browse the repository at this point in the history
  • Loading branch information
ttz77 committed Jan 29, 2025
1 parent 1a2c089 commit 35eef6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import argparse
import subprocess
from typing import List
from typing import List, Dict, Any, Union, Literal

from utils.types import ConfigType
from utils.config_utils import process_config
Expand All @@ -19,8 +19,8 @@
post_hoc_plot: bool = True

# for each experiment key, write the modifications to the config file
gpu_ids = [2, 3, 5, 6]
exp_dict = {
gpu_ids: List[Union[int, Literal["cpu"]]] = [2, 3, 5, 6] # can be either a list of ids or "cpu"
exp_dict: Dict[str, Dict[str, Any]] = { # keys are strings, values can be Any
"experiment_1": {
"algo_config": traditional_fl,
"sys_config": grpc_system_config,
Expand Down

0 comments on commit 35eef6e

Please sign in to comment.