Questions tagged [project-lib]

IBM project-lib R and Python libraries contain a set of functions that help you to interact with Watson Studio projects and project assets. You can think of the libraries as a programmatical interface to a Watson Studio project. Using the project-lib libraries, you can access project metadata and assets, including files and connections. The libraries also contain functions that simplify fetching files from the object storage associated with the project.

The project-lib R documentation is here and the project-lib Python documentation is here.

7 questions
1
vote
1 answer

Accessing asset in Watson Studio notebook (.log file) using 'with open' and 'project-lib'

I'm trying to deploy a working python 3.6 notebook in Watson Studio (cloud). However I'm struggling to access files/assets. After uploading a .log file to my assets, I want to open and process it using with open(project.get_file('messages.log'),…
1
vote
1 answer

folders in ibm watson studio

I am using project lib in ibm watson studio to store and save files created in a jupyter notebook(mainly csv and pkl files). The thing is that I need to store these files in different folders in my project. I could not find the way to do this…
1
vote
1 answer

How to register file/folder as a project data asset after saving to cloud object storage?

I've saved a spark data frame to cloud object storage into a Watson Studio project's bucket: staging .write .mode("overwrite") .option("header", "true") .csv(cos.url('all.csv', 'myproject-bucket')) I would the resulting…
Chris Snow
  • 23,813
  • 35
  • 144
  • 309
1
vote
1 answer

How can I save a binary file to my project assets using project-lib python?

The project lib documentation shows how to save a pandas dataframe to the project assets: # Import the lib from project_lib import Project project = Project(sc,"", "") # let's assume you have the pandas DataFrame …
Chris Snow
  • 23,813
  • 35
  • 144
  • 309
1
vote
1 answer

how can I save a binary file from cloud object storage to the notebook filesystem?

Frequently when working with files in IBM Cloud Object Storage from a Watson Studio notebook, I need to save the files to the notebook local file system where I can then access them from R functions. Project-lib allows me to retrieve the file from…
Chris Snow
  • 23,813
  • 35
  • 144
  • 309
0
votes
1 answer

Permission Denied: Only authenticated user can access this private project

I'm trying to use project_lib in a python notebook and getting the following error running the cell that is inserted automatically by using the "insert project token" option: ERROR:__PROJECT_LIB__:ProjectAPIProxy__get_project(): unexpected…
Chris Snow
  • 23,813
  • 35
  • 144
  • 309
0
votes
1 answer

how to save a csv file to cloud object storage using project-lib?

I have a csv file that I have written to the notebook filesystem: # read csv from object storage df = read.csv2( ... ) # do some operations ... # save new csv to notebook filesystem file.remove('example.csv') write.csv(df, file =…
Chris Snow
  • 23,813
  • 35
  • 144
  • 309