Python bindings for BigML.io

Overview

BigML Python Bindings

BigML makes machine learning easy by taking care of the details required to add data-driven decisions and predictive power to your company. Unlike other machine learning services, BigML creates beautiful predictive models that can be easily understood and interacted with.

These BigML Python bindings allow you to interact with BigML.io, the API for BigML. You can use it to easily create, retrieve, list, update, and delete BigML resources (i.e., sources, datasets, models and, predictions). For additional information, see the full documentation for the Python bindings on Read the Docs.

This module is licensed under the Apache License, Version 2.0.

Support

Please report problems and bugs to our BigML.io issue tracker.

Discussions about the different bindings take place in the general BigML mailing list. Or join us in our Campfire chatroom.

Requirements

Only Python 3 versions are currently supported by these bindings. Support for Python 2.7.X ended in version 4.32.3.

The basic third-party dependencies are the requests, unidecode and requests-toolbelt bigml-chronos, numpy and scipy libraries. These libraries are automatically installed during the setup. Support for Google App Engine has been added as of version 3.0.0, using the urlfetch package instead of requests.

The bindings will also use simplejson if you happen to have it installed, but that is optional: we fall back to Python's built-in JSON libraries is simplejson is not found.

Also in order to use local Topic Model predictions, you will need to install pystemmer. Using the pip install command for this library can produce an error if your system lacks the correct developer tools to compile it. In Windows, the error message will include a link pointing to the needed Visual Studio version and in OSX you'll need to install the Xcode developer tools.

Installation

To install the latest stable release with pip

$ pip install bigml

You can also install the development version of the bindings directly from the Git repository

$ pip install -e git://github.com/bigmlcom/python.git#egg=bigml_python

Running the Tests

The test will be run using nose , that is installed on setup, and you'll need to set up your authentication via environment variables, as explained in the authentication section. Also some of the tests need other environment variables like BIGML_ORGANIZATION to test calls when used by Organization members and BIGML_EXTERNAL_CONN_HOST, BIGML_EXTERNAL_CONN_PORT, BIGML_EXTERNAL_CONN_DB, BIGML_EXTERNAL_CONN_USER, BIGML_EXTERNAL_CONN_PWD and BIGML_EXTERNAL_CONN_SOURCE in order to test external data connectors.

With that in place, you can run the test suite simply by issuing

$ python setup.py nosetests

Additionally, Tox can be used to automatically run the test suite in virtual environments for all supported Python versions. To install Tox:

$ pip install tox

Then run the tests from the top-level project directory:

$ tox

Importing the module

To import the module:

import bigml.api

Alternatively you can just import the BigML class:

from bigml.api import BigML

Authentication

All the requests to BigML.io must be authenticated using your username and API key and are always transmitted over HTTPS.

This module will look for your username and API key in the environment variables BIGML_USERNAME and BIGML_API_KEY respectively.

Unix and MacOS

You can add the following lines to your .bashrc or .bash_profile to set those variables automatically when you log in:

export BIGML_USERNAME=myusername
export BIGML_API_KEY=ae579e7e53fb9abd646a6ff8aa99d4afe83ac291

refer to the next chapters to know how to do that in other operating systems.

With that environment set up, connecting to BigML is a breeze:

from bigml.api import BigML
api = BigML()

Otherwise, you can initialize directly when instantiating the BigML class as follows:

api = BigML('myusername', 'ae579e7e53fb9abd646a6ff8aa99d4afe83ac291')

These credentials will allow you to manage any resource in your user environment.

In BigML a user can also work for an organization. In this case, the organization administrator should previously assign permissions for the user to access one or several particular projects in the organization. Once permissions are granted, the user can work with resources in a project according to his permission level by creating a special constructor for each project. The connection constructor in this case should include the project ID:

api = BigML('myusername', 'ae579e7e53fb9abd646a6ff8aa99d4afe83ac291',
            project='project/53739b98d994972da7001d4a')

If the project used in a connection object does not belong to an existing organization but is one of the projects under the user's account, all the resources created or updated with that connection will also be assigned to the specified project.

When the resource to be managed is a project itself, the connection needs to include the corresponding``organization ID``:

api = BigML('myusername', 'ae579e7e53fb9abd646a6ff8aa99d4afe83ac291',
            organization='organization/53739b98d994972da7025d4a')

Authentication on Windows

The credentials should be permanently stored in your system using

setx BIGML_USERNAME myusername
setx BIGML_API_KEY ae579e7e53fb9abd646a6ff8aa99d4afe83ac291

Note that setx will not change the environment variables of your actual console, so you will need to open a new one to start using them.

Authentication on Jupyter Notebook

You can set the environment variables using the %env command in your cells:

%env BIGML_USERNAME=myusername
%env BIGML_API_KEY=ae579e7e53fb9abd646a6ff8aa99d4afe83ac291

Alternative domains

The main public domain for the API service is bigml.io, but there are some alternative domains, either for Virtual Private Cloud setups or the australian subdomain (au.bigml.io). You can change the remote server domain to the VPC particular one by either setting the BIGML_DOMAIN environment variable to your VPC subdomain:

export BIGML_DOMAIN=my_VPC.bigml.io

or setting it when instantiating your connection:

api = BigML(domain="my_VPC.bigml.io")

The corresponding SSL REST calls will be directed to your private domain henceforth.

You can also set up your connection to use a particular PredictServer only for predictions. In order to do so, you'll need to specify a Domain object, where you can set up the general domain name as well as the particular prediction domain name.

from bigml.domain import Domain
from bigml.api import BigML

domain_info = Domain(prediction_domain="my_prediction_server.bigml.com",
                     prediction_protocol="http")

api = BigML(domain=domain_info)

Finally, you can combine all the options and change both the general domain server, and the prediction domain server.

from bigml.domain import Domain
from bigml.api import BigML
domain_info = Domain(domain="my_VPC.bigml.io",
                     prediction_domain="my_prediction_server.bigml.com",
                     prediction_protocol="https")

api = BigML(domain=domain_info)

Some arguments for the Domain constructor are more unsual, but they can also be used to set your special service endpoints:

  • protocol (string) Protocol for the service (when different from HTTPS)
  • verify (boolean) Sets on/off the SSL verification
  • prediction_verify (boolean) Sets on/off the SSL verification for the prediction server (when different from the general SSL verification)

Note that the previously existing dev_mode flag:

api = BigML(dev_mode=True)

that caused the connection to work with the Sandbox Development Environment has been deprecated because this environment does not longer exist. The existing resources that were previously created in this environment have been moved to a special project in the now unique Production Environment, so this flag is no longer needed to work with them.

Quick Start

Imagine that you want to use this csv file containing the Iris flower dataset to predict the species of a flower whose petal length is 2.45 and whose petal width is 1.75. A preview of the dataset is shown below. It has 4 numeric fields: sepal length, sepal width, petal length, petal width and a categorical field: species. By default, BigML considers the last field in the dataset as the objective field (i.e., the field that you want to generate predictions for).

sepal length,sepal width,petal length,petal width,species
5.1,3.5,1.4,0.2,Iris-setosa
4.9,3.0,1.4,0.2,Iris-setosa
4.7,3.2,1.3,0.2,Iris-setosa
...
5.8,2.7,3.9,1.2,Iris-versicolor
6.0,2.7,5.1,1.6,Iris-versicolor
5.4,3.0,4.5,1.5,Iris-versicolor
...
6.8,3.0,5.5,2.1,Iris-virginica
5.7,2.5,5.0,2.0,Iris-virginica
5.8,2.8,5.1,2.4,Iris-virginica

You can easily generate a prediction following these steps:

from bigml.api import BigML

api = BigML()

source = api.create_source('./data/iris.csv')
dataset = api.create_dataset(source)
model = api.create_model(dataset)
prediction = api.create_prediction(model, \
    {"petal width": 1.75, "petal length": 2.45})

You can then print the prediction using the pprint method:

>>> api.pprint(prediction)
species for {"petal width": 1.75, "petal length": 2.45} is Iris-setosa

Certainly, any of the resources created in BigML can be configured using several arguments described in the API documentation. Any of these configuration arguments can be added to the create method as a dictionary in the last optional argument of the calls:

from bigml.api import BigML

api = BigML()

source_args = {"name": "my source",
     "source_parser": {"missing_tokens": ["NULL"]}}
source = api.create_source('./data/iris.csv', source_args)
dataset_args = {"name": "my dataset"}
dataset = api.create_dataset(source, dataset_args)
model_args = {"objective_field": "species"}
model = api.create_model(dataset, model_args)
prediction_args = {"name": "my prediction"}
prediction = api.create_prediction(model, \
    {"petal width": 1.75, "petal length": 2.45},
    prediction_args)

The iris dataset has a small number of instances, and usually will be instantly created, so the api.create_ calls will probably return the finished resources outright. As BigML's API is asynchronous, in general you will need to ensure that objects are finished before using them by using api.ok.

from bigml.api import BigML

api = BigML()

source = api.create_source('./data/iris.csv')
api.ok(source)
dataset = api.create_dataset(source)
api.ok(dataset)
model = api.create_model(dataset)
api.ok(model)
prediction = api.create_prediction(model, \
    {"petal width": 1.75, "petal length": 2.45})

Note that the prediction call is not followed by the api.ok method. Predictions are so quick to be generated that, unlike the rest of resouces, will be generated synchronously as a finished object.

The example assumes that your objective field (the one you want to predict) is the last field in the dataset. If that's not he case, you can explicitly set the name of this field in the creation call using the objective_field argument:

from bigml.api import BigML

api = BigML()

source = api.create_source('./data/iris.csv')
api.ok(source)
dataset = api.create_dataset(source)
api.ok(dataset)
model = api.create_model(dataset, {"objective_field": "species"})
api.ok(model)
prediction = api.create_prediction(model, \
    {'sepal length': 5, 'sepal width': 2.5})

You can also generate an evaluation for the model by using:

test_source = api.create_source('./data/test_iris.csv')
api.ok(test_source)
test_dataset = api.create_dataset(test_source)
api.ok(test_dataset)
evaluation = api.create_evaluation(model, test_dataset)
api.ok(evaluation)

If you set the storage argument in the api instantiation:

api = BigML(storage='./storage')

all the generated, updated or retrieved resources will be automatically saved to the chosen directory.

Alternatively, you can use the export method to explicitly download the JSON information that describes any of your resources in BigML to a particular file:

api.export('model/5acea49a08b07e14b9001068',
           filename="my_dir/my_model.json")

This example downloads the JSON for the model and stores it in the my_dir/my_model.json file.

In the case of models that can be represented in a PMML syntax, the export method can be used to produce the corresponding PMML file.

api.export('model/5acea49a08b07e14b9001068',
           filename="my_dir/my_model.pmml",
           pmml=True)

You can also retrieve the last resource with some previously given tag:

api.export_last("foo",
                resource_type="ensemble",
                filename="my_dir/my_ensemble.json")

which selects the last ensemble that has a foo tag. This mechanism can be specially useful when retrieving retrained models that have been created with a shared unique keyword as tag.

For a descriptive overview of the steps that you will usually need to follow to model your data and obtain predictions, please see the basic Workflow sketch document. You can also check other simple examples in the following documents:

Additional Information

We've just barely scratched the surface. For additional information, see the full documentation for the Python bindings on Read the Docs. Alternatively, the same documentation can be built from a local checkout of the source by installing Sphinx ($ pip install sphinx) and then running

$ cd docs
$ make html

Then launch docs/_build/html/index.html in your browser.

How to Contribute

Please follow the next steps:

  1. Fork the project on github.com.
  2. Create a new branch.
  3. Commit changes to the new branch.
  4. Send a pull request.

For details on the underlying API, see the BigML API documentation.

Comments
  • Use prediction_domain for all prediction methods

    Use prediction_domain for all prediction methods

    Currently, when the api is instantiated with a value for prediction_domain, that value is only used for calls to create_prediction, and not other prediction-like methods such as create_batch_prediction, create_centroid, create_anomaly_score, etc.

    This PR changes the handlers for those methods to use the value for prediction_domain.

    opened by cheesinglee 5
  • Inconsistency With Remote Predictions in Anomaly Detectors

    Inconsistency With Remote Predictions in Anomaly Detectors

    In datasets where there are a significant number of categorical missing values, local predictions for anomaly detectors are dramatically different from remote predictions:

    In [3]: from bigml.anomaly import Anomaly                                       
    
    In [4]: from bigml.api import BigML                                             
    
    In [5]: data = csvload('shapsplain/lc.csv')                                     
    
    In [6]: jt = jload('shapsplain/testtree.json')                                  
    
    In [7]: rid = jt['resource']                                                    
    
    In [8]: api = BigML()                                                           
    
    In [9]: api.create_anomaly_score(rid, data[1])['object']['score']               
    Out[9]: 0.47451
    
    In [10]: local = Anomaly({'object': jt, 'resource': jt['resource']})            
    
    In [11]: local.anomaly_score(data[1])                                           
    Out[11]: 0.6618801118575603
    

    Specifically, the issue appears to be here:

    https://github.com/bigmlcom/python/blob/master/bigml/predicate.py#L242

    The above tree has predicates on categorical variables with the in operator. If there's a null in the input data and a null in the set of true values, this predicate still evaluates to false, as we drop into the condition above, which relies on the .missing attribute of the predicate, which does not get set in this case.

    The solution appears to be to set it, up here:

    https://github.com/bigmlcom/python/blob/master/bigml/predicate.py#L136

    Something like an additional clause:

    ...
            elif operation == 'in' and None in value:
                self.missing = True
    

    When I do that, consistency is restored:

    
    In [2]: data = csvload('shapsplain/lc.csv')                                     
    
    In [3]: jt = jload('shapsplain/testtree.json')                                  
    
    In [4]: local = Anomaly({'object': jt, 'resource': jt['resource']})             
    
    In [5]: local.anomaly_score(data[1])                                            
    Out[5]: 0.4745112731029698
    

    I can submit a PR, but I was a bit scared as that's fairly deep in the logic here. Let me know if that looks like a good solution.

    /cc @jaor @unmonoqueteclea

    opened by charleslparker 4
  • Input datetimes in local predictions

    Input datetimes in local predictions

    With this PR, the local models will accept raw datetime inputs. Currently, it only works with models. After this is reviewed, I will add the option to the rest of supervised-models

    opened by unmonoqueteclea 4
  • Not working with python 3.6

    Not working with python 3.6

    The binding is constantly giving me the following error when loading a remote topic_model or even a remote dataset:

    \bigml\bigmlconnection.py in json_load(content)
    118 
    119     """
    --> 120     return json.loads(content.decode('utf-8'), 'utf-8')
    121 
    122 
    
    TypeError: loads() takes 1 positional argument but 2 were given
    

    I'm running Anaconda Python 3.6 under Windows 10. I created then a virtualenv with Python 3.5 and calling the topic_model worked fine. So it seems to be an issue with Python 3.6.

    opened by lucianosb 3
  • Locally Predictive LDA

    Locally Predictive LDA

    Here it is, @mmerce . I tried to follow conventions as best I could, but I'm sure I've missed some things, especially documentation-wise. I've also never seen the tests structured as they are here, and I again tried to match but may have failed.

    In any case, you should get the general idea from the tests. Let me know what needs fixing. Thanks!

    /cc @jaor in case he wants to comment.

    opened by charleslparker 3
  • Inconsistency in nearest centroid calculation (python vs. sky)

    Inconsistency in nearest centroid calculation (python vs. sky)

    Take a plain-vanilla iris.csv-based cluster and use the inputs displayed in the attached image. Python will spit out the following, where there is a ~10% distance gap (4.38 vs. 4.09). While this is not much, it still hints at different implementations, i.e., to the possibility of larger deviations.

    pastedgraphic-7

    {   'centroid_id': u'000001',
        'centroid_name': u'Cluster 1',
        'distance': 0.43821355717700766}
    

    This was the command used:

    prediction = cluster.centroid({'petal length': 4.07, 'sepal width': 3.15, 'petal width': 1.51, 'sepal length' : 4.0, 'species' : 'iris-setosa'}, by_name=True)
    
    opened by sdesimone 3
  • Change default username/api_key args to None

    Change default username/api_key args to None

    In Python, the values of default arguments are created once when the function/method is defined; they are not re-evaluated each time the function/method is called.

    By using username=os.environ['BIGML_USERNAME'] as the default argument to BigML's constructor, the value of the BIGML_USERNAME environment variable at the time the module is imported will remain the default value until the interpreter exits, even if the value of the environment variable changes.

    Before this change:

    >>> from bigml.api import *
    >>> BigML(api_key='***').auth
    '?username=njwilson;api_key=***;'
    >>> os.environ['BIGML_USERNAME'] = 'joebob'
    >>> BigML(api_key='***').auth
    '?username=njwilson;api_key=***;'      <--- Should be 'joebob'
    

    After this change:

    >>> from bigml.api import *
    >>> BigML(api_key='***').auth
    '?username=njwilson;api_key=***;'
    >>> os.environ['BIGML_USERNAME'] = 'joebob'
    >>> BigML(api_key='***').auth
    '?username=joebob;api_key=***;'
    

    In practice, it probably doesn't matter in this case as the environment variables shouldn't be changing. However, I ran into a problem when I was automatically generating some API documentation and the output was showing:

    class bigml.api.BigML(username='njwilson', ...)
    

    (The documentation contained my username and API key)

    opened by njwilson 3
  • Add tox support

    Add tox support

    Add support for Tox (http://tox.testrun.org/) to run tests in multiple virtualenvs. To use it, "pip install tox" and then run "tox" from the root directory.

    Note that tox checks the exit status from the test command (lettuce) to determine pass/fail, but the latest version of lettuce (0.2.5) erroneously exits with a non-zero exit status indicating an error. So, tox will report failures even though the test suite is passing.

    opened by njwilson 3
  • Bump tensorflow from 2.4 to 2.5.3

    Bump tensorflow from 2.4 to 2.5.3

    Bumps tensorflow from 2.4 to 2.5.3.

    Release notes

    Sourced from tensorflow's releases.

    TensorFlow 2.5.3

    Release 2.5.3

    Note: This is the last release in the 2.5 series.

    This releases introduces several vulnerability fixes:

    • Fixes a floating point division by 0 when executing convolution operators (CVE-2022-21725)
    • Fixes a heap OOB read in shape inference for ReverseSequence (CVE-2022-21728)
    • Fixes a heap OOB access in Dequantize (CVE-2022-21726)
    • Fixes an integer overflow in shape inference for Dequantize (CVE-2022-21727)
    • Fixes a heap OOB access in FractionalAvgPoolGrad (CVE-2022-21730)
    • Fixes an overflow and divide by zero in UnravelIndex (CVE-2022-21729)
    • Fixes a type confusion in shape inference for ConcatV2 (CVE-2022-21731)
    • Fixes an OOM in ThreadPoolHandle (CVE-2022-21732)
    • Fixes an OOM due to integer overflow in StringNGrams (CVE-2022-21733)
    • Fixes more issues caused by incomplete validation in boosted trees code (CVE-2021-41208)
    • Fixes an integer overflows in most sparse component-wise ops (CVE-2022-23567)
    • Fixes an integer overflows in AddManySparseToTensorsMap (CVE-2022-23568)
    • Fixes a number of CHECK-failures in MapStage (CVE-2022-21734)
    • Fixes a division by zero in FractionalMaxPool (CVE-2022-21735)
    • Fixes a number of CHECK-fails when building invalid/overflowing tensor shapes (CVE-2022-23569)
    • Fixes an undefined behavior in SparseTensorSliceDataset (CVE-2022-21736)
    • Fixes an assertion failure based denial of service via faulty bin count operations (CVE-2022-21737)
    • Fixes a reference binding to null pointer in QuantizedMaxPool (CVE-2022-21739)
    • Fixes an integer overflow leading to crash in SparseCountSparseOutput (CVE-2022-21738)
    • Fixes a heap overflow in SparseCountSparseOutput (CVE-2022-21740)
    • Fixes an FPE in BiasAndClamp in TFLite (CVE-2022-23557)
    • Fixes an FPE in depthwise convolutions in TFLite (CVE-2022-21741)
    • Fixes an integer overflow in TFLite array creation (CVE-2022-23558)
    • Fixes an integer overflow in TFLite (CVE-2022-23559)
    • Fixes a dangerous OOB write in TFLite (CVE-2022-23561)
    • Fixes a vulnerability leading to read and write outside of bounds in TFLite (CVE-2022-23560)
    • Fixes a set of vulnerabilities caused by using insecure temporary files (CVE-2022-23563)
    • Fixes an integer overflow in Range resulting in undefined behavior and OOM (CVE-2022-23562)
    • Fixes a vulnerability where missing validation causes tf.sparse.split to crash when axis is a tuple (CVE-2021-41206)
    • Fixes a CHECK-fail when decoding resource handles from proto (CVE-2022-23564)
    • Fixes a CHECK-fail with repeated AttrDef (CVE-2022-23565)
    • Fixes a heap OOB write in Grappler (CVE-2022-23566)
    • Fixes a CHECK-fail when decoding invalid tensors from proto (CVE-2022-23571)
    • Fixes an unitialized variable access in AssignOp (CVE-2022-23573)
    • Fixes an integer overflow in OpLevelCostEstimator::CalculateTensorSize (CVE-2022-23575)
    • Fixes an integer overflow in OpLevelCostEstimator::CalculateOutputSize (CVE-2022-23576)
    • Fixes a null dereference in GetInitOp (CVE-2022-23577)
    • Fixes a memory leak when a graph node is invalid (CVE-2022-23578)
    • Fixes an abort caused by allocating a vector that is too large (CVE-2022-23580)
    • Fixes multiple CHECK-failures during Grappler's IsSimplifiableReshape (CVE-2022-23581)
    • Fixes multiple CHECK-failures during Grappler's SafeToRemoveIdentity (CVE-2022-23579)
    • Fixes multiple CHECK-failures in TensorByteSize (CVE-2022-23582)
    • Fixes multiple CHECK-failures in binary ops due to type confusion (CVE-2022-23583)

    ... (truncated)

    Changelog

    Sourced from tensorflow's changelog.

    Release 2.5.3

    This releases introduces several vulnerability fixes:

    • Fixes a floating point division by 0 when executing convolution operators (CVE-2022-21725)
    • Fixes a heap OOB read in shape inference for ReverseSequence (CVE-2022-21728)
    • Fixes a heap OOB access in Dequantize (CVE-2022-21726)
    • Fixes an integer overflow in shape inference for Dequantize (CVE-2022-21727)
    • Fixes a heap OOB access in FractionalAvgPoolGrad (CVE-2022-21730)
    • Fixes an overflow and divide by zero in UnravelIndex (CVE-2022-21729)
    • Fixes a type confusion in shape inference for ConcatV2 (CVE-2022-21731)
    • Fixes an OOM in ThreadPoolHandle (CVE-2022-21732)
    • Fixes an OOM due to integer overflow in StringNGrams (CVE-2022-21733)
    • Fixes more issues caused by incomplete validation in boosted trees code (CVE-2021-41208)
    • Fixes an integer overflows in most sparse component-wise ops (CVE-2022-23567)
    • Fixes an integer overflows in AddManySparseToTensorsMap (CVE-2022-23568)
    • Fixes a number of CHECK-failures in MapStage (CVE-2022-21734)
    • Fixes a division by zero in FractionalMaxPool (CVE-2022-21735)
    • Fixes a number of CHECK-fails when building invalid/overflowing tensor shapes (CVE-2022-23569)
    • Fixes an undefined behavior in SparseTensorSliceDataset (CVE-2022-21736)
    • Fixes an assertion failure based denial of service via faulty bin count operations (CVE-2022-21737)
    • Fixes a reference binding to null pointer in QuantizedMaxPool (CVE-2022-21739)
    • Fixes an integer overflow leading to crash in SparseCountSparseOutput (CVE-2022-21738)
    • Fixes a heap overflow in SparseCountSparseOutput (CVE-2022-21740)
    • Fixes an FPE in BiasAndClamp in TFLite (CVE-2022-23557)
    • Fixes an FPE in depthwise convolutions in TFLite (CVE-2022-21741)

    ... (truncated)

    Commits
    • 959e9b2 Merge pull request #54213 from tensorflow/fix-sanity-on-r2.5
    • d05fcbc Fix sanity build
    • f2526a0 Merge pull request #54205 from tensorflow/disable-flaky-tests-on-r2.5
    • a5f94df Disable flaky test
    • 7babe52 Merge pull request #54201 from tensorflow/cherrypick-510ae18200d0a4fad797c0bf...
    • 0e5d378 Set Env Variable to override Setuptools new behavior
    • fdd4195 Merge pull request #54176 from tensorflow-jenkins/relnotes-2.5.3-6805
    • 4083165 Update RELEASE.md
    • a2bb7f1 Merge pull request #54185 from tensorflow/cherrypick-d437dec4d549fc30f9b85c75...
    • 5777ea3 Update third_party/icu/workspace.bzl
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 2
  • api.ok resource parameter cannot actually be a string

    api.ok resource parameter cannot actually be a string

    According to the docstring, the resource parameter to the api.ok method can be a string, presumably something like api.ok('dataset/531634203851d61f730accad').

    https://github.com/bigmlcom/python/blob/57644d89639d8eaa25399a8d0bf681f907a5012d/bigml/resourcehandler.py#L545

    This results in an error TypeError: string indices must be integers, so the documentation on this function probably just needs to change. You can get the same functionality with

    dataset = api.get_dataset('dataset/531634203851d61f730accad')
    api.ok(dataset)
    
    opened by skelliest 2
  • Data Mutation by Local Predictors

    Data Mutation by Local Predictors

    This is more of a question, perhaps, than an issue, but when I passed some data through a local predictor, I was surprised to see that it was different on the other side:

    In [22]: local = Anomaly({'object': jt, 'resource': jt['resource']})            
    
    In [23]: instance = {'emp_length': None, 'fake_1': None, 'fake_2': 0}           
    
    In [24]: local.anomaly_score(instance)                                          
    Out[24]: 0.9481449853957093
    
    In [25]: instance                                                               
    Out[25]: {'fake_2': 0}
    

    There might be a good reason for this, but it was a bit jarring for me, as I was hoping to do something with those None values after prediction. So just adding a discussion here for others that may come along with the same issue, or to request a fix if this is unintentional.

    opened by charleslparker 2
Owner
BigML Inc, Machine Learning made easy
BigML Inc, Machine Learning made easy
Python bindings for ArrayFire: A general purpose GPU library.

ArrayFire Python Bindings ArrayFire is a high performance library for parallel computing with an easy-to-use API. It enables users to write scientific

ArrayFire 402 Dec 20, 2022
Disqus API bindings for Python

disqus-python Let's start with installing the API: pip install disqus-python Use the API by instantiating it, and then calling the method through dott

DISQUS 163 Oct 14, 2022
Python bindings to the Syncthing REST interface.

python-syncthing Python bindings to the Syncthing REST interface. Python API Documentation Syncthing Syncthing REST Documentation Syncthing Forums $ p

Blake VandeMerwe 64 Aug 13, 2022
Python bindings for LibreTranslate

Python bindings for LibreTranslate

Argos Open Tech 42 Jan 3, 2023
pylunasvg - Python bindings for lunasvg

pylunasvg - Python bindings for lunasvg Pylunasvg is a simple wrapper around lunasvg that uses pybind11 to create python bindings. All public API of t

Eren 6 Jan 5, 2023
Python bindings for swm-core client REST API

Python bindings for swm-core client REST API Description Sky Port is an universal bus between user software and compute resources. It can also be cons

Sky Workflows 1 Jan 1, 2022
Official Python client for the MonkeyLearn API. Build and consume machine learning models for language processing from your Python apps.

MonkeyLearn API for Python Official Python client for the MonkeyLearn API. Build and run machine learning models for language processing from your Pyt

MonkeyLearn 157 Nov 22, 2022
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python Reddit API Wrapper Development 3k Dec 29, 2022
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python Reddit API Wrapper Development 3k Dec 29, 2022
alpaca-trade-api-python is a python library for the Alpaca Commission Free Trading API.

alpaca-trade-api-python is a python library for the Alpaca Commission Free Trading API. It allows rapid trading algo development easily, with support for both REST and streaming data interfaces

Alpaca 1.5k Jan 9, 2023
🖥️ Python - P1 Monitor API Asynchronous Python Client

??️ Asynchronous Python client for the P1 Monitor

Klaas Schoute 9 Dec 12, 2022
Volt is yet another discord api wrapper for Python. It supports python 3.8 +

Volt Volt is yet another discord api wrapper for Python. It supports python 3.8 + How to install [Currently Not Supported.] pip install volt.py Speed

Minjun Kim (Lapis0875) 11 Nov 21, 2022
Bagas Mirror&Leech Bot is a multipurpose Telegram Bot written in Python for mirroring files on the Internet to our beloved Google Drive. Based on python-aria-mirror-bot

- [ MAYBE UPDATE & ADD MORE MODULE ] Bagas Mirror&Leech Bot Bagas Mirror&Leech Bot is a multipurpose Telegram Bot written in Python for mirroring file

null 4 Nov 23, 2021
A python Discord wrapper made in well, python.

discord.why A python Discord wrapper made in well, python. Made to be used by devs who want something a bit more, general. Basic Examples Sending a me

HellSec 6 Mar 26, 2022
A wrapper for aqquiring Choice Coin directly through a Python Terminal. Leverages the TinyMan Python-SDK.

CHOICE_TinyMan_Wrapper A wrapper that allows users to acquire Choice Coin directly through their Terminal using ALGO and various Algorand Standard Ass

Choice Coin 16 Sep 24, 2022
Python On WhatsApp - Run your python codes on whatsapp along with talking to a chatbot

Python On WhatsApp Run your python codes on whatsapp along with talking to a chatbot This is a small python project to run python on whatsapp. and i c

Prajjwal Pathak 32 Dec 30, 2022
Get-Phone-Number-Details-using-Python - To get the details of any number, we can use an amazing Python module known as phonenumbers.

Get-Phone-Number-Details-using-Python To get the details of any number, we can use an amazing Python module known as phonenumbers. We can use the amaz

Coding Taggers 1 Jan 1, 2022