Skip to content

Instantly share code, notes, and snippets.

@zblz
zblz / mlflow_plugin_system_proposal.md
Last active August 17, 2020 09:13
Proposal for plugin system in MLflow

Proposal for a plugin system in MLflow

Motivation

MLflow has an internally pluggable architecture to enable using different backends for both the tracking store and the artifact store. This makes it easy to add new backends in the mlflow package, but does not allow for other packages to provide new handlers for new backends.

This would be useful for several reasons:

# -*- coding: utf-8 -*-
from naima.models import Synchrotron
from naima.utils import trapz_loglog
from naima.extern.validator import validate_scalar
from naima.radiative import _validate_ene
##use naima.radiative logger
#import naima
#log = naima.radiative.log
#!/usr/bin/env python3
import matplotlib
import matplotlib.pyplot as plt
import sys
print('Matplotlib path: ', matplotlib.__path__, 'version: ', matplotlib.__version__)
for fs in [None,'dejavusans','dejavuserif','cm','stix','stixsans']:
#for fs in [None,'dejavuserif','cm','stix','stixsans','tex','texsans','texhelvet']:
matplotlib.rcdefaults()
@zblz
zblz / quantity_test.py
Last active August 29, 2015 14:02
Quantity speed test for gammafit.ProtonOZM
import numpy as np
## Constants and units
from astropy import units as u
# import constant values from astropy.constants
import astropy.constants as const
from astropy.constants import c, G, m_e, h, hbar, k_B, R_sun, sigma_sb, e, m_p
e = e.gauss
mec2 = (m_e*c**2).cgs
# variables for integrand