Browse Source

Merge branch 'dev' of https://github.com/datamllab/tods into dev

master
hwy893747147 3 years ago
parent
commit
b11862ce22
5 changed files with 90 additions and 12 deletions
  1. +38
    -0
      .github/workflows/build.yml
  2. +38
    -0
      .github/workflows/unit_test.yml
  3. +3
    -1
      README.md
  4. +1
    -1
      setup.py
  5. +10
    -10
      tods/searcher/brute_force_search.py

+ 38
- 0
.github/workflows/build.yml View File

@@ -0,0 +1,38 @@
name: Build

on:
- push
# branches: [main, development]
- pull_request

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-latest, macOS-latest]
os: [macOS-latest]
#python-version: ['3.6']
python-version: ['3.7', '3.8']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install -e .
- name: coverall
run: |
pip install coveralls
pip install pytest-cover
- name: run pytest
run: |
py.test tods/tests/ --cov=tods
coveralls
- name: codecov
uses: codecov/codecov-action@v1

+ 38
- 0
.github/workflows/unit_test.yml View File

@@ -0,0 +1,38 @@
name: Build

on:
- push
# branches: [main, development]
- pull_request

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [ubuntu-latest, macOS-latest]
os: [macOS-latest]
#python-version: ['3.6']
python-version: ['3.7', '3.8']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install -e .
- name: coverall
run: |
pip install coveralls
pip install pytest-cover
- name: run pytest
run: |
py.test tods/tests/ --cov=tods
coveralls
- name: codecov
uses: codecov/codecov-action@v1

+ 3
- 1
README.md View File

@@ -2,7 +2,9 @@


<img width="500" src="./docs/img/tods_logo.png" alt="Logo" /> <img width="500" src="./docs/img/tods_logo.png" alt="Logo" />


[![Build Status](https://travis-ci.org/datamllab/tods.svg?branch=master)](https://travis-ci.org/datamllab/tods)
[![Actions Status](https://github.com/datamllab/tods/workflows/Build/badge.svg)](https://github.com/datamllab/tods/actions)

[![codecov](https://codecov.io/gh/datamllab/tods/branch/dev/graph/badge.svg?token=M90ZCVTRBF)](https://codecov.io/gh/datamllab/tods)


[中文文档](README.zh-CN.md) [中文文档](README.zh-CN.md)




+ 1
- 1
setup.py View File

@@ -35,7 +35,7 @@ setup(
] ]
}, },
install_requires=[ install_requires=[
'tamu_d3m==2021.11.24',
'tamu_d3m==2022.01.21',
'tamu_axolotl', 'tamu_axolotl',
'numpy<=1.21.2', 'numpy<=1.21.2',
'combo', 'combo',


+ 10
- 10
tods/searcher/brute_force_search.py View File

@@ -192,19 +192,19 @@ def _generate_pipline(combinations): # pragma: no cover
# The first three steps are fixed # The first three steps are fixed
# Step 0: dataset_to_dataframe # Step 0: dataset_to_dataframe
step_0 = PrimitiveStep(primitive=index.get_primitive('d3m.primitives.tods.data_processing.dataset_to_dataframe')) step_0 = PrimitiveStep(primitive=index.get_primitive('d3m.primitives.tods.data_processing.dataset_to_dataframe'))
step_0.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data_reference='inputs.0')
step_0.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data='inputs.0')
step_0.add_output('produce') step_0.add_output('produce')
pipeline_description.add_step(step_0) pipeline_description.add_step(step_0)


# Step 1: column_parser # Step 1: column_parser
step_1 = PrimitiveStep(primitive=index.get_primitive('d3m.primitives.tods.data_processing.column_parser')) step_1 = PrimitiveStep(primitive=index.get_primitive('d3m.primitives.tods.data_processing.column_parser'))
step_1.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data_reference='steps.0.produce')
step_1.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data='steps.0.produce')
step_1.add_output('produce') step_1.add_output('produce')
pipeline_description.add_step(step_1) pipeline_description.add_step(step_1)


# Step 2: extract_columns_by_semantic_types(attributes) # Step 2: extract_columns_by_semantic_types(attributes)
step_2 = PrimitiveStep(primitive=index.get_primitive('d3m.primitives.tods.data_processing.extract_columns_by_semantic_types')) step_2 = PrimitiveStep(primitive=index.get_primitive('d3m.primitives.tods.data_processing.extract_columns_by_semantic_types'))
step_2.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data_reference='steps.1.produce')
step_2.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data='steps.1.produce')
step_2.add_output('produce') step_2.add_output('produce')
step_2.add_hyperparameter(name='semantic_types', argument_type=ArgumentType.VALUE, step_2.add_hyperparameter(name='semantic_types', argument_type=ArgumentType.VALUE,
data=['https://metadata.datadrivendiscovery.org/types/Attribute']) data=['https://metadata.datadrivendiscovery.org/types/Attribute'])
@@ -212,7 +212,7 @@ def _generate_pipline(combinations): # pragma: no cover


# Step 3: extract_columns_by_semantic_types(targets) # Step 3: extract_columns_by_semantic_types(targets)
step_3 = PrimitiveStep(primitive=index.get_primitive('d3m.primitives.tods.data_processing.extract_columns_by_semantic_types')) step_3 = PrimitiveStep(primitive=index.get_primitive('d3m.primitives.tods.data_processing.extract_columns_by_semantic_types'))
step_3.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data_reference='steps.0.produce')
step_3.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data='steps.0.produce')
step_3.add_output('produce') step_3.add_output('produce')
step_3.add_hyperparameter(name='semantic_types', argument_type=ArgumentType.VALUE, step_3.add_hyperparameter(name='semantic_types', argument_type=ArgumentType.VALUE,
data=['https://metadata.datadrivendiscovery.org/types/TrueTarget']) data=['https://metadata.datadrivendiscovery.org/types/TrueTarget'])
@@ -222,30 +222,30 @@ def _generate_pipline(combinations): # pragma: no cover
targets = 'steps.3.produce' targets = 'steps.3.produce'


tods_step_4 = PrimitiveStep(primitive=index.get_primitive(combination[0])) tods_step_4 = PrimitiveStep(primitive=index.get_primitive(combination[0]))
tods_step_4.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data_reference=attributes)
tods_step_4.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data=attributes)
tods_step_4.add_output('produce') tods_step_4.add_output('produce')
pipeline_description.add_step(tods_step_4) pipeline_description.add_step(tods_step_4)


tods_step_5 = PrimitiveStep(primitive=index.get_primitive(combination[1])) tods_step_5 = PrimitiveStep(primitive=index.get_primitive(combination[1]))
tods_step_5.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data_reference='steps.4.produce')
tods_step_5.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data='steps.4.produce')
tods_step_5.add_output('produce') tods_step_5.add_output('produce')
pipeline_description.add_step(tods_step_5) pipeline_description.add_step(tods_step_5)


tods_step_6= PrimitiveStep(primitive=index.get_primitive(combination[2])) tods_step_6= PrimitiveStep(primitive=index.get_primitive(combination[2]))
tods_step_6.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data_reference='steps.5.produce')
tods_step_6.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data='steps.5.produce')
tods_step_6.add_output('produce') tods_step_6.add_output('produce')
tods_step_6.add_hyperparameter(name='contamination', argument_type=ArgumentType.VALUE, data=combination[3]) tods_step_6.add_hyperparameter(name='contamination', argument_type=ArgumentType.VALUE, data=combination[3])
pipeline_description.add_step(tods_step_6) pipeline_description.add_step(tods_step_6)


#tods_step_7 = PrimitiveStep(primitive=index.get_primitive(combination[3])) #tods_step_7 = PrimitiveStep(primitive=index.get_primitive(combination[3]))
#tods_step_7.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data_reference='steps.6.produce')
#tods_step_7.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data='steps.6.produce')
#tods_step_7.add_output('produce') #tods_step_7.add_output('produce')
#pipeline_description.add_step(tods_step_7) #pipeline_description.add_step(tods_step_7)


# Finalize the pipeline # Finalize the pipeline
final_step = PrimitiveStep(primitive=index.get_primitive('d3m.primitives.tods.data_processing.construct_predictions')) final_step = PrimitiveStep(primitive=index.get_primitive('d3m.primitives.tods.data_processing.construct_predictions'))
final_step.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data_reference='steps.6.produce')
final_step.add_argument(name='reference', argument_type=ArgumentType.CONTAINER, data_reference='steps.1.produce')
final_step.add_argument(name='inputs', argument_type=ArgumentType.CONTAINER, data='steps.6.produce')
final_step.add_argument(name='reference', argument_type=ArgumentType.CONTAINER, data='steps.1.produce')
final_step.add_output('produce') final_step.add_output('produce')
pipeline_description.add_step(final_step) pipeline_description.add_step(final_step)




Loading…
Cancel
Save