Skip to content

Commit

Permalink
format fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lalmei committed Dec 5, 2024
1 parent fd75878 commit 1a2c182
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 27 deletions.
16 changes: 3 additions & 13 deletions agml/data/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,14 @@

import numpy as np

from agml.framework import AgMLSerializable
from agml.data.manager import DataManager
from agml.data.builder import DataBuilder
from agml.data.metadata import DatasetMetadata, make_metadata
from agml.data.exporters.yolo import export_yolo
from agml.utils.logging import log
from agml.utils.io import get_file_list, get_dir_list
from agml.utils.data import load_public_sources
from agml.utils.general import NoArgument, resolve_list_value
from agml.utils.random import inject_random_state
from agml.backend.config import data_save_path, synthetic_data_save_path, SUPER_BASE_DIR
from agml.backend.config import SUPER_BASE_DIR, data_save_path, synthetic_data_save_path
from agml.backend.experimental import AgMLExperimentalFeatureWrapper
from agml.backend.tftorch import (
StrictBackendError,
_add_dataset_to_mro, # noqa
get_backend,
set_backend,
user_changed_backend,
StrictBackendError,
_add_dataset_to_mro, # noqa
)
from agml.data.builder import DataBuilder
from agml.data.exporters.yolo import export_yolo
Expand Down
12 changes: 5 additions & 7 deletions agml/synthetic/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@
_HELIOS_CHECK_DONE_IN_SESSION = False

# Paths to the Helios module and the relevant C++ files.
HELIOS_PATH = os.path.join(recursive_dirname(__file__, 2), '_helios/Helios')
PROJECT_ROOT = os.path.join(HELIOS_PATH, 'projects')
CANOPY_SOURCE = os.path.join(
HELIOS_PATH, 'plugins/canopygenerator/src/CanopyGenerator.cpp')
CANOPY_HEADER = os.path.join(
HELIOS_PATH, 'plugins/canopygenerator/include/CanopyGenerator.h')
LIDAR_SOURCE = os.path.join(HELIOS_PATH, 'plugins/lidar/src/LiDAR.cpp')
HELIOS_PATH = os.path.join(recursive_dirname(__file__, 2), "_helios/Helios")
PROJECT_ROOT = os.path.join(HELIOS_PATH, "projects")
CANOPY_SOURCE = os.path.join(HELIOS_PATH, "plugins/canopygenerator/src/CanopyGenerator.cpp")
CANOPY_HEADER = os.path.join(HELIOS_PATH, "plugins/canopygenerator/include/CanopyGenerator.h")
LIDAR_SOURCE = os.path.join(HELIOS_PATH, "plugins/lidar/src/LiDAR.cpp")

# Path to the stored Helios configuration JSON file in root dir.
HELIOS_CONFIG_FILE = os.path.expanduser("~/.agml/helios_config.json")
Expand Down
6 changes: 3 additions & 3 deletions scripts/docs/gen_dataset_list.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import json
from textwrap import dedent
from importlib import resources
from textwrap import dedent


from jinja2.sandbox import SandboxedEnvironment
from jinja2 import StrictUndefined
from jinja2.sandbox import SandboxedEnvironment

# Check whether any dataset has been added that needs information updated (we do this
# by checking for any datasets in the `public_datasources.json` file that don't have
# corresponding information for the dataset statistics or other properties like shape).
Expand Down
2 changes: 0 additions & 2 deletions tests/config/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ def test_config_setup():
assert cfg.data_save_path() == cfg._get_config("data_path")
assert cfg.model_save_path() == cfg._get_config("model_path")
assert cfg.synthetic_data_save_path() == cfg._get_config("synthetic_data_path")


3 changes: 1 addition & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import os
from pathlib import Path
import shutil
from pathlib import Path

import pytest

from pytest import TempPathFactory


Expand Down

0 comments on commit 1a2c182

Please sign in to comment.