Skip to content

Commit

Permalink
Uneeded consts file removed
Browse files Browse the repository at this point in the history
  • Loading branch information
ggaspersic committed Aug 9, 2023
1 parent 2f89c20 commit e3ce4dd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
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

0 comments on commit e3ce4dd

Please sign in to comment.