Giter Club home page Giter Club logo

aind-nlp-bookworm's Issues

helper.py needs small update to work with watson_developer_cloud version 1.0

Change the environments line in the following to "environment": "list_environments" in the following snippet. Alternatively, give some guidance on which version of the watson_developer_cloud to install. Reference the repo for the change.

# Methods for each object type
    list_methods = {
        "environment": "list_environments",
        "configuration": "list_configurations",
        "collection": "list_collections",
        "workspace": "list_workspaces"
    }

See this forum post for more info.

DecrepationWarning from watson_developer_cloud.DiscoveryV1()

discovery = watson_developer_cloud.DiscoveryV1(
                        version='2018-08-01',
                        url=discovery_creds['url'],
                        iam_apikey=discovery_creds['apikey'])

Throws the following warning:

DeprecationWarning: watson-developer-cloud moved to ibm-watson. To get updates, use the new package.

To follow the instructions and update the notebook ibm-watson and ibm-cloud-sdk-core can be installed with pip and imported as follows:

import ibm_watson
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

By using IAMAuthenticator discovery can be instantiated:

authenticator = IAMAuthenticator(apikey=discovery_creds['apikey'],
                                                       url=discovery_creds['url'])
discovery = ibm_watson.DiscoveryV1(version='2018-08-01',
                                                              authenticator=authenticator)

However, both listing and creating environments now throws an error:

environments = discovery.list_environments().get_result()
ApiException: Error: Not Found, Code: 404

and

# Prepare an environment to work in
env, env_id = helper.fetch_object(
    discovery, "environment", "Bookworm",
    create=True, create_args=dict(
        description="A space to read and understand stories"  # feel free to edit
    ))

ApiException: Error: Not Found, Code: 404

Watson Error 415 when creating a collection

# Prepare a collection of documents to use
col, col_id = helper.fetch_object(discovery, "collection", "Story Chunks", environment_id=env_id,
    create=True, create_args=dict(
        environment_id=env_id, configuration_id=cfg_id,
        description="Stories and plots split up into chunks suitable for answering"
    ))

WatsonException: Error: The request failed. Please try again., Code: 415

It worked the previous week. New services with new credentials don't solve the issue.

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.