Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Un-needed consts file removed #106

Merged
merged 1 commit into from
Aug 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/consts.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ mod block_normalize;
mod block_relu;
mod cache;
mod cmdline;
mod consts;
mod feature_buffer;
mod feature_transform_executor;
mod feature_transform_implementations;
Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ mod block_normalize;
mod block_relu;
mod cache;
mod cmdline;
mod consts;
mod feature_buffer;
mod feature_transform_executor;
mod feature_transform_implementations;
Expand Down
8 changes: 5 additions & 3 deletions src/model_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ use std::io::ErrorKind;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;

use crate::consts;
use crate::feature_transform_parser;
use crate::vwmap;
use crate::vwmap::NamespaceDescriptor;

const WEIGHT_DELIM: &str = ":";
const VERBOSE_FIELD_DELIM: &str = ",";

// Maximum supported FFM embedding size
const FFM_MAX_K: usize = 128;

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
pub struct FeatureComboDesc {
pub namespace_descriptors: Vec<vwmap::NamespaceDescriptor>,
Expand Down Expand Up @@ -364,12 +366,12 @@ impl ModelInstance {

if let Some(val) = cl.value_of("ffm_k") {
mi.ffm_k = val.parse()?;
if mi.ffm_k > consts::FFM_MAX_K as u32 {
if mi.ffm_k > FFM_MAX_K as u32 {
return Err(Box::new(IOError::new(
ErrorKind::Other,
format!(
"Maximum ffm_k is: {}, passed: {}",
consts::FFM_MAX_K,
FFM_MAX_K,
mi.ffm_k
),
)));
Expand Down
Loading