Coder Social home page Coder Social logo

ubc_primitives's Introduction

UBC PLAI-Group TA-1 primitives

version docker

Project repository for TA-1 primitives contributed by the UBC PLAI Group to the DARPA Data Driven Discovery Models (D3M) Program.

Install

  1. Get docker image which contains all dependencies and requirements:
docker pull registry.gitlab.com/datadrivendiscovery/images/primitives:ubuntu-bionic-python36-v2020.5.18

Updated docker images

  1. Run Docker image (change the local path of the cloned repo):
sudo docker run --rm\
    -v ./local/path/ubc_primitives:/ubc_primitives\
    -i -t registry.gitlab.com/datadrivendiscovery/images/primitives:ubuntu-bionic-python36-v2020.5.18 /bin/bash
  1. Inside docker install python package:
cd /ubc_primitives
pip3 install -e .

TA-1 primitives

View all primitive descriptions


Acknowledgement

This material is based upon work supported by the United States Air Force Research Laboratory (AFRL) under the Defense Advanced Research Projects Agency (DARPA) Data Driven Discovery Models (D3M) program (Contract No. FA8750-19-2-0222). The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of DARPA or the U.S. Government.

alt-text-2 alt-text-1 alt-text-2

ubc_primitives's People

Contributors

rover-debug avatar sanasseri avatar tonyjo avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

rover-debug

ubc_primitives's Issues

Invalid logging

I see logging calls like:

logging.info("\t", name)

But this is not JavaScript. You need to have a placeholder in the first string for name to be interpolated on. I am getting errors like:

TypeError: not all arguments converted during string formatting
Call stack:
  File "test-primitives.py", line 69, in <module>
    instance = primitive(hyperparams=primitive.metadata.get_hyperparams().defaults())
  File "/src/ubc-primitives/primitives_ubc/clfyMLP/mlpClfy.py", line 217, in __init__
    logging.info("\t", name)
Message: '\t'
Arguments: ('network.0.weight',)

bag_of_words primitive fails when receives only one column as inputs

I'm getting this error:

Traceback (most recent call last):
  File "/src/d3m/d3m/runtime.py", line 1008, in _do_run_step
    self._run_step(step)
  File "/src/d3m/d3m/runtime.py", line 998, in _run_step
    self._run_primitive(step)
  File "/src/d3m/d3m/runtime.py", line 873, in _run_primitive
    multi_call_result = self._call_primitive_method(primitive.fit_multi_produce, fit_multi_produce_arguments)
  File "/src/d3m/d3m/runtime.py", line 974, in _call_primitive_method
    raise error
  File "/src/d3m/d3m/runtime.py", line 970, in _call_primitive_method
    result = method(**arguments)
  File "/src/d3m/d3m/primitive_interfaces/transformer.py", line 71, in fit_multi_produce
    return self._fit_multi_produce(produce_methods=produce_methods, timeout=timeout, iterations=iterations, inputs=inputs)
  File "/src/d3m/d3m/primitive_interfaces/base.py", line 568, in _fit_multi_produce
    produce_results = self._multi_produce(produce_methods=produce_methods, timeout=timeout, iterations=iterations, **kwargs)
  File "/src/d3m/d3m/primitive_interfaces/base.py", line 465, in _multi_produce
    results.append(getattr(self, method_name)(timeout=timeout, iterations=iterations, **arguments))
  File "/src/ubc-primitives/primitives_ubc/bow/bag_of_words.py", line 180, in produce
    outputs = inputs.remove_columns(attribute_columns)
  File "/src/d3m/d3m/container/pandas.py", line 262, in remove_columns
    raise ValueError("Removing columns would have removed the last column.")
ValueError: Removing columns would have removed the last column.

The problem happens in inputs.remove_columns(attribute_columns) when inputs contain only one column. The method remove_columns raises an exception if no columns would be left after removing columns. See documentation here: https://gitlab.com/datadrivendiscovery/d3m/-/blob/devel/d3m/container/pandas.py#L237

d3m.primitives.clustering.kmeans_clustering.UBC primitive fails when receives only one column as inputs

Traceback (most recent call last):
  File "/src/d3m/d3m/runtime.py", line 1114, in _do_run_step
    self._run_step(step)
  File "/src/d3m/d3m/runtime.py", line 1104, in _run_step
    self._run_primitive(step)
  File "/src/d3m/d3m/runtime.py", line 979, in _run_primitive
    multi_call_result = self._call_primitive_method(primitive.fit_multi_produce, fit_multi_produce_arguments)
  File "/src/d3m/d3m/runtime.py", line 1080, in _call_primitive_method
    raise error
  File "/src/d3m/d3m/runtime.py", line 1076, in _call_primitive_method
    result = method(**arguments)
  File "/src/d3m/d3m/primitive_interfaces/unsupervised_learning.py", line 48, in fit_multi_produce
    return self._fit_multi_produce(produce_methods=produce_methods, timeout=timeout, iterations=iterations, inputs=inputs)
  File "/src/d3m/d3m/primitive_interfaces/base.py", line 570, in _fit_multi_produce
    produce_results = self._multi_produce(produce_methods=produce_methods, timeout=timeout, iterations=iterations, **kwargs)
  File "/src/d3m/d3m/primitive_interfaces/base.py", line 466, in _multi_produce
    results.append(getattr(self, method_name)(timeout=timeout, iterations=iterations, **arguments))
  File "/src/ubc-primitives/primitives_ubc/kmeans/kmeansClustering.py", line 263, in produce
    outputs = inputs.remove_columns(feature_columns)
  File "/src/d3m/d3m/container/pandas.py", line 256, in remove_columns
    raise ValueError("Removing columns would have removed the last column.")
ValueError: Removing columns would have removed the last column.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.