• Stars
    star
    130
  • Rank 277,575 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 7 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Personal python toolbox.

Jacinle

Jacinle is a personal python toolbox. It contains a range of utility functions for python development, including project configuration, file IO, image processing, inter-process communication, etc.

[Website] [Examples] [Jacinle References] [JacLearn References] [JacTorch References]

Installation

Clone the Jacinle package (be sure to clone all submodules), and add the bin path to your PATH environment.

git clone https://github.com/vacancy/Jacinle --recursive
export PATH=<path_to_jacinle>/bin:$PATH

Optionally, you may need to install third-party packages specified in requirements.txt

Command Line

  1. jac-run xxx.py

    Jacinle comes with a command line to replace the python command: jac-run. In short, this command will automatically add the Jacinle packages into PYTHONPATH, as well as adding a few vendor Python packages into PYTHONPATH (for example, JacMLDash). Using this command to replace python xxx.py is the best practice to manage dependencies.

    Furthremore, this command also supports a configuration file specific to projects. The command will search for a configuration file named jacinle.yml in the current working directory and its parent directories. This file specifies additional environmental variables to add, for example.

    project_root: true  # tell the script that the folder containing this file is the root of a project. The directory will be added to PYTHONPATH.
    system:
        envs:
            CUDA_HOME: /usr/local/cuda-10.0  # set needed environment variables here.
    path:
        bin:  # will be prepended to $PATH
            /usr/local/bin
        python:  # will be prepended to $PYTHONPATH
            /Users/jiayuanm/opt/my_python_lib
    vendors:  # load additional Python packages (root paths will be added to PYTHONPATH)
        pybullet_tools:
            root: /Users/jiayuanm/opt/pybullet/utils
        alfred:
            root: /Users/jiayuanm/opt/alfred
  2. jac-crun <gpu_ids> xxx.py

    The same as jac-run, but takes an additional argument, which is a comma-separated list of gpu ids, following the convension of CUDA_VISIBLE_DEVICES.

  3. jac-debug xxx.py

    The same as jac-run, but sets the environment variable JAC_DEBUG=1 before running the command. By default, in the debug mode, an ipdb interface will be started when an exception is raised.

  4. jac-cdebug <gpu_ids> xxx.py

    The combined jac-debug and jac-crun.

  5. jac-update

    Update the Jacinle package (and all dependencies inside vendors/).

  6. jac-inspect-file xxx.json yyy.pkl

    Start an IPython interface and loads all files in the argument list. The content of the files can be accessed via f1, f2, ...

Python Libraries

Jacinle contains a collection of useful packages. Here is a list of commonly used packages, with links to the documentation.

  • jacinle.*: frequently used utility functions, such as jacinle.JacArgumentParser, jacinle.TQDMPool, jacinle.get_logger, jacinle.cond_with, etc.
  • jacinle.io.*: IO functions. Two of the mostly used ones are: jacinle.io.load(filename) and jacinle.io.dump(filename, obj)
  • jacinle.random.*: almost the same as numpy.random.*, but with a few additional utility functions and RNG state management functions.
  • jacinle.web.*: the old jacweb package, which is a customized wrapper around the tornado web server.
  • jaclearn.*: machine learning modules.
  • jactorch.*: a collection of PyTorch functions in addition to the torch.* functions.

More Repositories

1

Synchronized-BatchNorm-PyTorch

Synchronized Batch Normalization implementation in PyTorch.
Python
1,500
star
2

PreciseRoIPooling

Precise RoI Pooling with coordinate gradient support, proposed in the paper "Acquisition of Localization Confidence for Accurate Object Detection" (https://arxiv.org/abs/1807.11590).
C++
770
star
3

SceneGraphParser

A python toolkit for parsing captions (in natural language) into scene graphs (as symbolic representations).
Python
541
star
4

NSCL-PyTorch-Release

PyTorch implementation for the Neuro-Symbolic Concept Learner (NS-CL).
Python
411
star
5

PyPatchMatch

PatchMatch based image inpainting for C++ and Python.
C++
104
star
6

AdvancedIndexing-PyTorch

(Batched) advanced indexing for PyTorch.
Python
53
star
7

TensorArtist

Lightweight neural network library for Tensorflow.
Python
48
star
8

PDSketch-Alpha-Release

Python
14
star
9

dotfiles

Personal dotfiles.
Shell
11
star
10

NaiveCompGraph

A demo project for a computation graph implementation in C++.
C++
11
star
11

JacMLDash

Personal Dashboard for Machine Learning Experiments
Python
4
star
12

Kaleido

A demo project for an auto-diff numerical operation library. Designed for course "Advanced Apps of Machine Learning'' at Tsinghua Univ.
Python
3
star
13

vacancy.github.io

CSS
3
star
14

BlockChainDB

BlockChainDB for course "Operation System" at Tsinghua University.
Go
3
star
15

BlockDB

BlockDB for course "Operation System".
Go
2
star
16

NaiveRayTracing

A naive implementation of ray tracing, incl. Path Tracing and Photon Mapping.
C++
2
star
17

VacTeX

A simple XeLaTeX Template.
TeX
1
star
18

Nachos-Threading

Complete threading system for Stock Nachos.
Java
1
star
19

NaiveDecimation

A naive implementation of triangle mesh decimation.
C++
1
star
20

NeuralArt-Tensorflow

Tensorflow implementation for deepdream and neural-style. Designed for course "Advanced Apps of Machine Learning'' at Tsinghua Univ.
Python
1
star
21

6882-HW

Jupyter Notebook
1
star