Skip to content

Commit

Permalink
Merge pull request #146 from fact-project/update_pmml
Browse files Browse the repository at this point in the history
Update sklearn2pmml
  • Loading branch information
maxnoe authored Jan 20, 2021
2 parents 5619074 + b907f38 commit c9989aa
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 21 deletions.
11 changes: 2 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,17 @@ env:
matrix:
include:
- python: '3.6'
env:
- EXTRAS="all"
- python: '3.7'
env:
- EXTRAS="all"
- python: '3.8'
env:
- EXTRAS="pmml, cta" # no 3.8 support for onnx yet

before_install:
- pip install --upgrade pip
- pip install Cython

install:
- pip install ".[$EXTRAS]"
- pip install ".[all]"

script:
- python setup.py test
- pytest -v

deploy:
provider: pypi
Expand Down
2 changes: 1 addition & 1 deletion aict_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.25.0'
__version__ = '0.25.1'
20 changes: 10 additions & 10 deletions aict_tools/scripts/fact_to_dl3.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def main(
df['disp_prediction'] = disp

if source:
obstime = Time(pd.to_datetime(df['timestamp'].values).to_pydatetime())
obstime = Time(df['timestamp'].to_numpy().astype('U'))
source_altaz = concat_results_altaz(parallelize_array_computation(
partial(to_altaz, source=source),
obstime,
Expand All @@ -338,8 +338,8 @@ def main(
prediction_y,
source_altaz.zen.deg,
source_altaz.az.deg,
df['pointing_position_zd'].values,
df['pointing_position_az'].values,
df['pointing_position_zd'].to_numpy(),
df['pointing_position_az'].to_numpy(),
obstime,
n_jobs=n_jobs,
)
Expand All @@ -358,13 +358,13 @@ def main(
calc_source_features_sim,
prediction_x,
prediction_y,
df['source_position_zd'].values,
df['source_position_az'].values,
df['pointing_position_zd'].values,
df['pointing_position_az'].values,
df['cog_x'].values,
df['cog_y'].values,
df['delta'].values,
df['source_position_zd'].to_numpy(),
df['source_position_az'].to_numpy(),
df['pointing_position_zd'].to_numpy(),
df['pointing_position_az'].to_numpy(),
df['cog_x'].to_numpy(),
df['cog_y'].to_numpy(),
df['delta'].to_numpy(),
project_disp=config.disp.project_disp,
n_jobs=n_jobs,
)
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@

extras_require = {
'pmml': [
'sklearn2pmml<0.57',
'sklearn2pmml>=0.66',
'jpmml_evaluator>=0.2.2',
],
'onnx': ['skl2onnx', 'onnxmltools', 'onnxruntime~=1.0'],
'cta': ['ctapipe'],
'tests': ['pytest', 'pytest-runner'],
}
extras_require['all'] = list({dep for deps in extras_require.values() for dep in deps})

Expand Down

0 comments on commit c9989aa

Please sign in to comment.