Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Commit

Permalink
Rename, strip out statsd
Browse files Browse the repository at this point in the history
  • Loading branch information
VikParuchuri committed May 13, 2013
1 parent 7d9d170 commit 5ac6c69
Show file tree
Hide file tree
Showing 23 changed files with 7 additions and 27 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,5 +8,6 @@ _build/
build/
dist/
machine_learning.egg-info/
ease.egg-info/
*.egg

2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -20,7 +20,7 @@
# 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('../machine-learning'))
sys.path.append(os.path.abspath('../ease'))
sys.path.append(os.path.abspath('../../'))

# -- General configuration -----------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/installation/installation_overview.rst
Expand Up @@ -4,7 +4,7 @@ Installation Overview

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
3. sudo apt-get upgrade gcc
4. sudo xargs -a apt-packages.txt apt-get install
Expand Down
2 changes: 1 addition & 1 deletion docs/overview/description.rst
Expand Up @@ -2,7 +2,7 @@
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.

Expand Down
File renamed without changes.
10 changes: 0 additions & 10 deletions machine_learning/create.py → ease/create.py
Expand Up @@ -5,7 +5,6 @@
import os
import sys
import logging
from statsd import statsd
import numpy

#Define base path and add to sys path
Expand All @@ -23,7 +22,6 @@
#Make a log
log = logging.getLogger(__name__)

@statsd.timed('open_ended_assessment.machine_learning.creator.time')
def create(text,score,prompt_string):
"""
Creates a machine learning model from input text, associated scores, a prompt, and a path to the model
Expand Down Expand Up @@ -75,10 +73,6 @@ def create(text,score,prompt_string):
results['errors'].append(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


Expand Down Expand Up @@ -125,8 +119,4 @@ def create_generic(numeric_values, textual_values, target, algorithm = util_func
results['errors'].append(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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 0 additions & 10 deletions machine_learning/grade.py → ease/grade.py
Expand Up @@ -7,7 +7,6 @@
import os
import numpy
import logging
from statsd import statsd

#Append sys to base path to import the following modules
base_path = os.path.dirname(__file__)
Expand All @@ -26,7 +25,6 @@

log = logging.getLogger(__name__)

@statsd.timed('open_ended_assessment.machine_learning.grader.time')
def grade(grader_data,submission):
"""
Grades a specified submission using specified models
Expand Down Expand Up @@ -105,10 +103,6 @@ def grade(grader_data,submission):
#If error, success is 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

def grade_generic(grader_data, numeric_features, textual_features):
Expand Down Expand Up @@ -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
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:
results['success'] = True

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added log/edx.log
Empty file.
1 change: 0 additions & 1 deletion requirements.txt
@@ -1,6 +1,5 @@
boto==2.6.0
coverage==3.5.3
dogstatsd-python==0.2
lxml==3.0.1
mock==0.8.0
nltk==2.0.3
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Expand Up @@ -4,9 +4,9 @@
required = f.read().splitlines()

setup(
name = "machine-learning",
name = "ease",
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 = {
'': ['*.txt', '*.rst', '*.p'],
},
Expand All @@ -15,6 +15,6 @@
description = "Machine learning based automated text classification for essay scoring.",
license = "AGPL",
keywords = "ml machine learning nlp essay education",
url = "https://github.com/edx/machine-learning",
url = "https://github.com/edx/ease",
include_package_data = True,
)

0 comments on commit 5ac6c69

Please sign in to comment.