Giter Club home page Giter Club logo

paperspace-python's Introduction


⚠️ NOTE: THIS REPO IS BEING MOVED TO A NEW LOCATION paperspace/gradient-cli. The package will be available as paperspace-python while we complete this migration but we recommend installing the new gradient package moving forward.

Paperspace Python

Release 0.2.0

See releasenotes.md for details on the current release, as well as release history.

Getting Started

  1. Make sure you have a Paperspace account set up. Go to http://paperspace.com to register.

  2. Use pip, pipenv, or conda to install the paperspace-python package, e.g.:

    pip install -U paperspace

    To install/update prerelease (Alpha/Beta) version version of paperspace-python, use:

    pip install -U --pre paperspace

  3. Enable autocomplete:

    Add following to your .bashrc (or .zshrc) to enable autocomplete anytime you activate your shell. If paperspace-python was installed in a virtual environment, the following has to be added to the activate script:

    eval "$(_PAPERSPACE_PYTHON_COMPLETE=source paperspace-python)"

    Alternatively, you can create activation script by:

    (_PAPERSPACE_PYTHON_COMPLETE=source paperspace-python) > ~/paperspace_complete.sh

    and then add . ~/paperspace_complete.sh to your .bashrc, .zshrc or activate script.

    More: https://click.palletsprojects.com/en/7.x/bashcomplete/

  4. Download your api key by executing the following:

    paperspace-python login

    Follow the prompts to enter your Paperspace email and password.

    You can also enter your credentials directly on the command line as follows:

    paperspace-python login <email> <password> [<api_token_name>]

    Note: your api key is cached in ~/.paperspace/config.json You can remove your cached api key by executing:

    paperspace-python logout

  5. Run the sample script hello.py using Python:

    python hello.py

    The source of this sample script shows how a script can automatically run itself on the Paperspace job cluster node:

    import paperspace
    
    paperspace.run()
    
    print('hello paperspace-python!')
    

    Note: the source is modified before transfer to the job cluster in order to remove imported paperspace references.

  6. Use paperspace-python to run a python script remotely:

    paperspace-python run myscript.py

    The script will be run on the Paperspace job cluster node, and its output will be logged locally.

Create/create and start experiment

To create new experiment use:

paperspace-python experiments create [type] [--options]

The two available experiment types are singlenode and multinode.

To create and immediately start new experiment use:

paperspace-python experiments createAndStart [type] [--options]

For a full list of available commands run paperspace experiments --help. Note that some options are required to create new experiment.

Specifying jobs options within a script

This example shows how a script can specify paperspace jobs options for itself, such as project name, machineType, and a container reference:

# tests/test_remote.py - runs itself on paperspace, demonstrates setting jobs create options
import os
import paperspace

paperspace.run({'project': 'myproject', 'machineType': 'P5000',
                'container': 'paperspace/tensorflow-python'})

print(os.getcwd())
print('something useful')

Automatic running of a python script remotely

The above example demonstrates running a python script locally and having that script transmit itself to the paperspace jobs cluster for further execution. To do this a copy of the local script is modified before transmission to the jobs cluster, in order to strip out the import paperspace statements and other paperspace library references. There are also some limitations on the types of import statements that are supported, and the dependencies that are supported in each environment (local vs. remote):

  1. You need to use a bare import statement, import paperspace, and not use the import paperspace as ... form.
  2. The import form from paperspace import ... is currently not supported.
  3. Everything after the paperspace.run() function call is ignored when running locally (when no script name is provided). The local script execution stops after the paperspace.run() call.
  4. Dependencies that are included before paperspace.run() must be available locally.
  5. If you need to reference dependencies that are not available locally but are available remotely, those should be imported after the paperspace.run() call.
  6. Dependencies that are needed remotely need to either be already installed in the container used for the job, or need to be installed using one of the techniques below in the section Dependency Options

Because of these limitations it may not always be appropriate to run python scripts automatically from within the same script file. As an alternative you can run your python scripts unmodified using the techniques below.

Running a python script by name

You can run an python script on paperspace from the command line as follows:

paperspace-python run myscript.py

You can also provide additional jobs options on the command line:

paperspace-python run myscript.py --project myproject --machineType P5000 \
 --container paperspace/tensorflow-python`

Alternatively you can use the paperspace.run() fuction in code with a script file name as the first argument:

import paperspace

paperspace.run('myscript.py') # runs myscript on paperspace

In code you can provide additional paperspace jobs create options in a dict in the second argument to run():

paperspace.run('myscript.py', {'project': 'myproject', 'machineType': 'P5000',
                               'container': 'paperspace/tensorflow-python'})

See the Paperspace API jobs create documentation for the full list of jobs create options that can be specified.

Using paperspace-python run

The paperspace-python run command provides a number of options to run python code and other commands remotely, as well as copy files and set up python dependencies:

paperspace-python run [options] [[-m] <script> [args] | -c "python code" | --command "shell cmd"]
  options:
  [--python 2|3]
  [--init [<init.sh>]]
  [--pipenv]
  [--req [<requirements.txt>]]
  [--workspace .|<workspace_path>]
  [--ignoreFiles "<file-or-dir>,..."]
  [jobs create options]
  [--dryrun]
  [-]

Basic Run Scenarios

  1. Run a python script remotely:

    paperspace-python run <python_script.py> [args]

    Example:

    paperspace-python run myscript.py a b c

  2. Run a python module remotely using the -m option:

    paperspace-python run -m <module_path> [args]

    Example:

    paperspace-python run -m pip --version

  3. Run a python command remotely using the -c option:

    paperspace-python run -c "python_statement;..."

    Example:

    paperspace-python run -c "import os; print(os.getcwd())"

  4. Run an executable or shell command remotely using the --command option:

    paperspace-python run --command "<executable or shell command>"

    Example:

    paperspace-python run --command "ls -al"

Run Options

The <script> option is a python script or path to a python module. The script or module will be uploaded if it exists on the local file system.

Other scriptargs can be provided after the python script or module path. You can use the - option to suppress interpretation of the list of script args as paperspace-python run options.

The -m <module path> option runs the specified library module as a script. This is equivalent to the -m option of the python executable. Further paperspace run option processing is disabled after the -m option.

The -c "python_statement;..." option runs the specified python statements. This is equivalent to the -c option of the python executable. Further paperspace run option processing is disabled after the -c option.

The - option disables further run command option processing and passes the remaining arguments to the script specified. This allows you to pass arguments to your script that might otherwise conflict with run command options or jobs create options.

The --command "shell cmd" option is used to run an arbitrary executable or shell command inside the container. Note: the executable or shell command must already be available inside the container image, or be copied over using the --workspace option.

Job Options

The --workspace option allows you to specify a workspace file or directory to upload, or a git repo link to download and merge with the container. For example, to upload the current directory along with a script file run:

paperspace-python run myscript.py --workspace .

See the Paperspae API jobs create documentation for more details on the --workspace option and related options.

The --ignoreFiles "<file-or-dir>,..." option can be used specify a simple comma separated list of files and directories to ignore for the workspace upload:

paperspace-python run myscript.py --workspace . --ignoreFiles "hello.py,paperspace"

The following files and directories are ignored by default: .git, .gitignore, __pycache__.

Other jobs create options can be specified, such as --machineType <machine type>, --container <container image reference>, and --project <project name>.

Here are some of the other jobs create options available:

  • --project "<project name>" (defaults to 'paperspace-python')
  • --machineType [GPU+|P4000|P5000|P6000|V100] (defaults to P5000)
  • --container <docker image link or paperspace container name> (defaults to docker.io/paperspace/tensorflow-python)
  • --name "<job name>" (defaults to 'job for project ')
  • --projectId "<existing paperspace project id>"
  • --registryUsername "<username>" (for access to a private docker registry)
  • --registryPassword "<secretpw>" (for access to a private docker registry)
  • --workspaceUsername "<username>" (for access to a private git repo)
  • --workspacePassword "<secretpw>" (for access to a private git repo)

See the Paperspae API jobs create documentation for a complete description of these options.

Dependency Options

When running python scripts on paperspace you may need to provide additional dependencies to your scripts or specify the python version. The paperspace-python run command has several options to support this: --python, --init, --pipenv, and --req. In addition you can use the --workspace option above to upload file dependencies.

The --python 2|3 option allows you specify whether to use python2 or python3 when running the script on paperspace. If ommitted, the script will be run with the same major version as is being used to run paperspace-python locally.

The --init [<init.sh>] option is used to specify a script to be run on the remote machine, inside the container, before the python script is run. If the init script name is ommitted, it is assumed to be the script named init.sh in the current directory. The script is run using source init.sh in the container bash shell. You can use this option to provide a list of commands to run to set up the dependencies for the script, such as running a list of pip install commands. However, if you are using pipenv or a requirements.txt file we recommend you use one of the options below. Multiple dependency setup options can be combinded however.

The --pipenv option is used to upload and run the Pipfile and Pipfile.lock files in the current directory, if found. These files are used on the paperspace machine to initialize the python environment using the pipenv tool, by running pipenv install within the container. Note: pipenv must already be installed in the container for this option to work. The default container used by paperspace-python already has the pipenv package installed.

The --req [<requirements.txt>] option is used specify that a requirements.txt file should be used to install the required python dependencies using pip. By default this option looks for a file named requirements.txt in the current directory, but you can override this by specifying a different file name. Note: pip must already be installed in the container for this option to work. The default container used by paperspace-python already has the pip package installed.

The --dryrun option allows you to see the resultant script that will be run on the paperspace job runner without actually running it.

All of the above options can be combined in any combination, however, the order of operations is fixed to the following:

  1. source <init.sh> is run if --init <init.sh> is specified
  2. pipenv [--two|--three] install is run if --pipenv is specified
  3. pip[2|3] install -r requirements.txt is run if --req <requirements.txt> is specified
  4. python[2|3] myscript.py is run

As mentioned above, you can use the --dryrun option to see the resultant commands that will be run on the paperspace jobs cluster node for a given set of options, without actually running the commands.

Default Container

If no container option is specified when using paperspace run <script.py> or the paperspace.run() function the default container image used is paperspace/tensorflow-python on Docker Hub. This container has the tensorflow-gpu libraries installed for both python2 and python3, as well as several other popular packages, including numpy, scipy, scikit-learn, pandas, Pillow and matplotlib. It is based off the Google docker image gcr.io/tensorflow/tensorflow:1.5.0-gpu with the addition of support for python3, pip3, and pipenv.

A Dockerfile for building this container image is here.

Other examples

See the scripts in the tests folder for other examples.

Other Authentication options

  1. Specify your apiKey explicitly on the paperspace.run() function or any of the paperspace.jobs methods, e.g.:

    paperspace.jobs.create({'apiKey': '1qks1hKsU7e1k...', 'project': 'myproject',
                            'machineType': 'P5000', 'container': 'paperspace/tensorflow-python'})
    
  2. Set the package paperspace.config option in your python code:

    paperspace.config.PAPERSPACE_API_KEY = '1qks1hKsU7e1k...'

  3. Set the PAPERSPACE_API_KEY environment variable:

    (on linux/mac:) export PAPERSPACE_API_KEY=1qks1hKsU7e1k...

    (on windows:) set PAPERSPACE_API_KEY=1qks1hKsU7e1k...

    Note: the above methods take precedence over use of the cached api key in ~/.paperspace/config.json

  4. Set the key in the ~/.paperspace/config.json file from the command line by running:

    paperspace-python apikey 1qks1hKsU7e1k...

Using SAML, AD or GitHub credentials

Currently only email login is supported in the CLI - if you're using AD, SAML or GitHub to login to Paperspace, you will need an API key to log in with the CLI.

You can create an API key from within your Paperspace console under the API section. Login to your Paperspace console, scroll to the API section in the left navigation bar, and click CREATE AN API KEY. Follow the instructions there. You will need to pick and API token name for your API key, and also provide a description. You can copy the API key value associated with the API token name only at the time of initial creation. If you need to access your API key in the future, you can instead access it by API token name using the 'paperspace-python login' command.

Contributing

Want to contribute? Contact us at [email protected]

paperspace-python's People

Contributors

bartoszcki avatar bbatha avatar colin-welch avatar dandruszak avatar dte avatar exdx avatar jaredscheib avatar kossak avatar mkulaczkowski avatar mudlaffp avatar sanfilip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paperspace-python's Issues

using --init returns: sh: 1: source: not found

The --init option tries to run a script using "source" but this fails on the remote machine with the message "sh: 1: source: not found".

It appears the shell on at least one remote Gradient machine (K80) and possibly more does not use "source" to source input scripts. I'm assuming it needs the "." to source instead.

I did try to fix this (unsuccessfully) in my own copy of the paperspace-python package, using the "." The remote shell then did understand it was meant to source the file, but for some reason it couldn't find init.sh even though it was in my workspace. I'm not quite sure why that would be.

NameError: name 'time' is not defined

When running this command:

paperspace-python run --workspace Dockerfile --useDockerfile True -m unittest discover musicgeneration/tests/

I get the following error:

Traceback (most recent call last):
  File "/home/gcoter/projects/music/audio-music-generation/venv/bin/paperspace-python", line 10, in <module>
    sys.exit(main())
  File "/home/gcoter/projects/music/audio-music-generation/venv/lib/python3.6/site-packages/paperspace/main.py", line 112, in main
    res = run(params)
  File "/home/gcoter/projects/music/audio-music-generation/venv/lib/python3.6/site-packages/paperspace/jobs.py", line 418, in run
    res = create(params, no_logging)
  File "/home/gcoter/projects/music/audio-music-generation/venv/lib/python3.6/site-packages/paperspace/jobs.py", line 159, in create
    job = waitfor({'jobId': jobId, 'state': 'Running'})
  File "/home/gcoter/projects/music/audio-music-generation/venv/lib/python3.6/site-packages/paperspace/jobs.py", line 139, in waitfor
    time.sleep(5)
NameError: name 'time' is not defined

I think the problem is simply that the time module is not currently imported in paperspace/jobs.py.

I am using paperspace-python 0.0.16 installed from pip.

Enhancement: better way of calling API commands

With a very simple change to the API functions, they could be much more pythonic.
Right now, you need to call them with a dict 'params' that contains all the API command arguments.

If you simply changed the argument for a API command function definition to use **params instead of params, you could give arguments to the python function like regular python function keyword arguments.

Like so:
Change (in jobs.py)

def create(params, no_logging=False, extra_files=[]):

to

def create(**params, no_logging=False, extra_files=[]):

That way, when calling paperspace.jobs.create(), you can call it like so:

paperspace.jobs.create(machineType='K80', command='my_command.sh', project='my_project')

This is cleaner syntax than having to pass a dict with all of the keywords.

paperspace-python login doesn't appear to support 2FA

It appears that it is not possible to login using paperspace-python with a paperspace account that has two-factor authentication enabled. The following error is returned when attempting to login and I cannot see a way to specify the two-factor authentication passcode:

MFA passcode invalid

Job fails due to S3 bucket .zip file error: "not a valid .zip file"

In the console, the job first shows up as Queued, then Pending, then "Error!" with 0 seconds listed as elapsed at the end.

I can see the error from IPython, stating that the download is not a valid zip file. It occurs when a job has just been launched using paperspace-python version 0.0.15. The same script and set of workspace files works only some of the time due to the error.

Waiting for job to run... Job Error: Error downloading files from S3 bucket 's3://ps-projects/[ ... ]/[jobId]/[workspacedirectory].zip' to directory '/var/lib/docker/volumes/[jobId]/_data': zip: not a valid zip file

Cannot install paperspace

Running pip install pipenv:

Looking in indexes: https://pypi.python.org/simple, https://pypi.fury.io/cronobo
Collecting paperspace
  Using cached https://files.pythonhosted.org/packages/92/c7/72d0651c80c7404eed44fe4f51d3597867a2a6ccec2c818b097778352053/paperspace-0.0.16.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\remib\AppData\Local\Temp\pip-install-th_kznou\paperspace\setup.py", line 6, in <module>
        from paperspace.__version__ import version
      File "C:\Users\remib\AppData\Local\Temp\pip-install-th_kznou\paperspace\paperspace\__init__.py", line 1, in <module>
        from gradient_statsd import Client as StatsdClient
    ModuleNotFoundError: No module named 'gradient_statsd'

    ----------------------------------------

Error:  An error occurred while installing paperspace!
Command "python setup.py egg_info" failed with error code 1 in C:\Users\remib\AppData\Local\Temp\pip-install-th_kznou\paperspace\
You are using pip version 18.0, however version 19.0.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

This is likely caused by a bug in paperspace. Report this to its maintainers.

It looks like some dependencies are missing. Installing manually gradient_statsd solves it, but then boto3 package is claimed missing.

Error installing paperspace-python on Windows 10

I am unable to successfully perform a pip install of paperspace-python on a machine with the following configuration:

OS: Windows 10 Pro x64
Anaconda: 4.3.1
Python: 3.6.0
Pip: 18.1 (updated after first install attempt failed)

See below for the output of the pip install. I apologise in advance if this is not a real issue but I am not sure what else to try before logging this issue, apart from a pip upgrade and conda install of the paperspace api, which also fails.

Collecting paperspace
  Using cached https://files.pythonhosted.org/packages/71/8a/a8d5fdd72ab0c39760aa5f4f56d324dfd015b2b3ac30c0006ae818e35acf/paperspace-0.0.13.tar.gz
Requirement already satisfied: requests[security] in c:\users\allan\anaconda3\lib\site-packages (from paperspace) (2.12.4)
Requirement already satisfied: boto3 in c:\users\allan\anaconda3\lib\site-packages (from paperspace) (1.9.69)
Requirement already satisfied: botocore in c:\users\allan\anaconda3\lib\site-packages (from paperspace) (1.12.69)
Requirement already satisfied: six in c:\users\allan\anaconda3\lib\site-packages (from paperspace) (1.10.0)
Requirement already satisfied: pyOpenSSL>=0.14 in c:\users\allan\anaconda3\lib\site-packages (from requests[security]->paperspace) (16.2.0)
Requirement already satisfied: cryptography>=1.3.4 in c:\users\allan\anaconda3\lib\site-packages (from requests[security]->paperspace) (1.7.1)
Requirement already satisfied: idna>=2.0.0 in c:\users\allan\anaconda3\lib\site-packages (from requests[security]->paperspace) (2.2)
Requirement already satisfied: s3transfer<0.2.0,>=0.1.10 in c:\users\allan\anaconda3\lib\site-packages (from boto3->paperspace) (0.1.13)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in c:\users\allan\anaconda3\lib\site-packages (from boto3->paperspace) (0.9.3)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1; python_version >= "2.7" in c:\users\allan\anaconda3\lib\site-packages (from botocore->paperspace) (2.6.0)
Requirement already satisfied: docutils>=0.10 in c:\users\allan\anaconda3\lib\site-packages (from botocore->paperspace) (0.13.1)
Requirement already satisfied: urllib3<1.25,>=1.20; python_version >= "3.4" in c:\users\allan\anaconda3\lib\site-packages (from botocore->paperspace) (1.24.1)
Requirement already satisfied: pyasn1>=0.1.8 in c:\users\allan\anaconda3\lib\site-packages (from cryptography>=1.3.4->requests[security]->paperspace) (0.1.9)
Requirement already satisfied: setuptools>=11.3 in c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg (from cryptography>=1.3.4->requests[security]->paperspace) (27.2.0)
Requirement already satisfied: cffi>=1.4.1 in c:\users\allan\anaconda3\lib\site-packages (from cryptography>=1.3.4->requests[security]->paperspace) (1.9.1)
Requirement already satisfied: pycparser in c:\users\allan\anaconda3\lib\site-packages (from cffi>=1.4.1->cryptography>=1.3.4->requests[security]->paperspace) (2.17)
Building wheels for collected packages: paperspace
  Running setup.py bdist_wheel for paperspace ... error
  Complete output from command c:\users\allan\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\allan\\AppData\\Local\\Temp\\pip-install-dsnu0m0c\\paperspace\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\allan\AppData\Local\Temp\pip-wheel-v13fd3og --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib
  creating build\lib\paperspace
  copying paperspace\config.py -> build\lib\paperspace
  copying paperspace\jobs.py -> build\lib\paperspace
  copying paperspace\login.py -> build\lib\paperspace
  copying paperspace\machines.py -> build\lib\paperspace
  copying paperspace\main.py -> build\lib\paperspace
  copying paperspace\method.py -> build\lib\paperspace
  copying paperspace\networks.py -> build\lib\paperspace
  copying paperspace\scripts.py -> build\lib\paperspace
  copying paperspace\templates.py -> build\lib\paperspace
  copying paperspace\users.py -> build\lib\paperspace
  copying paperspace\__init__.py -> build\lib\paperspace
  installing to build\bdist.win-amd64\wheel
  running install
  running install_lib
  creating build\bdist.win-amd64
  creating build\bdist.win-amd64\wheel
  creating build\bdist.win-amd64\wheel\paperspace
  copying build\lib\paperspace\config.py -> build\bdist.win-amd64\wheel\.\paperspace
  copying build\lib\paperspace\jobs.py -> build\bdist.win-amd64\wheel\.\paperspace
  copying build\lib\paperspace\login.py -> build\bdist.win-amd64\wheel\.\paperspace
  copying build\lib\paperspace\machines.py -> build\bdist.win-amd64\wheel\.\paperspace
  copying build\lib\paperspace\main.py -> build\bdist.win-amd64\wheel\.\paperspace
  copying build\lib\paperspace\method.py -> build\bdist.win-amd64\wheel\.\paperspace
  copying build\lib\paperspace\networks.py -> build\bdist.win-amd64\wheel\.\paperspace
  copying build\lib\paperspace\scripts.py -> build\bdist.win-amd64\wheel\.\paperspace
  copying build\lib\paperspace\templates.py -> build\bdist.win-amd64\wheel\.\paperspace
  copying build\lib\paperspace\users.py -> build\bdist.win-amd64\wheel\.\paperspace
  copying build\lib\paperspace\__init__.py -> build\bdist.win-amd64\wheel\.\paperspace
  running install_egg_info
  running egg_info
  writing paperspace.egg-info\PKG-INFO
  writing dependency_links to paperspace.egg-info\dependency_links.txt
  writing entry points to paperspace.egg-info\entry_points.txt
  writing requirements to paperspace.egg-info\requires.txt
  writing top-level names to paperspace.egg-info\top_level.txt
  warning: manifest_maker: standard file '-c' not found

  reading manifest file 'paperspace.egg-info\SOURCES.txt'
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\allan\AppData\Local\Temp\pip-install-dsnu0m0c\paperspace\setup.py", line 37, in <module>
      'paperspace-python = paperspace.main:main',
    File "c:\users\allan\anaconda3\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "c:\users\allan\anaconda3\lib\distutils\dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "c:\users\allan\anaconda3\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "c:\users\allan\anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 215, in run
      self.run_command('install')
    File "c:\users\allan\anaconda3\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "c:\users\allan\anaconda3\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\install.py", line 61, in run
    File "c:\users\allan\anaconda3\lib\distutils\command\install.py", line 557, in run
      self.run_command(cmd_name)
    File "c:\users\allan\anaconda3\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "c:\users\allan\anaconda3\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\install_egg_info.py", line 35, in run
    File "c:\users\allan\anaconda3\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "c:\users\allan\anaconda3\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\egg_info.py", line 195, in run
    File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\egg_info.py", line 222, in find_sources
    File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\egg_info.py", line 306, in run
    File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\egg_info.py", line 342, in add_defaults
    File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\sdist.py", line 234, in read_manifest
    File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\egg_info.py", line 247, in append
    File "c:\users\allan\anaconda3\lib\distutils\util.py", line 125, in convert_path
      raise ValueError("path '%s' cannot be absolute" % pathname)
  ValueError: path '/home/paperspace/paperspace-python/paperspace.egg-info/PKG-INFO' cannot be absolute

  ----------------------------------------
  Failed building wheel for paperspace
  Running setup.py clean for paperspace
Failed to build paperspace
Installing collected packages: paperspace
  Running setup.py install for paperspace ... error
    Complete output from command c:\users\allan\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\allan\\AppData\\Local\\Temp\\pip-install-dsnu0m0c\\paperspace\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\allan\AppData\Local\Temp\pip-record-86acwht8\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib
    creating build\lib\paperspace
    copying paperspace\config.py -> build\lib\paperspace
    copying paperspace\jobs.py -> build\lib\paperspace
    copying paperspace\login.py -> build\lib\paperspace
    copying paperspace\machines.py -> build\lib\paperspace
    copying paperspace\main.py -> build\lib\paperspace
    copying paperspace\method.py -> build\lib\paperspace
    copying paperspace\networks.py -> build\lib\paperspace
    copying paperspace\scripts.py -> build\lib\paperspace
    copying paperspace\templates.py -> build\lib\paperspace
    copying paperspace\users.py -> build\lib\paperspace
    copying paperspace\__init__.py -> build\lib\paperspace
    running install_lib
    running install_egg_info
    running egg_info
    writing paperspace.egg-info\PKG-INFO
    writing dependency_links to paperspace.egg-info\dependency_links.txt
    writing entry points to paperspace.egg-info\entry_points.txt
    writing requirements to paperspace.egg-info\requires.txt
    writing top-level names to paperspace.egg-info\top_level.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'paperspace.egg-info\SOURCES.txt'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\allan\AppData\Local\Temp\pip-install-dsnu0m0c\paperspace\setup.py", line 37, in <module>
        'paperspace-python = paperspace.main:main',
      File "c:\users\allan\anaconda3\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\users\allan\anaconda3\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "c:\users\allan\anaconda3\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\install.py", line 61, in run
      File "c:\users\allan\anaconda3\lib\distutils\command\install.py", line 557, in run
        self.run_command(cmd_name)
      File "c:\users\allan\anaconda3\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\users\allan\anaconda3\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\install_egg_info.py", line 35, in run
      File "c:\users\allan\anaconda3\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\users\allan\anaconda3\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\egg_info.py", line 195, in run
      File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\egg_info.py", line 222, in find_sources
      File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\egg_info.py", line 306, in run
      File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\egg_info.py", line 342, in add_defaults
      File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\sdist.py", line 234, in read_manifest
      File "c:\users\allan\anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\egg_info.py", line 247, in append
      File "c:\users\allan\anaconda3\lib\distutils\util.py", line 125, in convert_path
        raise ValueError("path '%s' cannot be absolute" % pathname)
    ValueError: path '/home/paperspace/paperspace-python/paperspace.egg-info/PKG-INFO' cannot be absolute

    ----------------------------------------
Command "c:\users\allan\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\allan\\AppData\\Local\\Temp\\pip-install-dsnu0m0c\\paperspace\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\allan\AppData\Local\Temp\pip-record-86acwht8\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\allan\AppData\Local\Temp\pip-install-dsnu0m0c\paperspace\

Cannot perform createJob

Calling paperspace.jobs.create fails, apparently the time module is not imported.

    return paperspace.jobs.create({
  File "c:\users\remib\.virtualenvs\nexture-studio-vt35otws\lib\site-packages\paperspace\jobs.py", line 159, in create
    job = waitfor({'jobId': jobId, 'state': 'Running'})
  File "c:\users\remib\.virtualenvs\nexture-studio-vt35otws\lib\site-packages\paperspace\jobs.py", line 139, in waitfor
    time.sleep(5)
NameError: name 'time' is not defined

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.