Skip to content

Commit

Permalink
chaged variable name and add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
minkyu-choi07 committed Feb 8, 2024
1 parent 3258271 commit a6a1457
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Python Unit Tests
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -e ."[dev, test]"
- name: Run Unit Tests
run: |
python -m unittest discover
2 changes: 1 addition & 1 deletion run_scripts/run_synthetic_tlv_coco.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,5 @@
number_video_per_set_of_frame=args.number_video_per_set_of_frame,
increase_rate=args.increase_rate,
ltl_logic=tl,
save_images=args.save_frames,
save_images=args.save_images,
)
2 changes: 1 addition & 1 deletion run_scripts/run_synthetic_tlv_coco_until_long_horizon.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@
number_video_per_set_of_frame=args.number_video_per_set_of_frame,
increase_rate=args.increase_rate,
present_prop1_till_prop2=args.present_prop1_till_prop2,
save_images=args.save_frames,
save_images=args.save_images,
)
2 changes: 1 addition & 1 deletion run_scripts/run_synthetic_tlv_imagenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@
number_video_per_set_of_frame=args.number_video_per_set_of_frame,
increase_rate=args.increase_rate,
ltl_logic=tl,
save_images=args.save_frames,
save_images=args.save_images,
)
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@
number_video_per_set_of_frame=args.number_video_per_set_of_frame,
increase_rate=args.increase_rate,
present_prop1_till_prop2=args.present_prop1_till_prop2,
save_images=args.save_frames,
save_images=args.save_images,
)
8 changes: 4 additions & 4 deletions tlv_dataset/generator/synthetic_tlv_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ def generate(
if save_as == "dict":
ltl_frame.save_as_dict(
save_path=self._save_dir
/ f"benchmark_{self.data_loader.name}_ltl_{ltl_frame.ltl_formula}_{number_frame}_{video_idx}.pkl"
/ f"tlv_dataset_{self.data_loader.name}_ltl_{ltl_frame.ltl_formula}_{number_frame}_{video_idx}.pkl"
)
else:
ltl_frame.save_as_class(
save_path=self._save_dir
/ f"benchmark_{self.data_loader.name}_ltl_{ltl_frame.ltl_formula}_{number_frame}_{video_idx}.pkl"
/ f"tlv_dataset_{self.data_loader.name}_ltl_{ltl_frame.ltl_formula}_{number_frame}_{video_idx}.pkl"
)

number_frame += increase_rate
Expand Down Expand Up @@ -195,12 +195,12 @@ def generate_until_time_delta(
if save_as == "dict":
ltl_frame.save_as_dict(
save_path=self._save_dir
/ f"benchmark_{self.data_loader.name}_ltl_{ltl_frame.ltl_formula}_{number_frame}_{video_idx}.pkl"
/ f"tlv_dataset_{self.data_loader.name}_ltl_{ltl_frame.ltl_formula}_{number_frame}_{video_idx}.pkl"
)
else:
ltl_frame.save_as_class(
save_path=self._save_dir
/ f"benchmark_{self.data_loader.name}_ltl_{ltl_frame.ltl_formula}_{number_frame}_{video_idx}.pkl"
/ f"tlv_dataset_{self.data_loader.name}_ltl_{ltl_frame.ltl_formula}_{number_frame}_{video_idx}.pkl"
)

number_frame += increase_rate
Expand Down

0 comments on commit a6a1457

Please sign in to comment.