Oracle Machine Learning for Python Known Issues
Learn about the issues you may encounter when using Oracle Machine Learning for Python and how to work around them.
Running oml.dir() in Oracle Machine Learning notebooks returns an empty list.
Running the oml.dir()
function in a notebook should
return the oml.*
objects in the current workspace. However, at
present, running oml.dir
returns an empty list:
%python
import oml
...
oml.dir()
[]
Workaround
To work around this problem, use dir()
and check if the
objects belong to the oml
module. For example, use
dir()
to return the objects.
%python
dir()
['__builtins__', '__zeppelin__', 'datasets', 'linear_model', 'oml',
'inv_objects', 'inv_wine', 'inv_wine_columns', 'pd', 'wine', 'x', 'y', 'z']
Then use <obj>.__class__.__module__
to return the module name
for an object <obj>
; for
example:
%python
inv_wine.__class__.__module__
'oml.core.frame'
If the returned string starts with oml.
, the object
belongs to the oml
module.
If you have many objects to check, you can iterate through the objects; for example:
%python
[t for t in dir() if eval(t).__class__.__module__[0:4] == 'oml.']
['inv_wine']
See oml.dir()
and dir()
in Oracle Machine Learning for
Python API Reference and see Get Started with Notebooks for Data Analysis and
Data Visualization in Using Oracle Machine Learning on Autonomous
Database.
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Access to Oracle Support
Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.
Oracle Machine Learning for Python Known Issues
F40497-05
April 2021
Copyright © 2021, Oracle and/or its affiliates.