Skip to content

Commit d531bd2

Browse files
committed
Get some visuals working
1 parent 37c4d9c commit d531bd2

File tree

2 files changed

+17
-72
lines changed

2 files changed

+17
-72
lines changed

evaluation_script/__init__.py

Lines changed: 5 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -52,34 +52,9 @@ def is_package_version_on_pypi(package_name, version=None):
5252
sys.stderr.flush()
5353
return False
5454

55-
56-
# package = "evo"
57-
# version = "1.31.1"9
58-
59-
# if is_package_version_on_pypi(package, version):
60-
# subprocess.check_call([sys.executable, "-m", "pip", "install", f"{package}=={version}"])
61-
62-
def force_install(package):
63-
try:
64-
subprocess.run([sys.executable,"-m","pip","install","--disable-pip-version-check","--ignore-requires-python",package])
65-
except subprocess.CalledProcessError as e:
66-
print(f"Error occurred while installing {package}: {e.stderr}")
67-
sys.stderr.flush()
68-
except FileNotFoundError:
69-
print("Error: Pip is not found. make sure you have pip installed.")
70-
sys.stderr.flush()
71-
except PermissionError:
72-
print("Error: Permission denied. ")
73-
sys.stderr.flush()
74-
75-
76-
77-
7855
def install(package):
7956
# Install a pip python package
8057

81-
# Args:
82-
# package ([str]): Package name with version
8358
try:
8459
subprocess.run([sys.executable,"-m","pip","install","--disable-pip-version-check",package])
8560
except subprocess.CalledProcessError as e:
@@ -92,29 +67,11 @@ def install(package):
9267
print("Error: Permission denied. ")
9368
sys.stderr.flush()
9469

95-
96-
97-
# def install(package):
98-
# # try:
99-
# subprocess.check_call([sys.executable, "-m", "pip", "install", package])
100-
# # except subprocess.CalledProcessError as e:
101-
# # print(f"❌ Failed to install {package}: {e}")
102-
10370
# Install standard dependencies
104-
is_package_version_on_pypi("numpy")
105-
install("numpy")
106-
# is_package_version_on_pypi("evo")
107-
# install("evo")
108-
# is_package_version_on_pypi("scipy", "1.10.1")
109-
install("scipy")
110-
install("matplotlib")
111-
install("pyyaml")
112-
is_package_version_on_pypi("tqdm")
113-
install("tqdm")
11471
install("argcomplete")
11572
install("colorama")
11673
install("pillow")
117-
install("pykitti") # Might install additional light deps
74+
# install("pykitti") # Might install additional light deps
11875
# install("rosbags")
11976
# is_package_version_on_pypi("natsort")
12077
install("natsort")
@@ -126,11 +83,7 @@ def install(package):
12683
evo_wheel_path = os.path.join(this_dir, "deps", "evo-1.31.1-py3-none-any.whl")
12784

12885
# # try:
129-
subprocess.check_call([sys.executable, "-m", "pip", "install", "--no-deps", "--ignore-requires-python", evo_wheel_path])
130-
131-
import evo as afterfunc
132-
print("evo version:", afterfunc.__version__)
133-
sys.stdout.flush()
86+
subprocess.check_call([sys.executable, "-m", "pip", "install", "--no-deps","--disable-pip-version-check", "--ignore-requires-python", evo_wheel_path])
13487

13588
from evo import __version__
13689

@@ -153,23 +106,16 @@ def version_to_tuple(version):
153106
f"Evo version {__version__} is less than the required version {'.'.join(map(str, required_version_tuple))}. Point_distances not supported."
154107
)
155108
else:
156-
print(f"\033[92mEvo version {__version__} meets the required version.\033[0m")
109+
print(f"✅ Evo version {__version__} meets the required version.")
157110
sys.stdout.flush()
158111

159112

160113
from evo.core import sync
161114
from evo.core.trajectory import PoseTrajectory3D
162115
from evo.core.trajectory import Plane
163116
from evo.core.metrics import PoseRelation, Unit
164-
# from evo.tools import file_interface
165-
# import evo.main_ape as main_ape
166-
# import evo.main_rpe as main_rpe
167117

168-
# print("✅ evo is installed and available.")
169-
# except subprocess.CalledProcessError as e:
170-
# print(f"❌ Failed to install evo wheel: {e}")
171-
# except ImportError as e:
172-
# print(f"❌ Failed to import evo after install: {e}")
118+
print("✅ evo is installed and available.")
119+
sys.stdout.flush()
173120

174-
#
175121
from .main import evaluate

evaluation_script/main.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77

88

99
def evaluate(test_annotation_file, user_submission_file, phase_codename, **kwargs):
10-
10+
#🔁
1111
print("\n" + "=" * 80)
12-
print("🔁 NEW RUN STARTING")
12+
print(f"Evaluating submission with ID: {kwargs['submission_metadata']['id']}")
1313
print("=" * 80 + "\n")
1414
sys.stdout.flush()
1515

1616
# script_dir = os.path.dirname(os.path.abspath(__file__))
17-
print("Starting Evaluation.....")
1817
# print(kwargs['submission_metadata'])
1918
output = {}
2019
# evaluated_metrics = []
@@ -126,8 +125,8 @@ def evaluate(test_annotation_file, user_submission_file, phase_codename, **kwarg
126125
# # output["result"] = []
127126

128127

129-
print("\033[91mPossible error\033[0m", file=sys.stderr)
130-
print("❌ Fatal error while parsing", file=sys.stderr)
128+
# print("\033[91mPossible error\033[0m", file=sys.stderr)
129+
# print("❌ Fatal error while parsing", file=sys.stderr)
131130

132131
output["result"] = [
133132
{
@@ -160,16 +159,16 @@ def evaluate(test_annotation_file, user_submission_file, phase_codename, **kwarg
160159
},
161160
]
162161

163-
print("🔧 Installing dependencies...")
164-
print("📥 Loading annotation file...")
165-
print("🧪 Evaluating predictions...")
166-
print("📈 Accuracy: 92.3%")
167-
print("✅ Evaluation complete!")
162+
# print("🔧 Installing dependencies...")
163+
# print("📥 Loading annotation file...")
164+
# print("🧪 Evaluating predictions...")
165+
# print("📈 Accuracy: 92.3%")
166+
# print("✅ Evaluation complete!")
168167

169-
print("⚠️ Warning: trajectory misaligned", file=sys.stderr)
170-
print("❌ Evaluation failed due to missing file", file=sys.stderr)
168+
# print("⚠️ Warning: trajectory misaligned", file=sys.stderr)
169+
# print("❌ Evaluation failed due to missing file", file=sys.stderr)
171170

172-
print("\n" + "🧵" * 20 + " LOG START " + "🧵" * 20)
171+
# print("\n" + "🧵" * 20 + " LOG START " + "🧵" * 20)
173172

174173
# for i, eval_result in enumerate(evaluated_metrics):
175174
# metrics = eval_result["metrics"]

0 commit comments

Comments
 (0)