Skip to content

Instantly share code, notes, and snippets.

View vgthengane's full-sized avatar
🎯
Focusing

Vishal Thengane vgthengane

🎯
Focusing
View GitHub Profile
@vgthengane
vgthengane / azuredeploy.json
Created December 1, 2023 21:06
label-studio docker file
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"hostingPlanName": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "Name of the hosting plan to use in Azure."
}
@vgthengane
vgthengane / data.csv
Last active August 9, 2023 08:24
Example dataset for anomaly detection in IoT devices.
MI_dir_L5_weight MI_dir_L5_mean MI_dir_L5_variance MI_dir_L3_weight MI_dir_L3_mean MI_dir_L3_variance MI_dir_L1_weight MI_dir_L1_mean MI_dir_L1_variance MI_dir_L0.1_weight MI_dir_L0.1_mean MI_dir_L0.1_variance MI_dir_L0.01_weight MI_dir_L0.01_mean MI_dir_L0.01_variance H_L5_weight H_L5_mean H_L5_variance H_L3_weight H_L3_mean H_L3_variance H_L1_weight H_L1_mean H_L1_variance H_L0.1_weight H_L0.1_mean H_L0.1_variance H_L0.01_weight H_L0.01_mean H_L0.01_variance HH_L5_weight HH_L5_mean HH_L5_std HH_L5_magnitude HH_L5_radius HH_L5_covariance HH_L5_pcc HH_L3_weight HH_L3_mean HH_L3_std HH_L3_magnitude HH_L3_radius HH_L3_covariance HH_L3_pcc HH_L1_weight HH_L1_mean HH_L1_std HH_L1_magnitude HH_L1_radius HH_L1_covariance HH_L1_pcc HH_L0.1_weight HH_L0.1_mean HH_L0.1_std HH_L0.1_magnitude HH_L0.1_radius HH_L0.1_covariance HH_L0.1_pcc HH_L0.01_weight HH_L0.01_mean HH_L0.01_std HH_L0.01_magnitude HH_L0.01_radius HH_L0.01_covariance HH_L0.01_pcc HH_jit_L5_weight HH_jit_L5_mean HH_jit_L5_variance HH_jit_L3_weight HH_jit
@vgthengane
vgthengane / example.py
Last active March 1, 2023 10:22
PyTorch Forum Question: Frequencey of evaluation steps sffecting PyTorch model accuracy
import os
import random
import numpy as np
from tqdm import tqdm
from omegaconf import DictConfig
import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
@vgthengane
vgthengane / pyg_install
Created December 9, 2021 14:26
Automatic PyTorch Geometric installation.
import torch
def format_pytorch_version(version):
return version.split('+')[0]
TORCH_version = torch.__version__
TORCH = format_pytorch_version(TORCH_version)
def format_cuda_version(version):
return 'cu' + version.replace('.', '')
@vgthengane
vgthengane / run.log
Last active August 23, 2022 01:31
Error logs for L2p issue creation.
I0805 09:46:50.326969 140593525006912 xla_bridge.py:328] Unable to initialize backend 'tpu_driver': NOT_FOUND: Unable to find driver in registry given worker:
I0805 09:46:50.384492 140593525006912 xla_bridge.py:328] Unable to initialize backend 'rocm': NOT_FOUND: Could not find registered platform with name: "rocm". Available platform names are: CUDA Host Interpreter
I0805 09:46:50.385140 140593525006912 xla_bridge.py:328] Unable to initialize backend 'tpu': module 'jaxlib.xla_extension' has no attribute 'get_tpu_client'
I0805 09:46:50.385412 140593525006912 main.py:68] JAX host: 0 / 1
I0805 09:46:50.385540 140593525006912 main.py:69] JAX devices: [GpuDevice(id=0, process_index=0), GpuDevice(id=1, process_index=0), GpuDevice(id=2, process_index=0), GpuDevice(id=3, process_index=0)]
I0805 09:46:50.918455 140593525006912 dataset_info.py:365] Load dataset info from /nfs/users/ext_vishal.thengane/tensorflow_datasets/cifar100/3.0.2
I0805 09:46:50.923666 140593525006912 dataset_builder.py:351] Reusing dataset cifa
@vgthengane
vgthengane / env2require.py
Created January 7, 2022 03:35
Convert environment.yaml to requirements.txt
import ruamel.yaml
yaml = ruamel.yaml.YAML()
data = yaml.load(open('environment.yml'))
requirements = []
for dep in data['dependencies']:
if isinstance(dep, str):
package, package_version, python_version = dep.split('=')
if python_version == '0':
@vgthengane
vgthengane / python.gitignore
Last active January 3, 2022 12:08
.gitignore file for python language
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
@vgthengane
vgthengane / SessionState.py
Created July 28, 2021 07:21
Session state for streamlit library.
import streamlit as st
from streamlit.hashing import _CodeHasher
try:
# Before Streamlit 0.65
from streamlit.ReportThread import get_report_ctx
from streamlit.server.Server import Server
except ModuleNotFoundError:
# After Streamlit 0.65
from streamlit.report_thread import get_report_ctx