Skip to content

Instantly share code, notes, and snippets.

2020-07-17 08:57:45,864 [INFO ] main org.pytorch.serve.ModelServer -
Torchserve version: 0.1.1
TS Home: /home/lili/env-huggface/lib/python3.6/site-packages
Current directory: /home/lili/codes/huggface-transformer/test2
Temp directory: /tmp
Number of GPUs: 1
Number of CPUs: 8
Max heap size: 7938 M
Python executable: /home/lili/env-huggface/bin/python3.6
Config file: N/A
from abc import ABC
import json
import logging
import os
import torch
from transformers import BertModel, BertTokenizer
from torch import nn
from ts.torch_handler.base_handler import BaseHandler
import transformers
from transformers import BertModel, BertTokenizer, AdamW, get_linear_schedule_with_warmup
import numpy as np
import torch
import random
from torch.utils.data import Dataset, DataLoader
from torch import nn, optim
from collections import defaultdict
/home/lili/env-torch13/bin/python /home/lili/codes/huggface-transformer/test/boosted_trees.py
2.0.0
WARNING:tensorflow:Using temporary folder as model directory: /tmp/tmp47on6eju
WARNING:tensorflow:From /home/lili/env-torch13/lib/python3.6/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
WARNING:tensorflow:From /home/lili/env-torch13/lib/python3.6/site-packages/tensorflow_core/python/training/training_util.py:236: Variable.initialized_value (from tensorflow.python.ops.variables) is deprecated and will be removed in a future version.
Instructions for updating:
Use Variable.read_value. Variables in 2.X are initialized automatically both in eager and graph (inside tf.defun) contexts.
2019-12-03 15:09:35.636006: I tensorflow/stream_executor/platform/defa
from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
# Load dataset.
dftrain = pd.read_csv('https://storage.googleapis.com/tf-datasets/titanic/train.csv')
dfeval = pd.read_csv('https://storage.googleapis.com/tf-datasets/titanic/eval.csv')
y_train = dftrain.pop('survived')
== cat /etc/issue ===============================================
Linux lili-Precision-7720 4.15.0-30-generic #32~16.04.1-Ubuntu SMP Thu Jul 26 20:25:39 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
VERSION="16.04.4 LTS (Xenial Xerus)"
VERSION_ID="16.04"
VERSION_CODENAME=xenial
== are we in docker =============================================
No
import torch
import torch.nn as nn
import numpy as np
from torch.autograd import Variable
class LinearRegression(nn.Module):
def __init__(self, input_size, output_size):
super(LinearRegression, self).__init__()
self.linear = nn.Linear(input_size, output_size)
This file has been truncated, but you can view the full file.
/home/lili/env-deepspeech/lib/python2.7/site-packages/tensorflow/libtensorflow_framework.so: 文件格式 elf64-x86-64
SYMBOL TABLE:
0000000000000200 l d .note.gnu.build-id 0000000000000000 .note.gnu.build-id
0000000000000220 l d .gnu.hash 0000000000000000 .gnu.hash
0000000000030358 l d .dynsym 0000000000000000 .dynsym
00000000000c44e0 l d .dynstr 0000000000000000 .dynstr
000000000028dea0 l d .gnu.version 0000000000000000 .gnu.version
000000000029a418 l d .gnu.version_r 0000000000000000 .gnu.version_r
$objdump -tTC bazel-bin/native_client/libctc_decoder_with_kenlm.so | grep UND
0000000000000000 F *UND* 0000000000000000 tensorflow::OpDef::~OpDef()
0000000000000000 F *UND* 0000000000000000 std::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char)@@GLIBCXX_3.4.21
0000000000000000 F *UND* 0000000000000000 tensorflow::Status::Status(tensorflow::error::Code, tensorflow::StringPiece)
0000000000000000 F *UND* 0000000000000000 tensorflow::TensorShapeBase<tensorflow::TensorShape>::dim_size(int) const
0000000000000000 F *UND* 0000000000000000 std::basic_ifstream<char, std::char_traits<char> >::~basic_ifstream()@@GLIBCXX_3.4
0000000000000000 F *UND* 0000000000000000 std::__throw_out_of_range_fmt(char const*, ..
Machine 2, Ubuntu 14.04, no gpu, 16 core, 32GB RAM(but free memory is about 16GB for dl4j)
java -Xmx2G -Dorg.bytedeco.javacpp.maxbytes=4G -Dorg.bytedeco.javacpp.maxphysicalbytes=4G -cp target/dl4j-examples-0.9.1-bin.jar org.deeplearning4j.examples.recurrent.video.VideoClassificationExample
Starting data generation...
Data generation complete
o.n.l.f.Nd4jBackend - Loaded [CpuBackend] backend
o.n.n.NativeOpsHolder - Number of threads used for NativeOps: 16
o.n.n.Nd4jBlas - Number of threads used for BLAS: 16
o.n.l.a.o.e.DefaultOpExecutioner - Backend used: [CPU]; OS: [Linux]
o.n.l.a.o.e.DefaultOpExecutioner - Cores: [16]; Memory: [1.8GB];