BugFix
This commit is contained in:
parent
35dfb8d3a5
commit
cf005944b8
@ -1,4 +1,4 @@
|
||||
export VIRTUAL_ENV_PROMPT="Xenith"
|
||||
export VIRTUAL_ENV_PROMPT="\033[31mXenith\033[39m"
|
||||
alias Xenith='./bin/Xenith'
|
||||
if [ -z "${_OLD_VIRTUAL_PS1+x}" ]; then
|
||||
_OLD_VIRTUAL_PS1="$PS1"
|
||||
|
||||
BIN
bin/Xenith
BIN
bin/Xenith
Binary file not shown.
14
main.cpp
14
main.cpp
@ -371,6 +371,20 @@ int main(int argc, char** argv) {
|
||||
const std::string cmd = argv[1];
|
||||
if (cmd == "-h" || cmd == "--help" || cmd == "help") { printf(HELP_TEXT); return 0; }
|
||||
|
||||
if (available_new_version()) {
|
||||
const std::string TMP_FILE = "./tmp/remote_version.txt";
|
||||
std::ifstream tmp_file(TMP_FILE);
|
||||
std::string remote_str = "0.0.0";
|
||||
if (tmp_file.is_open() && std::getline(tmp_file, remote_str)) {
|
||||
tmp_file.close();
|
||||
} else {
|
||||
std::cerr << "Ошибка чтения файла новой версии (Пожалуйста напишите о этом баге)" << std::endl;
|
||||
return false;
|
||||
}
|
||||
std::cout << "Доступна новая версия \033[33m" << remote_str << "\033[39m\nВыполните \"Xenith update\" чтобы обновится до последней версии\n" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Args a(argc, argv, 2);
|
||||
if (cmd == "new") return cmd_new(a);
|
||||
if (cmd == "train") return cmd_train(a);
|
||||
|
||||
@ -1 +1 @@
|
||||
0.0.4
|
||||
0.0.5
|
||||
@ -91,7 +91,7 @@ TrainStats train_model(Params& p, const Tokenizer& tok, const std::string& corpu
|
||||
auto now = std::chrono::steady_clock::now();
|
||||
double dt = std::chrono::duration<double>(now - t0).count();
|
||||
double tps = dt > 0 ? st.tokens_seen / dt : 0;
|
||||
fprintf(stderr, "шаг %5d/%d loss %.4f ppl %8.2f lr %.2e %6.0f ток/с\n",
|
||||
fprintf(stderr, "шаг %5d/%d loss %.4f ppl %8.2f lr %.2e %6.0f ток/с\r",
|
||||
step, tc.steps, loss, std::exp(loss), lr_at(tc, step), tps);
|
||||
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ namespace ui
|
||||
draw_button(2, 2 + 3, panel_w - 2, 3, "Models", border_clip);
|
||||
draw_button(2, 2 + 6, panel_w - 2, 3, "Settings", border_clip);
|
||||
draw_button(2, 2 + 9, panel_w - 2, 3, "Server", border_clip);
|
||||
std::cout << "\033[?1000h\033[?1002h\033[?1006h" << std::flush;
|
||||
//std::cout << "\033[?1000h\033[?1002h\033[?1006h" << std::flush;
|
||||
}
|
||||
|
||||
Tui::~Tui()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user