#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Lossless compression experiment example (uses JPEG-LS)
"""
__author__ = "Miguel Hernández Cabronero <*****@*****.**>"
__date__ = "25/11/2020"

import os

from enb.config import get_options

options = get_options(from_main=False)

from enb import icompression
from enb import aanalysis
import plugin_jpeg.jpeg_codecs

if __name__ == '__main__':
    # Setup global options
    options.base_dataset_dir = "./data"

    # Define list of codecs
    codecs = []
    codecs.append(plugin_jpeg.jpeg_codecs.JPEG_LS(max_error=0))

    # Create experiment
    exp = icompression.LosslessCompressionExperiment(codecs=codecs)

    # Generate pandas dataframe with results
    df = exp.get_df(parallel_row_processing=not options.sequential,
                    overwrite=options.force > 0)
Пример #2
0
import collections
import pandas as pd
import math
import copy
import functools
import time
import datetime
import inspect
import traceback
import ray

from enb.config import get_options
from enb import config
from enb import ray_cluster

options = get_options()


class CorruptedTableError(Exception):
    """Raised when a table is Corrupted, e.g., when loading a
    CSV with missing indices
    """
    def __init__(self, atable, ex=None, msg=None):
        """
        :param msg: message describing the error that took place
        """
        self.atable = atable
        self.ex = ex
        self.msg = msg

    def __str__(self):