Commit 8cc465cb by VikParuchuri

Merge pull request #20 from edx/vik/rename

Rename, strip out statsd
parents 7d9d1700 5ac6c69a
...@@ -8,5 +8,6 @@ _build/ ...@@ -8,5 +8,6 @@ _build/
build/ build/
dist/ dist/
machine_learning.egg-info/ machine_learning.egg-info/
ease.egg-info/
*.egg *.egg
...@@ -20,7 +20,7 @@ import sys, os ...@@ -20,7 +20,7 @@ import sys, os
# documentation root, use os.path.abspath to make it absolute, like shown here. # documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.append(os.path.abspath('.')) sys.path.append(os.path.abspath('.'))
sys.path.append(os.path.abspath('../')) sys.path.append(os.path.abspath('../'))
sys.path.append(os.path.abspath('../machine-learning')) sys.path.append(os.path.abspath('../ease'))
sys.path.append(os.path.abspath('../../')) sys.path.append(os.path.abspath('../../'))
# -- General configuration ----------------------------------------------------- # -- General configuration -----------------------------------------------------
......
...@@ -4,7 +4,7 @@ Installation Overview ...@@ -4,7 +4,7 @@ Installation Overview
Notes on how to install: Notes on how to install:
1. cd DIRECTORY_YOU_INSTALLED_TO. Make sure that you install to the folder machine-learning! 1. cd DIRECTORY_YOU_INSTALLED_TO. Make sure that you install to the folder ease!
2. sudo apt-get update 2. sudo apt-get update
3. sudo apt-get upgrade gcc 3. sudo apt-get upgrade gcc
4. sudo xargs -a apt-packages.txt apt-get install 4. sudo xargs -a apt-packages.txt apt-get install
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Description Description
=============================================== ===============================================
The ML repo allows anyone to use machine-learning based automated classification. This automated classification can work on both free text (essays, content, etc), and on numeric values. The ML repo allows anyone to use machine learning based automated classification. This automated classification can work on both free text (essays, content, etc), and on numeric values.
Let's say that you have 10000 user reviews for 15 books (ie "I loved this!", "I didn't like it.", and so on). What you really want to do is use the user reviews to get an aggregate score for each book that indicates how well-received it is. But, in your haste to collect the data, you forgot to get scores from the users. In this case, the text of the user reviews is your predictor, and the score that you want to collect from each user for each book is the target variable. Let's say that you have 10000 user reviews for 15 books (ie "I loved this!", "I didn't like it.", and so on). What you really want to do is use the user reviews to get an aggregate score for each book that indicates how well-received it is. But, in your haste to collect the data, you forgot to get scores from the users. In this case, the text of the user reviews is your predictor, and the score that you want to collect from each user for each book is the target variable.
......
...@@ -5,7 +5,6 @@ Functions that create a machine learning model from training data ...@@ -5,7 +5,6 @@ Functions that create a machine learning model from training data
import os import os
import sys import sys
import logging import logging
from statsd import statsd
import numpy import numpy
#Define base path and add to sys path #Define base path and add to sys path
...@@ -23,7 +22,6 @@ import predictor_extractor ...@@ -23,7 +22,6 @@ import predictor_extractor
#Make a log #Make a log
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@statsd.timed('open_ended_assessment.machine_learning.creator.time')
def create(text,score,prompt_string): def create(text,score,prompt_string):
""" """
Creates a machine learning model from input text, associated scores, a prompt, and a path to the model Creates a machine learning model from input text, associated scores, a prompt, and a path to the model
...@@ -75,10 +73,6 @@ def create(text,score,prompt_string): ...@@ -75,10 +73,6 @@ def create(text,score,prompt_string):
results['errors'].append(msg) results['errors'].append(msg)
log.exception(msg) log.exception(msg)
#Count number of successful/unsuccessful creations
statsd.increment("open_ended_assessment.machine_learning.creator_count",
tags=["success:{0}".format(results['success'])])
return results return results
...@@ -125,8 +119,4 @@ def create_generic(numeric_values, textual_values, target, algorithm = util_func ...@@ -125,8 +119,4 @@ def create_generic(numeric_values, textual_values, target, algorithm = util_func
results['errors'].append(msg) results['errors'].append(msg)
log.exception(msg) log.exception(msg)
#Count number of successful/unsuccessful creations
statsd.increment("open_ended_assessment.machine_learning.creator_count",
tags=["success:{0}".format(results['success'])])
return results return results
\ No newline at end of file
...@@ -7,7 +7,6 @@ import pickle ...@@ -7,7 +7,6 @@ import pickle
import os import os
import numpy import numpy
import logging import logging
from statsd import statsd
#Append sys to base path to import the following modules #Append sys to base path to import the following modules
base_path = os.path.dirname(__file__) base_path = os.path.dirname(__file__)
...@@ -26,7 +25,6 @@ import math ...@@ -26,7 +25,6 @@ import math
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@statsd.timed('open_ended_assessment.machine_learning.grader.time')
def grade(grader_data,submission): def grade(grader_data,submission):
""" """
Grades a specified submission using specified models Grades a specified submission using specified models
...@@ -105,10 +103,6 @@ def grade(grader_data,submission): ...@@ -105,10 +103,6 @@ def grade(grader_data,submission):
#If error, success is False. #If error, success is False.
results['success']=False results['success']=False
#Count number of successful/unsuccessful gradings
statsd.increment("open_ended_assessment.machine_learning.grader_count",
tags=["success:{0}".format(results['success'])])
return results return results
def grade_generic(grader_data, numeric_features, textual_features): def grade_generic(grader_data, numeric_features, textual_features):
...@@ -152,10 +146,6 @@ def grade_generic(grader_data, numeric_features, textual_features): ...@@ -152,10 +146,6 @@ def grade_generic(grader_data, numeric_features, textual_features):
#If there is an error getting confidence, it is not a show-stopper, so just log #If there is an error getting confidence, it is not a show-stopper, so just log
log.exception("Problem generating confidence value") log.exception("Problem generating confidence value")
#Count number of successful/unsuccessful gradings
statsd.increment("open_ended_assessment.machine_learning.grader_count",
tags=["success:{0}".format(results['success'])])
if not has_error: if not has_error:
results['success'] = True results['success'] = True
......
boto==2.6.0 boto==2.6.0
coverage==3.5.3 coverage==3.5.3
dogstatsd-python==0.2
lxml==3.0.1 lxml==3.0.1
mock==0.8.0 mock==0.8.0
nltk==2.0.3 nltk==2.0.3
......
...@@ -4,9 +4,9 @@ with open('requirements.txt') as f: ...@@ -4,9 +4,9 @@ with open('requirements.txt') as f:
required = f.read().splitlines() required = f.read().splitlines()
setup( setup(
name = "machine-learning", name = "ease",
version = "0.1", version = "0.1",
packages=['machine_learning', 'machine_learning.external_code', 'machine_learning.data', 'machine_learning.external_code.fisher'], packages=['ease', 'ease.external_code', 'ease.data', 'ease.external_code.fisher'],
package_data = { package_data = {
'': ['*.txt', '*.rst', '*.p'], '': ['*.txt', '*.rst', '*.p'],
}, },
...@@ -15,6 +15,6 @@ setup( ...@@ -15,6 +15,6 @@ setup(
description = "Machine learning based automated text classification for essay scoring.", description = "Machine learning based automated text classification for essay scoring.",
license = "AGPL", license = "AGPL",
keywords = "ml machine learning nlp essay education", keywords = "ml machine learning nlp essay education",
url = "https://github.com/edx/machine-learning", url = "https://github.com/edx/ease",
include_package_data = True, include_package_data = True,
) )
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment