Code Monkey home page Code Monkey logo

fitlog's Issues

fitlog可以在windows下使用吗

我在windows下的anaconda 中安装了fitlog。
fitlog init example初始化时报错
错误信息:
'cp' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

不使用addbestmetric,metric无法使用compare对比功能

fitlog.add_metric({"dev": {"Acc": acc}}, step=step)
如果只有这一行,则不能用compare对比两次实验的acc曲线,会显示No overlapped metric to compare.

必须是下面的
fitlog.add_metric({"dev": {"Acc": acc}}, step=step)
fitlog.add_best_metric({"dev":{"Acc":best_acc}})
才能有对比界面

多个log的曲线显示

目前只能显示单个log的不同metric,实际上往往需要显示同一metric在不同log下对比,请问如何操作?

[feature request] 多个project的实验记录之间合并

经常遇到很多个人用同一份code的不同branch在不同的机器上同时进行不同实验的情况,fitlog有没有打算加入合并多个project实验结果的功能?这样可以把大家的log合并在一起观察结果。

Some error happens when initialize table.

你好,首先感谢fitlog。

今天我在使用fitlog的时候,发现了一个问题,可能是当我的实验记录条数(401条)过多,在打开网页的时候,会弹窗报错Some error happens when initialize table。
系统:win10,fitlog版本已经更新到最新。
请问应该如何解决这一问题?
期待您的回复。

fitlog revert 无法正确回退代码(版本:0.5.8)

您好:
我在代码起始位置加入fitlog.commit(file)后,按照fitlog revert xxx的方式回退代码,提升 Your code is reverted to /data/yubowen/experiments/NA_revert,但是在NA_revert文件夹中并没有代码,请问是什么问题呢?

能否选择直接使用.git做管理

是否可以有个选项直接使用.git做版本管理,不用.fitlog,这样更加简单一些,我也可以将logs和.fitconfig这些文件一起添加到git上去,如果放在.fitlog中不能提交到git上去,后面如果丢失,实验记录就丢了

trend看train_loss,训练过程中无曲綫,横坐标为0到1

想试用下fitlog工具加在tf-yolov3代码里,由于代码中未计算mAP,只想看下train_loss曲綫。加的代码如下:
fitlog.add_loss(train_step_loss, name="train_loss", step=train_step)
loss.log中信息如下:
image

在网页中打开是这样的
image

image

是我操作有误吗?

commit多个文件 & 与git混合使用

您好,我在使用fitlog中产生了一些疑问,烦请解答:

  1. 文档的例子是针对一个main.py进行commit的,如果我在实验中对几个文件都进行了修改,是否需要对所有修改的文件(或者说,所有我希望fitlog记录修改的文件)都进行fitlog.commit呢?
  2. fitlog如何和普通的git混合使用呢?我能或者有需要额外使用git进行add、commit这样的操作吗?还是说我只需要用fitlog进行commit就可以了?

谢谢!

是否支持多线程同时记录几个训练过程?

我的程序是多线程的,请问

我可以同时记录几个训练过程吗?
内部有锁吗?我可以在不同的线程log吗?

(PS:关键部分释放了gil所以没有性能问题,因为内存不够所以我想不同超参数的训练可以共享内存,多线程共享内存比较方便。)

请问是否支持python 3.5版本?

我尝试在服务器上安装fitlog, 但出现如下错误:

(venv-torch) zhy@node27:~$ pip install git+https://gitee.com/fastnlp/fitlog
Collecting git+https://gitee.com/fastnlp/fitlog
Cloning https://gitee.com/fastnlp/fitlog to /tmp/pip-req-build-gdyvazpp
Running command git clone -q https://gitee.com/fastnlp/fitlog /tmp/pip-req-build-gdyvazpp
ERROR: Package 'fitlog' requires a different Python: 3.5.2 not in '>=3.6'
WARNING: You are using pip version 19.3.1; however, version 20.3.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

error when not employing the commit API

Hello, thanks for providing this wonderful tool.

When I use the tutorial codes in https://fitlog.readthedocs.io/zh/latest/user/quickstart.html and comment out the commit function, it goes wrong.

import fitlog
import random

fitlog.commit(__file__)  # auto commit your codes
fitlog.add_hyper_in_file(__file__)  # record your hyperparameters
######hyper
rand_seed = 12
######hyper
random.seed(rand_seed)
best_acc, best_step, step = 0, 0, 0

for i in range(200):
    step += 1
    if step % 20 == 0:
        loss = random.random()
        acc = random.random()
        fitlog.add_loss(loss, name="Loss", step=step)
        fitlog.add_metric(acc, name="Acc", step=step)
    if step % 100 == 0:
        test_acc = random.random()
        if test_acc > best_acc:
            best_acc = test_acc
            best_step = step
fitlog.add_best_metric({"Test": {"Acc": best_acc, "Step": best_step}})
fitlog.finish()  # finish the logging

Error information is as below,
image

Is it necessary to use the COMMIT API?

RuntimeError: It seems like you are not running under a folder governed by fitlog.

Reach the root or home.
Can not find the config file.
Traceback (most recent call last):
File "train_presum.py", line 22, in
fitlog.commit('file')
File "/root/miniconda3/envs/myconda/lib/python3.8/site-packages/fitlog-0.9.13-py3.8.egg/fitlog/init.py", line 95, in commit
_logger.commit(file, fit_msg)
File "/root/miniconda3/envs/myconda/lib/python3.8/site-packages/fitlog-0.9.13-py3.8.egg/fitlog/fastlog/logger.py", line 32, in wrapper
return func(*args, **kwargs)
File "/root/miniconda3/envs/myconda/lib/python3.8/site-packages/fitlog-0.9.13-py3.8.egg/fitlog/fastlog/logger.py", line 142, in commit
raise RuntimeError("It seems like you are not running under a folder governed by fitlog.\n" + msg['msg'])
RuntimeError: It seems like you are not running under a folder governed by fitlog.
Error: Config file is not found

需要几个fitlog.commit(__file__)?

1.是否只要入口函数(比如main.py)里有一个fitlog.commit(file)就可以了,其他文件中不需要?
2.如果一个任务里有两个子任务,需要两个不同的入口函数(main_taskA.py, main_taskB.py),是否每个main里都应该有个fitlog.commit(file)?
3.我想学学你们是怎么操作git自动commit的。通常用gitpython这个库可以操作git,但你们好像没有用到。

是否支持自定义logging的级别?

您好,我看到源码中是在create_log_files()里定义了logging的级别,请问是否支持用户再次自定义这一级别呢?因为我不太希望在训练过程中出现很多行loss,因为tqdm已经可以满足这一需求。
谢谢!

同时跑两个训练脚本,刷新页面hyper会丢失项目

您好,

你们的项目正是我现在需要的日志管理文件,我刚开始使用,非常便利美观。

为了节省时间,通常分开跑不同参数的训练脚本,在同时运行的两个脚本中我调用了figlog,分别创造了两个文件夹(对应前端的两行),我发现刷新浏览器页面之后,hyper会变得奇怪丢失了一些项目,尝试在上方的列选项中重新勾选,发现也不见了一些项目。
目前的解决方法是,使用你们页面上的刷新而不是浏览器的刷新,并且无法对metric使用对比按钮。

是否是我操作错误?
期待你们以后的更新~

不能在浏览器显示?

您好,我在服务器上运行fitlog log logs后,
显示:
图片
之后浏览器输入http:192.168.1.124(服务器的IP):5000,显示拒绝连接

fitlog==0.3.2
服务器上安装是通过pip install fitlog进行安装的

之后感觉可能是版本太低,因此把就下载了source code,但是下载完后,我应该怎么去安装?
python setup.py
显示:
图片
后面的命令选项我应该填什么?
非常感谢您的回复!!!

memo一刷新就没了

用网页上的刷新键刷新没问题,但是用F5刷新后,自己添加的memo就没了

wsl环境下报错

环境:win10 wsl ubuntu20.4 python3.7
fitlog init报权限问题,再执行一次提示成功
Traceback (most recent call last):
File "/mnt/d/Ubuntu/miniconda3/envs/test/bin/fitlog", line 8, in
sys.exit(main_cmd())
File "/mnt/d/Ubuntu/miniconda3/envs/test/lib/python3.7/site-packages/fitlog/fastcmd/init.py", line 49, in main_cmd
cmd_mapcmd
File "/mnt/d/Ubuntu/miniconda3/envs/test/lib/python3.7/site-packages/fitlog/fastcmd/init_cmd.py", line 26, in init_cmd
committer.init_project(name, hide=args["--hide"], git=not args["--no-git"])
File "/mnt/d/Ubuntu/miniconda3/envs/test/lib/python3.7/site-packages/fitlog/fastgit/committer.py", line 504, in init_project
shutil.copytree(os.path.join(tools_path, "logs"), os.path.join(pj_path, "logs"))
File "/mnt/d/Ubuntu/miniconda3/envs/test/lib/python3.7/shutil.py", line 368, in copytree
raise Error(errors)
shutil.Error: [('/mnt/d/Ubuntu/miniconda3/envs/test/lib/python3.7/site-packages/fitlog/fastgit/normal/logs', '/mnt/d/Github/extest/logs', "[Errno 13] Permission denied: '/mnt/d/Github/extest/logs'")]

save等一系列按键消失

查看完一组实验的曲线再返回主界面。 包括save在内的一系列按钮不见了。同时delete和erase按键也不起任何作用

请问如何将for循环和fitlog结合起来

比如我现在有个超参数alpha想从[1, 2...,10]中搜索,我写了一个for循环给我的算法传参数
for alpha in range(1, 11):
fitlog.add_hyper(alpha, 'alpha')
train(..., alpha)
`
在web页面里我发现下一个循环的数值会替换上一次的,没有办法得到10个值的结果。

UnicodeDecodeError on Windows

When I followed the tutorial of fitlog, I met a bug at step3.
After I typed "fitlog log logs", I came across an error
"UnicodeDecodeError: 'gbk' codec can't decode byte 0xaa in position 36: illegal multibyte sequence"
at
"../fitlog/fastserver/server/log_config_parser.py", line 1042, in _read
for lineno, line in enumerate(fp, start=1):

So I modified the encoding at line 682.
Is there any better solution?

在已存在的git仓库内部, 执行fitlog init 会报错

在已存在的git仓库内部, 执行fitlog init 会报错。提示如下:

`$ fitlog init
Traceback (most recent call last):
File "/Users/zhou/miniconda3/lib/python3.7/shutil.py", line 566, in move
os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/zhou/example/.fitlog' -> '/Users/zhou/example/.git'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/zhou/miniconda3/bin/fitlog", line 8, in
sys.exit(main_cmd())
File "/Users/zhou/miniconda3/lib/python3.7/site-packages/fitlog/fastcmd/init.py", line 49, in main_cmd
cmd_mapcmd
File "/Users/zhou/miniconda3/lib/python3.7/site-packages/fitlog/fastcmd/init_cmd.py", line 26, in init_cmd
committer.init_project(name, hide=args["--hide"], git=not args["--no-git"])
File "/Users/zhou/miniconda3/lib/python3.7/site-packages/fitlog/fastgit/committer.py", line 496, in init_project
self._switch_to_fast_git(pj_path)
File "/Users/zhou/miniconda3/lib/python3.7/site-packages/fitlog/fastgit/committer.py", line 167, in _switch_to_fast_git
shutil.move(fitlog_path, git_path)
File "/Users/zhou/miniconda3/lib/python3.7/shutil.py", line 580, in move
copy_function(src, real_dst)
File "/Users/zhou/miniconda3/lib/python3.7/shutil.py", line 266, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/Users/zhou/miniconda3/lib/python3.7/shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/zhou/example/.fitlog'`

希望能修复。十分感谢!

在云上跑, 没有git, 无法使用

能否只让它收集loss, 参数等信息.
我尝试不使用fitlog.commit(file), 但依然无法使用, 会报 ImportError: Failed to initialize: Bad git executable.
好像是导入包时就会判断是否有git.

是否可以跑实验的时候实时看loss

我有时看看如果不收敛就暂停一半就不跑了,但是我也需要记录log。
在网页端是否可以显示实时的loss变化曲线然后每隔多少秒自己刷新一次

可以自动搜索参数吗

比如在config里指定dropout = [0.1, 0.2, 0.3]
在代码里使用dropout = fitlog.config['dropout']
然后执行代码,自动执行三次试验,无需手动写循环,或者每次手动改变参数

fit_msg、git_msg和memo的edit无法保存

您好:
网页界面上对fit_msg、git_msg和memo进行edit后提示update successfully,但是刷新网页后还是edit之前的状态,有什么特殊操作需要进行么?

增加lr可视化的功能

目前的可视化只有loss和metric能否添加上lr的可视化,这样可以清晰的记录lr schedule

无法打开网页

您好,我用fitlog log logs命令后没有网页显示,没有任何响应,输入localhost:5000后也一样。
参考issue中的方法用fitlog log logs/ --ip 127.0.0.1也不行。
重新安装beta版本也不行,一样没有显示。
图片

请问是什么原因?
我的环境是win10,python3.7

argparse结合fitlog的bug

你好,最近我想使用argparse模块和fitlog来进行调参实验,但是发现log日志中hyper.log内容显示的不对。

`
parser = argparse.ArgumentParser(description='Hyper Parameters For Traning')
parser.add_argument('-city', type=str, default='lishui', help='select dataset')
parser.add_argument('-nrnn', type=int, default=128, help='Hidden Dimension')
parser.add_argument('-nmlp', type=int, default=128, help='number of hidden size of MLP')
# parser.add_argument('-nlayers', type=int, default=1, help='Number of layers for RNN')

parser.add_argument('-epoch', type=int, default=1000, help='training epoch')
parser.add_argument('-batch', type=int, default=1024, help='Batch Size')
parser.add_argument('-lr', type=float, default=0.001, help='learning rate')

opt = parser.parse_args()
print(opt)

rand_seed = 123

patience = 50
######hyper
city = opt.city
hidden_size_rnn = opt.nrnn
hidden_size_mlp = opt.nmlp
batch_size = opt.batch
lr = opt.lr
max_epoch = opt.epoch
dropouts = None
######hyper`

例如上面代码所示,我通过命令行传入参数,并通过argparse解析传给主程序,并用fitlog的hyper parameter方式记录超参数。
结果在hyper.log中的内容为:
{"hyper": {"city": "opt.city", "hidden_size_rnn": "opt.nrnn", "hidden_size_mlp": "opt.nmlp", "batch_size": "opt.batch", "lr": "opt.lr", "max_epoch": "opt.epoch", "dropouts": "None"}}

fitlog只是简单把 '='前后的内容变成key和value,而没有解析出具体的值

如何查看fitlog下自动commit的代码变动

工具非常赞,提高了我的调参效率
想请问是否可以直接在网页上查看fitlog.commit的代码版本变动?如果目前工具不支持的话,有什么方案可以推荐吗?

一个小bug

首先感谢作者,fitlig真的很好用,下面是我在使用中遇到的一个小bug。
当我使用argsparse传入列表参数时:
parser.add_argument("--hidden_dim",type=int,nargs='+')
此时type(args.hidden_dim)是list,但是执行fitlog.add_hyper(args)后,type(args.hidden_dim)为str,如果此时将次参数传入模型会造成错误。虽然这个bug可以规避,但是感觉也算是个小问题。

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.