pythondata-ingestionmlopsfeature-storemlrun

Missing webapi parameter or V3IO_API environment variable


I got the exception:

  File "C:\Python\ingestKVdatetime\venv\lib\site-packages\mlrun\datastore\targets.py", line 1155, in get_table_object
    V3ioDriver(webapi=endpoint),
  File "C:\Python\ingestKVdatetime\venv\lib\site-packages\storey\drivers.py", line 100, in __init__
    NeedsV3ioAccess.__init__(self, webapi, access_key)
  File "C:\Python\ingestKVdatetime\venv\lib\site-packages\storey\drivers.py", line 72, in __init__
    raise ValueError("Missing webapi parameter or V3IO_API environment variable")
ValueError: Missing webapi parameter or V3IO_API environment variable

When I ingested data to key-value target, see source code:

import mlrun
import mlrun.feature_store as fstore
...
mlrun.set_env_from_file("mlrun-nonprod.env")
project = mlrun.get_or_create_project(project_name, context='./', user_project=False)
feature_set = fstore.FeatureSet(feature_name, entities=[fstore.Entity("fn0"), fstore.Entity("fn1")],engine="storey")
feature_set.set_targets(targets=[mlrun.datastore.NoSqlTarget()], with_defaults=False)
feature_set.save()

fstore.ingest(feature_set, dataFrm, overwrite=True)

Why do I need to setup V3IO_API when I already set MLRUN_DB, V3IO_USERNAME, V3IO_ACCESS_KEY? Where can I find settings for V3IO_API?


Solution

  • I saw in documentation:

    1. You not need V3IO_API, based on official documentation see: enter image description here

    2. If V3IO_API is required (see exception) and you setup MLRUN_DBPATH than your mlrun version contains mistake (I got this mistake in mlrun version 1.2.1)

    3. You can see address for V3IO_API in menu MLRun platform/Services/webapi and typical value is https://webapi.default-tenant.app.iguazio-nonprod.eu.nonprod