This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import wandb | |
import pandas as pd | |
from datetime import datetime, timezone | |
from collections import defaultdict | |
from typing import List, Dict, Tuple, Optional, Any | |
def query_wandb_runs(project_name, entity_name=None, start_date=None, end_date=None, filters=None): | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Simple Model Performance Tester using ContentManager for media sampling | |
This version uses the ContentManager class to sample media files, similar to the GAS validator. | |
""" | |
import os | |
import sys | |
import json | |
import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""Simplified local inference server for model testing.""" | |
print("🚀 Starting simple inference server script...") | |
import os | |
import sys | |
import time | |
from pathlib import Path | |
from typing import Dict, Any |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import numpy as np | |
import onnxruntime as ort | |
from PIL import Image | |
import torch | |
import time | |
from pathlib import Path | |
import cv2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wandb | |
import os | |
import numpy as np | |
def download_wandb_file(run, file_path, output_dir="downloaded_files"): | |
""" | |
Download a file from a W&B run using the file path. | |
Args: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import wandb | |
import pandas as pd | |
from datetime import datetime, timezone | |
from collections import defaultdict | |
from typing import List, Dict, Tuple, Optional, Any |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import wandb | |
import pandas as pd | |
from datetime import datetime, timezone | |
from collections import defaultdict | |
from typing import List, Dict, Tuple, Optional, Any | |
def query_wandb_runs(project_name, entity_name=None, start_date=None, end_date=None, filters=None): | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
class ModelWrapper(torch.nn.Module): | |
def __init__(self, model): | |
super(ModelWrapper, self).__init__() | |
self.model = model | |
def forward(self, x): | |
data_dict = {'image': x} # model expects data dict as input | |
output = self.model(data_dict, inference=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import os | |
from pathlib import Path | |
import logging | |
def send_video_to_validator( | |
video_path: str, | |
api_url: str, | |
auth_token: str, | |
timeout: int = 40 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The MIT License (MIT) | |
# Copyright © 2023 Yuma Rao | |
# developer: dubm | |
# Copyright © 2023 Bitmind | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | |
# documentation files (the “Software”), to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, | |
# and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
NewerOlder